/* Fern & Kiln demo store. Plain CSS, no build step. */
:root {
  --stone: #F3EEE6;
  --paper: #FBF8F3;
  --sand: #E9E1D4;
  --ink: #26221E;
  --muted: #5C544B;
  --line: #D6CCBD;
  --accent: #A0452A;
  --accent-dark: #7F3420;
  --moss: #4F6B4A;
  --on-dark: #F3EEE6;
  --on-dark-muted: #CFC6B8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", "Helvetica Neue", Helvetica, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; font-variation-settings: "SOFT" 50, "WONK" 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-dark); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 1rem; }
.lede { font-size: clamp(1.125rem, 2vw, 1.35rem); color: var(--muted); max-width: 36em; }
.muted { color: var(--muted); }
.section { padding: clamp(56px, 9vw, 120px) 0; }
.section.tight { padding: clamp(36px, 6vw, 72px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(24px, 4vw, 48px); flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* Buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
  background: var(--ink); color: var(--on-dark); border: 1.5px solid var(--ink); padding: .85em 1.6em; cursor: pointer;
  border-radius: var(--radius); transition: background .15s, color .15s, border-color .15s; min-height: 48px;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--on-dark); }
.btn.block { display: block; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--sand); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.link-arrow::after { content: " \2192"; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--stone); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { font-family: var(--serif); font-size: 1.55rem; text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.brand em { font-style: italic; color: var(--accent); padding: 0 .08em; }
.nav { display: flex; gap: clamp(16px, 2.6vw, 36px); align-items: center; }
.nav a { text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  font: inherit; background: none; border: 1.5px solid transparent; color: var(--ink); cursor: pointer; min-height: 48px; min-width: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; border-radius: var(--radius); font-weight: 600;
}
.icon-btn:hover { border-color: var(--line); }
.cart-count { background: var(--accent); color: #fff; font-size: .8125rem; min-width: 24px; height: 24px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.cart-count[data-n="0"] { background: var(--sand); color: var(--muted); }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--stone); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.15rem; }
}

/* Announcement */
.announce { background: var(--ink); color: var(--on-dark); font-size: .9rem; text-align: center; padding: 8px var(--gutter); }

/* Hero */
.hero { padding: clamp(32px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 3vw, 40px); align-items: center; }
.hero-copy { grid-column: 1 / span 6; }
.hero-copy h1 { margin-bottom: .4em; }
.hero-copy h1 em { color: var(--accent); font-style: italic; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2rem; }
.hero-art { grid-column: 7 / span 6; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(10px, 1.6vw, 20px); align-items: end; }
.hero-art figure { margin: 0; overflow: hidden; }
.hero-art figure:nth-child(2) { margin-bottom: 18%; }
.hero-art .vis { width: 100%; height: auto; aspect-ratio: 4 / 5; }
@media (max-width: 860px) {
  .hero-copy, .hero-art { grid-column: 1 / -1; }
  .hero-art figure:nth-child(2) { margin-bottom: 10%; }
}

/* Product cards and grids */
.grid { display: grid; gap: clamp(20px, 3vw, 40px) clamp(14px, 2vw, 28px); grid-template-columns: repeat(4, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid, .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .grid { gap: 28px 12px; } }
.card { display: block; text-decoration: none; color: inherit; }
.card:hover { color: inherit; }
.card-img { overflow: hidden; background: var(--sand); }
.card-img .vis { width: 100%; height: auto; aspect-ratio: 4 / 5; transition: transform .4s ease; }
.card:hover .card-img .vis, .card:focus-visible .card-img .vis { transform: scale(1.04); }
.card-body { padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card h3 { font-size: 1.2rem; margin: 0; }
.card:hover h3 { color: var(--accent); }
.card .price { font-weight: 600; white-space: nowrap; }
.card .sub { color: var(--muted); font-size: .95rem; margin: 2px 0 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } .card:hover .card-img .vis { transform: none; } }

/* Story strip */
.story { background: var(--accent-dark); color: var(--on-dark); }
.story .eyebrow { color: #F0C9B8; }
.story-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.story-big { grid-column: 1 / span 7; font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.9rem); line-height: 1.18; margin: 0; }
.story-side { grid-column: 9 / span 4; }
.story-side p { color: #F3E3DA; }
.story .link-arrow { border-color: #F0C9B8; color: #fff; }
.story a:hover { color: #fff; }
@media (max-width: 860px) { .story-big, .story-side { grid-column: 1 / -1; } }

/* Journal cards */
.j-card { display: block; text-decoration: none; border-top: 1.5px solid var(--ink); padding-top: 18px; }
.j-card:hover { color: inherit; }
.j-card:hover h3 { color: var(--accent); }
.j-card .meta { font-size: .875rem; color: var(--muted); letter-spacing: .04em; margin-bottom: 8px; }
.j-card h3 { font-size: 1.5rem; }

/* Newsletter */
.news { background: var(--sand); }
.news-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; align-items: center; }
.news-grid > div:first-child { grid-column: 1 / span 6; }
.news-form { grid-column: 8 / span 5; }
@media (max-width: 860px) { .news-grid { display: block; } .news-form { margin-top: 24px; } }

/* Forms */
label, .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid #8F8576; border-radius: var(--radius);
  padding: .7em .85em; width: 100%; min-height: 48px;
}
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #A3281C; }
.err { color: #A3281C; font-size: .9rem; margin: 6px 0 0; min-height: 0; }
.err:empty { display: none; }
.field { margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row.three { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 560px) { .row, .row.three { grid-template-columns: 1fr; } }
.hint { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.inline-form { display: flex; gap: 8px; }
.inline-form .field { flex: 1; margin: 0; }
@media (max-width: 480px) { .inline-form { flex-direction: column; } }
.thanks { border: 1.5px solid var(--moss); background: var(--paper); padding: 20px 24px; }
.thanks h3 { margin-bottom: .3em; }
fieldset { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
legend { font-family: var(--serif); font-size: 1.5rem; padding: 0; margin-bottom: 14px; }
.opt { display: flex; gap: 14px; align-items: flex-start; border: 1.5px solid var(--line); background: var(--paper); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.opt input { width: 20px; min-height: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.opt:has(input:checked) { border-color: var(--ink); }
.opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt strong { display: block; font-weight: 600; }
.opt span.d { color: var(--muted); font-size: .95rem; }
.opt .p { margin-left: auto; font-weight: 600; white-space: nowrap; }

/* Page header */
.page-head { padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); margin-bottom: .3em; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }

/* Shop controls */
.controls { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; justify-content: space-between; padding: 24px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-weight: 500; background: transparent; border: 1.5px solid var(--ink); color: var(--ink); padding: 0 18px; min-height: 44px; cursor: pointer; border-radius: 22px; }
.chip:hover { background: var(--sand); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.ctl-group { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; }
.ctl-group .field { margin: 0; min-width: 180px; }
.count-line { color: var(--muted); margin: 0 0 24px; }
.empty { padding: 48px 0; text-align: center; }

/* Product page */
.pdp { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 64px); padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 7vw, 96px); }
.gallery { grid-column: 1 / span 7; display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-self: start; }
.thumbs { display: flex; flex-direction: column; gap: 10px; }
.thumb { padding: 0; border: 2px solid transparent; background: var(--sand); cursor: pointer; overflow: hidden; }
.thumb .vis { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.thumb[aria-pressed="true"] { border-color: var(--ink); }
.main-img { background: var(--sand); overflow: hidden; }
.main-img .vis { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.buy { grid-column: 9 / span 4; }
.buy h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.buy .price { font-size: 1.6rem; font-weight: 600; margin-bottom: 4px; }
.buy .gst { color: var(--muted); font-size: .95rem; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; border: 0; padding: 0; margin: 0 0 22px; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.swatch label { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; border: 1.5px solid var(--line); background: var(--paper); padding: 8px 14px 8px 8px; min-height: 48px; font-weight: 500; }
.swatch .dot { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); display: inline-block; }
.swatch input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.qty { display: inline-flex; border: 1.5px solid #8F8576; background: var(--paper); }
.qty button { font: inherit; font-size: 1.25rem; width: 48px; min-height: 48px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--sand); }
.qty .n { min-width: 44px; text-align: center; align-self: center; font-weight: 600; }
.qty.small button { width: 40px; min-height: 40px; }
.qty.small .n { min-width: 34px; }
.buy-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 8px 0 28px; }
.buy-row .btn { flex: 1; min-width: 180px; }
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; min-height: 48px; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); }
.acc details[open] summary::after { content: "\2212"; }
.acc .acc-body { padding: 0 0 18px; color: var(--muted); }
.acc .acc-body p:last-child { margin-bottom: 0; }
@media (max-width: 960px) {
  .gallery, .buy { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .thumbs { flex-direction: row; order: 2; }
  .thumb { width: 72px; }
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--on-dark); padding: 12px 20px; z-index: 90; max-width: calc(100% - 32px); }

/* Cart drawer */
.overlay { position: fixed; inset: 0; background: rgba(38, 34, 30, .5); z-index: 60; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.overlay.show { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--paper); z-index: 70; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; display: flex; flex-direction: column; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 8px 12px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.5rem; margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 24px 24px; background: var(--stone); }

/* Cart lines */
.line { display: grid; grid-template-columns: 80px 1fr auto; gap: 8px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line .thumb-s { width: 80px; background: var(--sand); }
.line .thumb-s .vis { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.line h3 { font-size: 1.1rem; margin: 0; }
.line h3 a { text-decoration: none; }
.line .opts { color: var(--muted); font-size: .92rem; margin: 2px 0 10px; }
.line .controls-r { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.line .lp { font-weight: 600; text-align: right; }
.linkbtn { font: inherit; background: none; border: 0; padding: 8px 0; color: var(--muted); text-decoration: underline; cursor: pointer; min-height: 40px; }
.linkbtn:hover { color: var(--accent); }
.totals { margin: 0; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .grand { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--ink); margin-top: 8px; padding-top: 12px; }
.totals .small { color: var(--muted); font-size: .92rem; }
.totals dt, .totals dd { margin: 0; }
.free-note { font-size: .92rem; color: var(--muted); margin: 0 0 12px; }
.cart-empty { padding: 40px 0; text-align: center; }

/* Cart / checkout layout */
.two-col { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 64px); padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 8vw, 110px); align-items: start; }
.two-col .main-col { grid-column: 1 / span 7; }
.two-col .side-col { grid-column: 9 / span 4; background: var(--paper); border: 1px solid var(--line); padding: 24px; position: sticky; top: 96px; }
.side-col h2 { font-size: 1.6rem; }
@media (max-width: 960px) { .two-col .main-col, .two-col .side-col { grid-column: 1 / -1; position: static; } }
.demo-box { border: 1.5px dashed var(--accent); background: var(--paper); padding: 18px 20px; margin-bottom: 18px; }
.demo-box strong { color: var(--accent-dark); }
.mini-line { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.mini-line .thumb-s { width: 52px; flex: none; background: var(--sand); }
.mini-line .thumb-s .vis { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.mini-line .t { flex: 1; font-size: .98rem; line-height: 1.35; }
.mini-line .t small { display: block; color: var(--muted); }

/* Prose pages */
.prose { max-width: 40em; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 1.6em; }
.prose p, .prose li { font-size: 1.12rem; }
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.split .a { grid-column: 1 / span 5; }
.split .b { grid-column: 7 / span 6; }
@media (max-width: 860px) { .split .a, .split .b { grid-column: 1 / -1; } }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.values > div { border-top: 1.5px solid var(--ink); padding-top: 16px; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; gap: 20px; } }
.art-vis { background: var(--sand); }
.art-vis .vis { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.article { padding: clamp(32px, 5vw, 64px) 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px 48px; }
.article > header { grid-column: 1 / span 4; }
.article > div { grid-column: 6 / span 7; }
.article h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.article .meta { color: var(--muted); font-size: .92rem; letter-spacing: .04em; }
.article p { font-size: 1.12rem; max-width: 38em; }
@media (max-width: 860px) { .article { display: block; } }
.faq-group { margin-bottom: 48px; }
.faq-group h2 { font-size: 1.8rem; }

/* Confirmation */
.conf-num { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--accent-dark); margin: 0; }
.addr { font-style: normal; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark-muted); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: clamp(40px, 6vw, 72px) 0 32px; }
.site-footer h2 { font-family: var(--sans); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark); margin: 0 0 14px; font-weight: 600; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .brand { color: var(--on-dark); }
.site-footer .brand em { color: #E8A58C; }
.footer-bottom { border-top: 1px solid #4A443D; padding: 18px 0 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; align-items: center; }
.ribbon { border: 1px solid #8F8576; padding: 3px 10px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
