/* ──────────────────────────────────────────────────────────────
   MARLOWE. Store typography: Inter throughout, heavy tight headings,
   pill buttons, small caps labels. The stage is pinned while the
   page scrolls through four bands, and the dark panel takes the side
   whenever the rail stops on a shirt.
   ────────────────────────────────────────────────────────────── */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --paper: #f5f5f4;
  --ink: #111113;
  --muted: #62636a;
  --faint: #9a9ba3;
  --line: rgba(17, 17, 19, .12);
  --overlay: rgba(18, 19, 22, .82);
  --pad: clamp(20px, 4.5vw, 72px);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3 { font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(30px, 3.8vw, 50px); margin-top: 12px; }
.lead { margin-top: 14px; max-width: 54ch; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.7; color: var(--muted); }
.tag { display: inline-block; padding: 5px 10px; border-radius: 6px; background: rgba(17, 17, 19, .07); font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 26px; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -.01em; transition: opacity .3s, transform .3s;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid rgba(17, 17, 19, .25); }
.btn--icon { width: 50px; padding: 0; }

/* ══════════════ nav ══════════════ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px var(--pad); color: #fff; transition: background .35s, color .35s, border-color .35s; border-bottom: 1px solid transparent;
}
.nav.is-stuck { background: rgba(245, 245, 244, .92); color: var(--ink); backdrop-filter: blur(12px); border-color: var(--line); }
.nav__logo { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.nav__links { display: flex; gap: clamp(16px, 2.6vw, 34px); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.nav__links a:hover { opacity: 1; }
.nav__icons { display: flex; gap: 18px; }
.nav__icons svg { width: 20px; height: 20px; }

/* ══════════════ the rail ══════════════ */
.rail { position: relative; height: 460svh; background: #878c93; }
.rail__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.stage { position: absolute; inset: 0; }
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.clip.is-front { opacity: 1; }

.hero__copy { position: absolute; left: var(--pad); bottom: clamp(36px, 7svh, 72px); z-index: 4; max-width: 560px; color: #fff; transition: opacity .5s, transform .5s; }
.hero__copy.is-hidden { opacity: 0; transform: translateY(10px); pointer-events: none; }
.hero__copy .tag { background: rgba(255, 255, 255, .16); color: #fff; }
.hero__copy h1 { margin-top: 14px; font-size: clamp(44px, 6.6vw, 96px); }
.hero__lead { margin-top: 12px; font-size: clamp(13.5px, 1.05vw, 16px); line-height: 1.6; color: rgba(255, 255, 255, .82); max-width: 42ch; }
.scrollhint { margin-top: 26px; display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.scrollhint span { width: 1px; height: 34px; background: rgba(255, 255, 255, .5); animation: drop 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ── the dark overlay, on the side ── */
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 5; width: min(460px, 38vw);
  display: flex; flex-direction: column; color: #fff;
  background: var(--overlay); backdrop-filter: blur(10px);
  transform: translateX(6%); opacity: 0; pointer-events: none;
  transition: transform .7s cubic-bezier(.16, 1, .3, 1), opacity .5s ease;
}
.panel.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.panel__photo { flex: 0 0 auto; height: 40svh; overflow: hidden; background: #2a2c31; }
.panel__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 10%; }
.panel__body { padding: 22px 28px 26px; overflow: auto; }
.panel .tag { background: rgba(255, 255, 255, .14); color: #fff; }
.panel__body h2 { margin-top: 12px; font-size: clamp(26px, 2.3vw, 36px); }
.panel__rating { margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .75); letter-spacing: .02em; }
.panel__price { margin-top: 12px; display: flex; align-items: baseline; gap: 10px; }
.panel__price strong { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.panel__price s { font-size: 14px; color: rgba(255, 255, 255, .5); }
.panel__price em { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 5px; background: #fff; color: var(--ink); }
.panel__desc { margin-top: 12px; font-size: 13px; line-height: 1.65; color: rgba(255, 255, 255, .78); }
.panel__opt { margin-top: 16px; }
.panel__label { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.panel__label b { color: #fff; font-weight: 600; }
.swatches { margin-top: 8px; display: flex; gap: 10px; }
.swatches span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.swatches span.is-active { border-color: #fff; }
.sizes { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.sizes button { min-width: 44px; padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); font-size: 12.5px; font-weight: 600; transition: background .25s, color .25s; }
.sizes button.is-active, .sizes button:hover { background: #fff; color: var(--ink); border-color: #fff; }
.panel__row { margin-top: 18px; display: flex; gap: 10px; }
.panel__row .btn { flex: 1; background: #fff; color: var(--ink); }
.panel__row .btn--icon { flex: 0 0 50px; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.panel__perks { margin-top: 12px; font-size: 11px; color: rgba(255, 255, 255, .5); }

/* outro */
.outro { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; background: rgba(18, 19, 22, .6); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .6s; }
.outro.is-open { opacity: 1; pointer-events: auto; }
.outro .tag { background: rgba(255, 255, 255, .14); color: #fff; }
.outro h2 { font-size: clamp(44px, 6.5vw, 92px); }
.outro__row { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.outro .btn { background: #fff; color: var(--ink); }
.outro .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }

/* ══════════════ sections ══════════════ */
section:not(.rail) { padding: clamp(72px, 9vw, 130px) var(--pad); }
.section-head { max-width: 720px; }
.three__grid { margin-top: clamp(34px, 4vw, 56px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; aspect-ratio: 3 / 3.4; object-fit: cover; object-position: center 8%; }
.card__body { padding: 20px 20px 22px; }
.card__body h3 { margin-top: 10px; font-size: 21px; }
.card__rating { margin-top: 6px; font-size: 12px; color: var(--muted); }
.card__row { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.card__row strong { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.card__row s { margin-left: 8px; font-size: 13px; color: var(--faint); }
.card__row a { font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .25s, border-color .25s; }
.card__row a:hover { color: var(--ink); border-color: var(--ink); }

.fit { background: #ecebe8; }
.fit__cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.fit__table div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fit__table dt { font-weight: 800; }
.fit__table dd { color: var(--muted); }

.visit { text-align: center; }
.visit .lead { margin-left: auto; margin-right: auto; }
.visit .btn { margin-top: 26px; }

.foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 22px var(--pad) 26px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.foot a { color: var(--muted); }

/* ══════════════ phones ══════════════ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .three__grid, .fit__cols { grid-template-columns: 1fr; }
  .hero__copy { bottom: 60px; }
  .hero__copy h1 { font-size: 46px; }
  /* the overlay sits below the shirt, photo beside the words */
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 46svh;
    display: grid; grid-template-columns: 1fr 34%; grid-template-rows: 1fr;
    transform: translateY(6%);
  }
  .panel.is-open { transform: translateY(0); }
  .panel__photo { order: 2; height: 100%; }
  .panel__photo img { object-position: center 6%; }
  .panel__body { order: 1; padding: 16px 16px 18px; }
  .panel__body h2 { font-size: 22px; margin-top: 8px; }
  .panel__rating { font-size: 11.5px; }
  .panel__price strong { font-size: 20px; }
  .panel__desc { display: none; }
  .panel__opt { margin-top: 10px; }
  .sizes button { min-width: 36px; padding: 7px 9px; font-size: 11.5px; }
  .panel__row { margin-top: 12px; }
  .panel__row .btn { padding: 11px 14px; font-size: 13px; }
  .panel__perks { display: none; }
}
