/* ==========================================================================
   AERA — Autumn/Winter ’26 · Modular Capsule landing page
   Mobile-first. Tokens mirror CLAUDE.md.
   ========================================================================== */

:root {
  --canvas: #F6F5F2;
  --surface: #FFFFFF;
  --ink: #161616;
  --muted: #6E6B64;
  --line: #E2E0DA;
  --accent: #4A5248;
  --sale: #B84A39;

  --serif: "Cormorant Garamond", "Instrument Serif", Georgia, serif;
  --sans: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --radius: 2px;
  --margin: 20px;
  --gutter: 16px;
  --section: 72px;
  --header-h: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 900px) {
  :root { --margin: 40px; --gutter: 24px; --section: 120px; --header-h: 68px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* room for mobile bar */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--margin); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -40px; background: var(--ink); color: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { top: 8px; }

.price, .price-num, .code, .bag-count, .sizes span, .product__index, .fabric__num, .hero__meta dd {
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: .95;
}
.display--h2 { font-size: clamp(36px, 4vw, 56px); line-height: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  font: 500 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--ink); border-radius: 0;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--surface); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--surface); }
.btn--sm { min-height: 44px; padding: 0 18px; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; }

/* ---------- 1. Promo bar ---------- */
.promo-bar {
  background: var(--ink); color: var(--surface);
  font: 500 10.5px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  transition: background-color .35s var(--ease);
}
html[data-mode="sale"] .promo-bar { background: var(--sale); }
.promo-bar__inner { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 36px; padding-block: 8px; text-align: center; }
.promo-bar__currency, .promo-bar__link { display: none; }
.promo-bar .code { font-weight: 600; letter-spacing: .14em; }
@media (min-width: 900px) {
  .promo-bar { font-size: 11px; }
  .promo-bar__inner { justify-content: space-between; }
  .promo-bar__currency, .promo-bar__link { display: block; flex: 0 0 120px; }
  .promo-bar__link { text-align: right; text-underline-offset: 3px; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 245, 242, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-h); }
.menu-btn { margin-left: -12px; justify-self: start; }
.wordmark { font: 500 22px/1 var(--serif); letter-spacing: .32em; text-decoration: none; padding-left: .32em; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 24px; }
.header-link { display: none; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.bag-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  background: none; border: 0; cursor: pointer;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.bag-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--ink); border-radius: var(--radius); font-size: 11px; letter-spacing: 0;
}
.bag-count.is-bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { background: var(--ink); color: var(--surface); } }

.primary-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--canvas); border-bottom: 1px solid var(--line);
  display: none;
}
.primary-nav.is-open { display: block; }
.primary-nav ul { padding: 8px var(--margin) 16px; }
.primary-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.primary-nav a[aria-current] { color: var(--accent); }

@media (min-width: 900px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; gap: 48px; }
  .menu-btn { display: none; }
  .primary-nav { position: static; display: block; background: none; border: 0; }
  .primary-nav ul { display: flex; gap: 32px; padding: 0; }
  .primary-nav a { padding: 0; border: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
  .primary-nav a:hover { color: var(--accent); }
  .header-link { display: inline; }
}

/* ---------- 2. Hero ---------- */
.hero { display: grid; border-bottom: 1px solid var(--line); }
.hero__media { position: relative; order: -1; aspect-ratio: 4 / 5; overflow: hidden; background: #D9D7D1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero__media figcaption {
  position: absolute; left: var(--margin); bottom: 16px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--surface);
}
.hero__copy { padding: 40px var(--margin) 48px; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(56px, 15vw, 112px); }
.hero__lede { max-width: 42ch; color: var(--muted); font-size: 16px; }
.hero__ctas { display: grid; gap: 12px; }
.hero__meta {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 28px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.hero__meta dt { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.hero__meta dd { font-size: 13px; }

@media (min-width: 600px) {
  .hero__ctas { grid-template-columns: auto auto; justify-content: start; }
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter);
    max-width: 1440px; margin: 0 auto;
    min-height: min(calc(100vh - var(--header-h) - 36px), 880px);
  }
  .hero__copy { grid-column: 1 / 7; padding: 72px 0 56px var(--margin); justify-content: space-between; }
  .hero__copy .eyebrow { margin-bottom: auto; }
  .hero h1 { font-size: clamp(72px, 7.6vw, 120px); margin-top: 48px; }
  .hero__media { grid-column: 7 / 13; order: 0; aspect-ratio: auto; }
  .hero__media figcaption { left: 24px; bottom: 24px; }
}

