/* Lucid Discipline storefront */
:root {
  --ink: #000;
  --coal: #121213;
  --ash: #1D1D1F;
  --bone: #E8E1D3;
  --stone: #A39E93;
  --line: rgba(232, 225, 211, .13);
  --accent: var(--bone);
  --danger: #FF8F7A;
  --display: 'Libre Caslon Text', 'Iowan Old Style', Georgia, serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bar: 64px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + env(safe-area-inset-top, 0px) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--bone); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
/* Film grain, for the worn feel of the garments */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); }
.muted { color: var(--stone); }
.small { font-size: .9rem; }
.error { color: var(--danger); margin: .5rem 0 0; }
.empty { color: var(--stone); padding-block: 2rem; }

/* Statements: the brand's voice, set the way it appears on the garments */
.statement { font: 700 clamp(1.9rem, 5.2vw, 4rem)/1.02 var(--display); letter-spacing: .01em; text-transform: uppercase; text-wrap: balance; margin: 0; }
.statement.small { font-size: clamp(1.05rem, 2vw, 1.3rem); letter-spacing: .04em; line-height: 1.25; }
.statement a { text-decoration: none; }
.page-title { font: 700 clamp(2rem, 5vw, 3rem)/1.05 var(--display); margin: 0 0 1.5rem; letter-spacing: -.01em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .8rem 1.5rem; border: 1px solid var(--bone); border-radius: 999px; background: var(--bone); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--bone); }
.btn.wide { width: 100%; }
.btn[disabled] { background: var(--ash); color: var(--stone); border-color: var(--line); cursor: not-allowed; transform: none; }
.link { background: none; border: 0; padding: 0; color: var(--stone); text-decoration: underline; cursor: pointer; font-size: .9rem; }

