/* Nearly Zero: clean type on plain linen. Flax, forest green and burgundy, the colours of undyed and plant-dyed cloth. */
:root {
  --bg: #EEE5D2;        /* linen */
  --paper: #F8F3E8;     /* washed cotton */
  --flax: #D9C69B;
  --wool: #CBBFA5;
  --silk: #F1E8D6;
  --tan: #C9AD7F;
  --sage: #A3B08F;
  --clay: #A8634D;
  --ink: #2A2621;
  --soft: #675F55;
  --line: #D4C5A7;
  --bark: #7A2B36;      /* burgundy */
  --deep: #2E4636;      /* forest green */
  --on-deep: #F4EEDF;
  --on-deep-soft: #C9CDBB;
  --thread: rgba(70, 50, 25, 0.12);
  --thread-light: rgba(255, 255, 255, 0.16);
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1C17; --paper: #29251F; --flax: #6E6146; --wool: #5B5243; --silk: #46403A; --tan: #86704F; --sage: #5E6B52; --clay: #8E5443;
    --ink: #F2EBDD; --soft: #B8AFA2; --line: #4A4135; --bark: #DB9AA2; --deep: #3F5E4A;
    --on-deep: #F4EEDF; --on-deep-soft: #CDD3C1;
    --thread: rgba(0, 0, 0, 0.22); --thread-light: rgba(255, 255, 255, 0.10);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--bark); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--bark); outline-offset: 3px; }
.wrap { max-width: 68rem; margin-inline: auto; padding-inline: 1.25rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(2.2rem, 5vw, 3rem); }
h3 { font-size: 1.45rem; line-height: 1.15; }
p { margin: 0; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bark); }
.soft { color: var(--soft); }

/* fabric placeholders for product photos */
.tx-linen { background-color: var(--flax); background-image: repeating-linear-gradient(0deg, var(--thread) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, var(--thread) 0 1px, transparent 1px 3px); }
.tx-wool { background-color: var(--wool); background-image: repeating-linear-gradient(90deg, var(--thread) 0 2px, transparent 2px 9px), repeating-linear-gradient(90deg, transparent 0 4px, var(--thread-light) 4px 6px, transparent 6px 9px); }
.tx-denim { background-color: var(--deep); background-image: repeating-linear-gradient(45deg, var(--thread-light) 0 1px, transparent 1px 4px); }
.tx-silk { background-image: linear-gradient(125deg, var(--silk) 0%, var(--paper) 38%, var(--silk) 62%, var(--flax) 100%); }
.tx-cotton { background-color: var(--paper); background-image: repeating-linear-gradient(0deg, var(--thread) 0 1px, transparent 1px 2px); }
.tx-print { background-color: var(--sage); background-image: radial-gradient(var(--paper) 1.6px, transparent 2.2px); background-size: 14px 14px; }
.tx-clay { background-color: var(--bark); background-image: repeating-linear-gradient(0deg, var(--thread) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, var(--thread-light) 0 1px, transparent 1px 3px); }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.5rem; padding-block: 0.85rem; }
.mark { font-family: var(--display); font-size: 1.85rem; line-height: 1; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.mark .dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px solid var(--bark); display: inline-block; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; }
.top nav a { color: var(--ink); font-size: 0.98rem; font-weight: 500; text-decoration: none; padding-block: 0.2rem; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--bark); }
.top nav a[aria-current="page"] { border-bottom-color: var(--bark); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--deep); color: var(--on-deep); font-family: var(--body); font-size: 1rem; font-weight: 600; text-decoration: none; padding: 0.8rem 1.5rem; border-radius: 4px; border: 0; cursor: pointer; transition: transform .2s ease, filter .2s ease; }
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--paper); filter: none; }
.btn[disabled] { background: var(--line); color: var(--soft); cursor: not-allowed; transform: none; filter: none; }

/* sections */
section > .wrap, .page-head .wrap { padding-block: 3.75rem; display: grid; gap: 2rem; }
.band { background: var(--paper); border-block: 1px solid var(--line); }
.head { display: grid; gap: 0.6rem; max-width: 42rem; }
.head > p:not(.eyebrow) { color: var(--soft); }

/* pills */
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pills button, .pills a {
  font-family: var(--body); font-size: 0.97rem; font-weight: 500; color: var(--ink); text-decoration: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 1.05rem; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pills button:hover, .pills a:hover { border-color: var(--bark); }
.pills button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: var(--on-deep); }

.lvl { font-family: var(--body); font-size: 0.8rem; font-weight: 600; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0.12rem 0.65rem; white-space: nowrap; }
.src { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bark); }