/* ---------- 3. Shop the Look ---------- */
.shop { padding: var(--section) 0; }
.section-head { display: grid; gap: 24px; margin-bottom: 20px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head__sub { margin-top: 14px; max-width: 46ch; color: var(--muted); }
.section-head--simple { margin-bottom: 40px; }

.mode-toggle {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ink); align-self: end; width: 100%;
}
.mode-toggle button {
  min-height: 44px; padding: 0 18px; background: transparent; border: 0; cursor: pointer;
  font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.mode-toggle button + button { border-left: 1px solid var(--ink); }
.mode-toggle button[aria-checked="true"] { background: var(--ink); color: var(--surface); }
html[data-mode="sale"] .mode-toggle button[data-mode-btn="sale"][aria-checked="true"] { background: var(--sale); }

.sale-note {
  font-size: 13px; color: var(--sale);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .3s var(--ease), opacity .3s var(--ease), margin .3s var(--ease);
}
html[data-mode="sale"] .sale-note { max-height: 60px; opacity: 1; margin-bottom: 24px; }

@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 28px; }
  .mode-toggle { width: auto; }
}

/* Asymmetric lookbook grid — mobile: 2-up; desktop: 7/5 split with offset column */
.look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px var(--gutter); margin-top: 32px; }
.look-col { display: contents; }
.look-grid .product { order: var(--order); }
.look-note { grid-column: 1 / -1; order: 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.look-note .eyebrow { margin-bottom: 10px; }
.look-note__media { display: none; }
.look-note__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 55%; }
.look-note__text { font: 400 20px/1.35 var(--serif); letter-spacing: -0.01em; }

@media (min-width: 900px) {
  .look-grid { grid-template-columns: repeat(12, 1fr); gap: 0 var(--gutter); margin-top: 48px; }
  .look-col { display: flex; flex-direction: column; gap: 80px; }
  .look-col--wide { grid-column: 1 / 8; }
  .look-col--narrow { grid-column: 9 / 13; padding-top: 0; gap: 64px; }
  .look-col--wide .product:nth-child(2) { width: 72%; margin-left: auto; }
  .look-note { padding: 28px 0; }
  .look-note__text { font-size: 26px; }
  .look-note { border-top: 0; padding-top: 0; }
  .look-note__media { display: block; margin-bottom: 24px; }
}