/* Top bar: menu, mark, cart */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: var(--bar); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: max(.75rem, env(safe-area-inset-left, 0px)); background: color-mix(in oklab, var(--ink) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: color-mix(in oklab, var(--ink) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar .cart-link { justify-self: end; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--ash); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mark svg { width: 34px; height: 38px; fill: currentColor; }
.count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 999px; background: var(--bone); color: var(--ink); font-size: .7rem; font-weight: 600; display: grid; place-items: center; }

/* On scroll the bar turns white and the monogram becomes a cutout: a hole in the white
   that shows the page moving behind it, in the same spot the logo sits. */
.bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; opacity: 0; transition: opacity .3s ease;
  -webkit-mask: linear-gradient(#000 0 0), url("../images/monogram.svg") center / auto 38px no-repeat;
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0), url("../images/monogram.svg") center / auto 38px no-repeat;
          mask-composite: exclude;
}
.bar, .bar .mark svg, .bar .count { transition: background-color .3s ease, color .3s ease, border-color .3s ease, opacity .3s ease; }
.scrolled .bar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; color: var(--ink); }
.scrolled .bar::before { opacity: 1; }
.scrolled .bar .mark svg { opacity: 0; }
.scrolled .bar .icon-btn:hover { background: rgba(0, 0, 0, .07); }
.scrolled .bar .count { background: var(--ink); color: #fff; }
html.scrolled body::before { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Menu drawer */
.menu { margin: 0 auto 0 0; width: min(420px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-right: 1px solid var(--line); background: var(--coal); color: var(--bone); }
.menu[open] { animation: slide-in .35s cubic-bezier(.2, .7, .2, 1); }
.menu::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
@keyframes slide-in { from { transform: translateX(-100%); } }
.menu-inner { display: flex; flex-direction: column; height: 100%; padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.75rem calc(env(safe-area-inset-bottom, 0px) + 1.5rem); }
.menu-close { margin-left: -10px; }
.menu nav { margin-top: 2rem; }
.menu-label { color: var(--stone); font-size: .85rem; margin: 0 0 .5rem; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu-drops a { display: flex; align-items: center; gap: .9rem; padding: .35rem 0; font: 700 1.9rem/1.2 var(--display); text-decoration: none; text-transform: uppercase; }
.menu-drops a:hover { color: var(--accent); }
.dot { width: .6rem; height: .6rem; border-radius: 999px; background: var(--accent); flex: none; }
.menu-pages { margin-top: 2rem !important; border-top: 1px solid var(--line); padding-top: 1rem !important; }
.menu-pages a { display: block; padding: .45rem 0; text-decoration: none; font-size: 1.15rem; }
.menu-foot { margin-top: auto; color: var(--stone); font: 700 .85rem/1.4 var(--display); letter-spacing: .06em; }

/* Toast */
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); translate: -50% 0; display: flex; gap: 1rem; align-items: center; max-width: calc(100vw - 2rem); padding: .75rem .75rem .75rem 1.25rem; border-radius: 999px; background: var(--bone); color: var(--ink); font-weight: 500; animation: toast 4.5s ease forwards; }
.toast a { padding: .4rem .9rem; border-radius: 999px; background: var(--ink); color: var(--bone); text-decoration: none; font-weight: 600; white-space: nowrap; }
@keyframes toast { 0% { opacity: 0; transform: translateY(12px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }

/* Hero: the lineup comes into focus */
.hero { padding-bottom: clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero-art { width: min(1400px, 100%); max-height: 72vh; object-fit: contain; margin-inline: auto; filter: blur(22px) brightness(.4); transform: scale(1.04); animation: focus 2.2s cubic-bezier(.2, .7, .2, 1) .15s forwards; }
@keyframes focus { to { filter: none; transform: none; } }
.hero-copy { text-align: center; margin-top: clamp(-4rem, -6vw, -1rem); position: relative; }
.hero-copy .statement { font-size: clamp(1.7rem, 4.6vw, 3.6rem); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2rem; }

/* Drops on the home page */
.drops { display: grid; gap: clamp(3rem, 8vw, 6rem); padding-block: clamp(2rem, 6vw, 4rem); }
.drop-row { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
@media (min-width: 820px) {
  .drop-row { grid-template-columns: 1fr 1fr; }
  .drop-row:nth-child(even) .drop-art { order: 2; }
}
.drop-art { position: relative; display: block; aspect-ratio: 1; border-radius: 28px; background: radial-gradient(circle at 50% 55%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 62%), var(--coal); overflow: hidden; }
.drop-art img { width: 100%; height: 100%; object-fit: contain; padding: 6%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.drop-art:hover img { transform: scale(1.04) rotate(-1deg); }
.drop-copy { display: grid; gap: 1rem; justify-items: start; }
.drop-copy .statement { color: var(--accent); }
.drop-name { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0; color: var(--stone); font-weight: 600; text-decoration: none; }
.status { padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--bone); }
.status-open { border-color: color-mix(in oklab, var(--accent) 60%, transparent); }
.status-closed { color: var(--stone); }

/* About teaser */
.teaser { max-width: 760px; padding-block: clamp(3rem, 8vw, 6rem); border-top: 1px solid var(--line); text-align: center; display: grid; justify-items: center; gap: 1.25rem; }
.teaser p { color: var(--stone); margin: 0; }

/* Drop page */
.drop-head { padding-block: clamp(3rem, 9vw, 7rem) clamp(2rem, 5vw, 3.5rem); background: radial-gradient(ellipse 80% 70% at 50% 0%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%); }
.drop-head .statement { color: var(--accent); font-size: clamp(2.2rem, 7vw, 5.4rem); margin-top: 1rem; max-width: 16ch; }
.lede { max-width: 56ch; color: var(--stone); font-size: 1.15rem; margin: 1.5rem 0 0; }

/* Product grid + cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); padding-bottom: clamp(3rem, 8vw, 5rem); }
.card { display: grid; gap: .6rem; text-decoration: none; }
.card-art { position: relative; aspect-ratio: 1; border-radius: 22px; background: radial-gradient(circle at 50% 55%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 65%), var(--coal); overflow: hidden; }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 7%; transition: opacity .4s ease, transform .5s ease; }
.card-art .alt { opacity: 0; }
@media (hover: hover) {
  .card:hover .card-art img:first-child:not(:only-child) { opacity: 0; }
  .card:hover .card-art .alt { opacity: 1; }
  .card:hover .card-art img { transform: scale(1.03); }
}
.card-body { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding-inline: .25rem; }
.card h3 { margin: 0; font: 700 1.15rem/1.3 var(--display); }
.price { font-weight: 600; white-space: nowrap; }
.price.big { font-size: 1.4rem; margin: .25rem 0 0; }
.card-note { margin: -.4rem 0 0; padding-inline: .25rem; color: var(--stone); font-size: .9rem; }

/* Product page */
.pdp { display: grid; gap: 2rem; padding-block: 1.5rem clamp(3rem, 8vw, 5rem); }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.25fr 1fr; gap: 4rem; align-items: start; } }
.gallery { display: grid; gap: 1rem; }
.gallery figure { margin: 0; aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: radial-gradient(circle at 50% 55%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 65%), var(--coal); }
.gallery img { width: 100%; height: 100%; object-fit: contain; padding: 5%; }
/* Photos after the front and back are close-ups: shown edge to edge at their own shape */
.gallery figure.detail { aspect-ratio: 4 / 3; background: var(--coal); }
.gallery figure.detail img { object-fit: cover; padding: 0; }
.gallery figure.detail:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 900px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:not(.detail) { grid-column: 1 / -1; } }
@media (max-width: 899px) {
  .gallery { grid-auto-flow: column; grid-auto-columns: 88%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -1.25rem; padding-inline: 1.25rem; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery figure { scroll-snap-align: center; }
}
.buy { display: grid; gap: .75rem; align-content: start; }
@media (min-width: 900px) { .buy { position: sticky; top: calc(var(--bar) + 2rem); } }
.buy .statement.small { color: var(--accent); }
.buy h1 { font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.1 var(--display); margin: .5rem 0 0; }
.ship-note { margin: 0; color: var(--stone); }
.variation-note { margin: .25rem 0 0; padding-left: .85rem; border-left: 2px solid var(--accent); color: var(--stone); font-size: .9rem; line-height: 1.5; }
.buy-form { display: grid; gap: 1rem; margin-top: .75rem; }
.sizes { border: 0; margin: 0; padding: 0; }
.sizes legend { padding: 0; margin-bottom: .6rem; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-grid; place-items: center; min-width: 3.4rem; height: 3rem; padding-inline: 1rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s; }
.pill span:hover { border-color: var(--bone); }
.pill input:checked + span { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill input:disabled + span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.qty-row { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: end; }
.qty-row label { display: grid; gap: .3rem; font-size: .85rem; color: var(--stone); }
select { height: 3rem; padding-inline: .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--coal); }
.desc { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: .75rem; }
.desc p { margin: 0; }
.facts { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .35rem; color: var(--stone); font-size: .95rem; }
.more { border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 6vw, 4rem); }
.more h2 { margin-bottom: 1.5rem; }

/* Cart + confirmation */
.cart, .confirm { padding-block: clamp(2.5rem, 7vw, 5rem); }
.lines { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 88px 1fr auto; grid-template-areas: "art info total" "art qty qty"; gap: .5rem 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); align-items: start; }
.lines.compact .line { grid-template-columns: 1fr auto; grid-template-areas: "info total"; }
.line-art { grid-area: art; aspect-ratio: 1; border-radius: 14px; background: radial-gradient(circle at 50% 55%, #2a2a2c, var(--coal) 70%); overflow: hidden; }
.line-art img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.line-info { grid-area: info; display: grid; gap: .1rem; }
.line-info a { text-decoration: none; }
.line-qty { grid-area: qty; display: flex; align-items: center; gap: 1rem; }
.line-qty select { height: 2.5rem; }
.line-total { grid-area: total; font-weight: 600; }
.summary { display: grid; gap: .6rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 20px; background: var(--coal); }
.summary .row { display: flex; justify-content: space-between; }
.summary .total { font-size: 1.2rem; font-weight: 600; border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .25rem; }
.summary p { margin: 0; }
.summary form { margin-top: .5rem; }
.confirm { display: grid; gap: 1.25rem; justify-items: start; }
.confirm p { margin: 0; }
.confirm .lines { width: 100%; margin: 0; }
.confirm .summary { width: 100%; }
.confirm-mark { width: 56px; height: 62px; fill: var(--bone); }

/* Story pages */
.story { padding-block: clamp(3rem, 8vw, 6rem); font-size: 1.15rem; }
.story h1.statement { margin-bottom: 2rem; }
.story h2.statement { font-size: clamp(1.4rem, 3.4vw, 2.1rem); margin: 3.5rem 0 1.25rem; }
.story p { margin: 0 0 1.1rem; color: color-mix(in oklab, var(--bone) 88%, var(--stone)); }
.story .pull { font: 700 clamp(1.3rem, 3vw, 1.7rem)/1.35 var(--display); color: var(--bone); margin-block: 2rem; }
.story .btn { margin-top: 2rem; }
.policy h2 { font: 700 1.35rem/1.3 var(--display); margin: 2.5rem 0 .75rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: clamp(3rem, 8vw, 5rem) max(1.25rem, env(safe-area-inset-left, 0px)) 2rem; }
.foot-motto { text-align: center; font-size: clamp(1.6rem, 6vw, 4.5rem); margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.foot-grid { width: min(1240px, 100%); margin-inline: auto; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot nav { display: grid; gap: .35rem; align-content: start; }
.foot nav a { color: var(--stone); text-decoration: none; }
.foot nav a:hover { color: var(--bone); }
.foot-label { margin: 0 0 .25rem; font-weight: 600; }
.foot-mark svg { width: 40px; height: 44px; fill: var(--bone); }
.foot-legal { width: min(1240px, 100%); margin: 3rem auto 0; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art { animation: none; filter: none; transform: none; }
  .menu[open], .toast { animation: none; }
  .bar, .bar::before, .bar .mark svg, .bar .count { transition: none; }
  .btn, .card-art img, .drop-art img { transition: none; }
}