/* product cards (shop and item pages) */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.25rem; }
.card { display: grid; gap: 0.2rem; align-content: start; min-width: 0; color: var(--ink); text-decoration: none; }
.pic { aspect-ratio: 4 / 5; border: 1px solid var(--line); border-radius: 4px; position: relative; margin-bottom: 0.7rem; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover .pic { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 16px 26px -20px rgba(40, 25, 10, 0.6); }
.tag { position: absolute; top: 0.9rem; right: 0.9rem; transform-origin: 50% -0.9rem; transform: rotate(4deg); transition: transform .5s cubic-bezier(.3,1.6,.5,1);
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 3px 3px 4px 4px; padding: 0.95rem 0.7rem 0.45rem; min-width: 4.4rem; text-align: center;
  font-size: 0.8rem; font-weight: 600; line-height: 1.15; box-shadow: 0 6px 10px -8px rgba(40, 25, 10, 0.7); }
.tag::before { content: ""; position: absolute; top: 0.35rem; left: 50%; width: 0.4rem; height: 0.4rem; margin-left: -0.2rem; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.tag::after { content: ""; position: absolute; top: -0.9rem; left: 50%; height: 1.3rem; border-left: 1.5px solid var(--bark); }
.tag small { display: block; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); font-weight: 600; margin-top: 0.1rem; }
.card:hover .tag { transform: rotate(-6deg); }
.pic .eg { position: absolute; bottom: 0.6rem; left: 0.6rem; font-size: 0.75rem; color: var(--soft); background: var(--paper); border-radius: 999px; padding: 0.08rem 0.55rem; }
.card h3 { font-size: 1.35rem; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.card .made { color: var(--bark); font-size: 0.95rem; font-weight: 500; }
.card .note { color: var(--soft); font-size: 0.94rem; line-height: 1.45; }
.price { font-family: var(--display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* footer and its sewn-in care label */
footer { border-top: 1px solid var(--line); margin-top: 2.5rem; }
footer .wrap { padding-block: 0 3rem; display: grid; gap: 0.8rem; justify-items: center; text-align: center; }
footer p { font-size: 0.92rem; color: var(--soft); max-width: 44rem; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.3rem; font-size: 0.95rem; }
.care { position: relative; margin-top: -1px; margin-bottom: 1.2rem; width: min(22rem, 100%);
  background-color: var(--silk);
  background-image: repeating-linear-gradient(0deg, rgba(122, 43, 54, 0.05) 0 1px, transparent 1px 3px);
  color: var(--bark); padding: 1.6rem 1.2rem 1.1rem; display: grid; gap: 0.45rem; justify-items: center;
  box-shadow: 0 14px 20px -16px rgba(40, 25, 10, 0.55); transform-origin: 50% 0; transition: transform .6s cubic-bezier(.3,1.5,.5,1); }
.care::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 0.55rem; background: rgba(40, 25, 10, 0.08); border-bottom: 1px solid rgba(122, 43, 54, 0.15); }
.care::after { content: ""; position: absolute; left: 0.8rem; right: 0.8rem; top: 0.22rem; border-top: 1.5px dashed rgba(122, 43, 54, 0.45); }
.care:hover { transform: rotate(-2.5deg); }
.care .brand { font-family: var(--display); font-size: 1.6rem; line-height: 1; letter-spacing: 0.02em; }
.care .fiber { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.care .icons { display: flex; gap: 0.9rem; margin-block: 0.2rem; }
.care .icons svg { width: 1.6rem; height: 1.6rem; display: block; }
.care .words { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bark); opacity: 0.85; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .care, .tag, .pic { transition: none; } }

/* real product photos */
.pic.has-img { overflow: visible; background: var(--paper); }
.pic.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 3px; }

/* header extras: favorites, bag, account */
.top nav { align-items: center; }
.bagl { display: inline-flex; align-items: center; gap: 0.35rem; }
.count { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding-inline: 0.3rem; border-radius: 999px; background: var(--bark); color: var(--on-deep); font-size: 0.72rem; font-weight: 700; }
.acct-btn { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--body); font-size: 0.92rem; font-weight: 500; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.85rem; cursor: pointer; }
.acct-btn:hover { border-color: var(--bark); }
.acct-btn svg { width: 1rem; height: 1rem; }

/* heart */
.cardwrap { position: relative; min-width: 0; }
.heart { position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--bark); box-shadow: 0 4px 10px -6px rgba(40, 25, 10, 0.5); }
.heart svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: fill .2s ease; }
.heart[aria-pressed="true"] svg { fill: currentColor; }
.heart.inline { position: static; }
@media (prefers-reduced-motion: no-preference) {
  .heart.pop { animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
  @keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.3); } 100% { transform: scale(1); } }
}

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; z-index: 50;
  background: var(--deep); color: var(--on-deep); padding: 0.7rem 1.2rem; border-radius: 999px; font-size: 0.95rem; box-shadow: 0 10px 24px -12px rgba(0,0,0,0.5); transition: opacity .25s ease, transform .25s ease; max-width: calc(100% - 2rem); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* simple content pages */
.prose { max-width: 42rem; display: grid; gap: 1rem; }
.prose h2 { font-size: clamp(1.8rem, 4vw, 2.3rem); margin-top: 1rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }

@media (max-width: 560px) {
  .top .wrap { gap: 0.3rem 1rem; }
  .top nav { gap: 0.3rem 0.9rem; }
  .top nav a[href="/"] { display: none; }
  .acct-btn { padding: 0.25rem 0.65rem; font-size: 0.85rem; }
}