/* Product card */
.product { display: flex; flex-direction: column; min-width: 0; }
.product__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #E9E7E2; }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.product:hover .product__media img { transform: scale(1.025); }
.product__media--trouser img { object-position: 50% 50%; }
.product__media--knit img { object-position: 50% 30%; }
.product__index {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; letter-spacing: .08em; color: var(--surface); mix-blend-mode: difference;
}
.badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 7px; background: var(--sale); color: var(--surface); border-radius: var(--radius);
  font: 600 10.5px/1.2 var(--sans); letter-spacing: .06em; font-variant-numeric: tabular-nums;
  display: none;
}
.product__body { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.product__row { display: flex; flex-direction: column; gap: 2px; }
.product__name { font: 500 13px/1.35 var(--sans); }
.product__spec { font-size: 12px; color: var(--muted); }
.price { font-size: 13px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.price-was { color: var(--muted); text-decoration-thickness: 1px; display: none; }
.price-sale { color: var(--sale); font-weight: 600; display: none; }

html[data-mode="sale"] .badge,
html[data-mode="sale"] .price-was,
html[data-mode="sale"] .price-sale { display: inline-block; }
html[data-mode="sale"] .price-full { display: none; }

@media (min-width: 600px) {
  .product__row { flex-direction: row; justify-content: space-between; gap: 16px; }
  .product__name { font-size: 14px; }
  .price { font-size: 14px; flex-wrap: nowrap; }
  .badge { top: 14px; left: 14px; }
  .product__index { top: 14px; right: 14px; }
}

/* Sizes */
.sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 8px 0 0; padding: 0; border: 0; }
.sizes label { position: relative; cursor: pointer; }
.sizes input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sizes span {
  display: grid; place-items: center; height: 36px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font-size: 11.5px; transition: border-color .15s, background-color .15s, color .15s;
}
.sizes label:hover span { border-color: var(--ink); }
.sizes input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sizes input:focus-visible + span { outline: 1px solid var(--accent); outline-offset: 2px; }
.product.needs-size .sizes span { border-color: var(--sale); }
.product.needs-size .sizes { animation: nudge .35s var(--ease); }
@keyframes nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.size-hint { min-height: 16px; font-size: 11.5px; color: var(--sale); }
@media (min-width: 900px) { .sizes { gap: 6px; } .sizes span { height: 40px; font-size: 12px; } }

.btn--quick { width: 100%; min-height: 44px; padding: 0 12px; background: transparent; color: var(--ink); }
.btn--quick:hover { background: var(--ink); color: var(--surface); }
.btn--quick.is-added { background: var(--accent); border-color: var(--accent); color: var(--surface); }

/* ---------- 4. Fabric strip ---------- */
.fabric { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--section) 0; }
.fabric__grid { display: grid; border-top: 1px solid var(--ink); }
.fabric__col { padding: 28px 0 36px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.fabric__num { font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.fabric__title { font: 400 30px/1.05 var(--serif); letter-spacing: -0.02em; }
.fabric__body { color: var(--muted); max-width: 40ch; }
.specs { margin-top: 8px; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.specs dt { color: var(--muted); }
.specs dd { text-align: right; }
@media (min-width: 900px) {
  .fabric__grid { grid-template-columns: repeat(3, 1fr); }
  .fabric__col { padding: 36px 40px 8px; border-bottom: 0; }
  .fabric__col:first-child { padding-left: 0; }
  .fabric__col:last-child { padding-right: 0; }
  .fabric__col + .fabric__col { border-left: 1px solid var(--line); }
  .fabric__title { font-size: 36px; }
}

/* Prototype-only links: real buttons styled as links (no dead href="#") */
.link-like { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.link-like:hover { text-decoration: underline; text-underline-offset: 3px; }
.header-link.link-like { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- 5. Footer ---------- */
.site-footer { padding: 64px 0 24px; font-size: 13px; }
.footer__grid { display: grid; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.wordmark--footer { font-size: 28px; margin-bottom: 10px; padding-left: 0; }
.footer__tag, .footer__small { color: var(--muted); font-size: 12.5px; }
.footer__head { display: block; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul li + li { margin-top: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.newsletter__row { display: flex; margin-top: 14px; }
.newsletter__msg { margin-top: 10px; min-height: 18px; }
.newsletter__msg.is-error { color: var(--sale); }
.newsletter input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--ink); border-right: 0; border-radius: 0; background: var(--surface);
}
.footer__legal { padding: 24px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; max-width: 110ch; }
.footer__legal strong { color: var(--ink); font-weight: 500; }
.footer__credits { padding: 24px 0; border-bottom: 1px solid var(--line); }
.credits { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 12px; color: var(--muted); font-size: 12.5px; }
.credits li + li { margin-top: 0 !important; }
.credits a { color: var(--ink); }
.footer__base { display: flex; justify-content: space-between; padding-top: 20px; color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }

@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 4fr 2fr 2fr 4fr; gap: var(--gutter); }
}

/* ---------- Mobile conversion bar ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px var(--margin) calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  transform: translateY(0); transition: transform .3s var(--ease);
}
.mobile-bar.is-hidden { transform: translateY(110%); }
.mobile-bar__info { display: flex; flex-direction: column; line-height: 1.3; }
.mobile-bar__label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.mobile-bar__total { font-size: 16px; font-weight: 500; }
.mobile-bar .btn { min-width: 168px; }
@media (min-width: 900px) { .mobile-bar { display: none; } }

/* ---------- Bag drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(22, 22, 22, .32); opacity: 0; transition: opacity .3s var(--ease); }
.scrim.is-visible { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(440px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .4s var(--ease); visibility: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 24px; height: 64px; border-bottom: 1px solid var(--line); }
.drawer__title { font: 400 26px/1 var(--serif); letter-spacing: -0.02em; }
.drawer__count { font: 400 13px var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer__empty { padding: 32px 0; color: var(--muted); max-width: 32ch; }
.bag-item { display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.bag-item img { width: 84px; aspect-ratio: 4 / 5; object-fit: cover; background: #E9E7E2; }
.bag-item__top { display: flex; justify-content: space-between; gap: 12px; }
.bag-item__name { font-size: 13.5px; font-weight: 500; }
.bag-item__meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bag-item__price { font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bag-item__price s { display: block; color: var(--muted); font-size: 12px; }
.bag-item__price .now-sale { color: var(--sale); font-weight: 600; }
.bag-item__actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.qty button { width: 36px; height: 36px; background: none; border: 0; cursor: pointer; font-size: 15px; }
.qty span { min-width: 24px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.link-btn { background: none; border: 0; padding: 8px 0; cursor: pointer; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.drawer__foot { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.drawer__code {
  display: none; justify-content: space-between; margin-bottom: 14px; padding: 10px 12px;
  border: 1px dashed var(--sale); color: var(--sale); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
}
html[data-mode="sale"] .drawer__code.has-items { display: flex; }
.totals { margin-bottom: 16px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; }
.totals dt { color: var(--muted); }
.totals__saving { display: none !important; }
.totals__saving dd { color: var(--sale); }
html[data-mode="sale"] .totals__saving.has-saving { display: flex !important; }
.drawer__fine { margin-top: 12px; font-size: 11.5px; color: var(--muted); text-align: center; }
[data-checkout][disabled] { opacity: .35; cursor: not-allowed; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 92px; z-index: 80;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 18px; background: var(--ink); color: var(--surface); font-size: 12.5px;
  transition: opacity .25s var(--ease), transform .25s var(--ease); width: max-content; max-width: calc(100vw - 40px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 32px; } }

body.is-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
