:root {
  --paper: #FAFAF7;
  --paper-2: #F1F0EC;
  --rule: #E6E4DE;
  --ink: #16181D;
  --ink-2: #4A4C53;
  --pencil: #6B6C72;
  --tint: #2440B3;
  --tint-dark: #1A3190;
  --tomato: #C8412A;
  --tomato-wash: #F6DED8;
  --eucalypt: #2F6B4F;
  --aubergine: #4B2A55;
  --aubergine-light: #D9BEE6;
  --mustard: #B8861A;
  --slate: #3E5568;
  --night: #131316;
  --night-2: #222328;
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--ui); }
::selection { background: var(--tint); color: #FFFFFF; }
a { color: var(--tint); text-underline-offset: 3px; }
a:hover { color: var(--tint-dark); }
:focus-visible { outline: 3px solid var(--tint); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #FFFFFF; padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
.skip:hover { color: #FFFFFF; }
.visually-hidden, .trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); max-width: 1280px; margin: 0 auto; }
.wordmark { font-family: var(--display); font-weight: 900; font-size: 30px; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; text-transform: uppercase; line-height: 1; }
.wordmark:hover { color: var(--ink); }
.wordmark.small { font-size: 22px; }
.top-cta { font-weight: 600; font-size: 15px; text-decoration: none; padding: 10px 2px; }

/* Hero */
.hero { max-width: 1280px; margin: 0 auto; padding: clamp(24px, 5vw, 64px) var(--gutter) clamp(56px, 8vw, 112px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(56px, 8.2vw, 112px); line-height: 0.92; letter-spacing: -0.005em; text-transform: uppercase; max-width: 11ch; }
.lede { margin-top: 28px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 36em; }
.fine { margin-top: 14px; font-size: 14px; color: var(--pencil); }

.join { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.join input[type="email"] { flex: 1 1 240px; min-width: 0; height: 54px; padding: 0 16px; font: inherit; color: var(--ink); background: #FFFFFF; border: 1.5px solid var(--ink); border-radius: 14px; }
.join input[type="email"]::placeholder { color: #6B6C72; }
.join button { flex: 0 0 auto; height: 54px; padding: 0 22px; font: 600 17px var(--ui); color: #FFFFFF; background: var(--tint); border: none; border-radius: 14px; cursor: pointer; box-shadow: 0 6px 18px rgba(36, 64, 179, 0.28); transition: background 0.2s, transform 0.2s var(--ease); }
.join button:hover { background: var(--tint-dark); }
.join button:active { transform: translateY(1px); }
.join button[disabled] { opacity: 0.65; cursor: progress; }
.join-status { flex-basis: 100%; min-height: 1.5em; font-size: 15px; color: var(--ink-2); }
.join-status.is-ok { color: var(--eucalypt); font-weight: 600; }
.join-status.is-bad { color: #B3261E; font-weight: 600; }

/* Phone */
.hero-phone { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-phone figcaption { font-size: 13px; color: var(--pencil); text-align: center; }
.phone { width: 360px; background: var(--ink); border-radius: 52px; padding: 11px; box-shadow: 0 30px 60px -20px rgba(22, 24, 29, 0.45), 0 2px 6px rgba(22, 24, 29, 0.2); }
.screen { height: 700px; border-radius: 42px; background: var(--paper); overflow: hidden; display: flex; flex-direction: column; position: relative; font-family: var(--ui); }
.s-head { padding: 48px 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.s-back { font-size: 15px; color: var(--tint); }
.s-title { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; }
.s-sub { font-size: 12px; color: #5F6068; }
.s-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; }
.s-progress b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-bar { flex: 1; height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.s-bar i { display: block; height: 100%; width: 100%; background: var(--tomato); transform-origin: left; transition: transform 0.5s var(--ease); }

.aisle .blade { display: flex; align-items: baseline; gap: 10px; padding: 5px 18px; background: var(--tomato-wash); color: #9E2F1C; transition: background 0.4s, color 0.4s; }
.aisle .num { font-family: var(--display); font-weight: 900; font-size: 28px; line-height: 1; transition: font-size 0.4s var(--ease); }
.aisle .name { font-family: var(--display); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 0.03em; display: flex; flex-direction: column; }
.aisle .name small { font-family: var(--ui); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
.aisle.is-current .blade { background: var(--tomato); color: #FFFFFF; align-items: center; gap: 12px; padding: 4px 18px 6px; }
.aisle.is-current .num { font-size: 68px; }
.aisle.is-current .name { font-size: 22px; line-height: 1.05; }
.aisle.is-current .name small { color: #FFFFFF; }
.aisle ul { list-style: none; margin: 0; padding: 0 18px; }
.aisle li { display: flex; align-items: center; gap: 12px; min-height: 50px; border-bottom: 1px solid var(--rule); overflow: hidden; max-height: 70px; transition: max-height 0.35s var(--ease), min-height 0.35s var(--ease), opacity 0.3s, border-color 0.3s; }
.aisle li:last-child { border-bottom-color: transparent; }
.aisle li.is-gone { max-height: 0; min-height: 0; opacity: 0; border-bottom-color: transparent; }
.tick { flex: 0 0 auto; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 7px; background: transparent; padding: 0; cursor: pointer; position: relative; }
.tick::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px; border: solid #FFFFFF; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform 0.2s var(--ease); }
.is-done .tick { background: var(--tint); border-color: var(--tint); }
.is-done .tick::after { transform: rotate(45deg) scale(1); }
.aisle:not(.is-current) .tick { width: 22px; height: 22px; border-width: 1.5px; border-color: #8A8B92; }
.item { flex: 1; font-size: 16px; display: flex; flex-direction: column; position: relative; }
.item::after { content: ""; position: absolute; left: 0; top: 0.68em; width: 100%; height: 2px; background: var(--tint); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.item small { font-size: 12px; color: #5F6068; }
.aisle:not(.is-current) .item { color: #3C3E45; font-size: 15px; }
.is-done .item::after { transform: scaleX(1); }
.qty { font-weight: 600; }

.s-foot { margin-top: auto; border-top: 1px solid var(--rule); padding: 10px 14px 26px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.trolley { font-size: 12px; color: #5F6068; text-decoration: line-through; text-decoration-color: var(--tint); text-decoration-thickness: 1.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghost { display: flex; align-items: center; gap: 8px; height: 46px; border: 1.5px solid var(--tint); border-radius: 13px; padding: 0 7px 0 12px; }
.ghost span { color: #6E6F76; font-size: 16px; }
.ghost small { color: #6E6F76; font-size: 12px; flex: 1; }
.ghost b { background: var(--tint); color: #FFFFFF; font-weight: 600; font-size: 14px; border-radius: 9px; padding: 7px 13px; }

/* Aisle sections */
.big-blade { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding: clamp(6px, 1vw, 12px) var(--gutter); color: #FFFFFF; overflow: hidden; }
.big-blade .num { font-family: var(--display); font-weight: 900; font-size: clamp(110px, 17vw, 230px); line-height: 0.82; letter-spacing: -0.02em; padding-top: 0.04em; }
.big-blade h2 { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 7vw, 96px); line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; }
.tomato .big-blade { background: var(--tomato); }
.ink .big-blade, .checkout .big-blade { background: var(--ink); }
.aubergine .big-blade { background: var(--aubergine); }
.slate .big-blade { background: var(--slate); }

.aisle-body { max-width: 1280px; margin: 0 auto; padding: clamp(48px, 7vw, 104px) var(--gutter) clamp(64px, 9vw, 136px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.copy { display: flex; flex-direction: column; gap: 18px; max-width: 34em; }
.copy h3 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
.copy p { font-size: 18px; color: var(--ink-2); }
.copy .note { font-size: 16px; color: var(--pencil); font-style: italic; padding-top: 14px; border-top: 1px dashed #B9B9BE; }

/* Trips demo */
.trips { background: #FFFFFF; border: 1px solid var(--rule); border-radius: 22px; padding: 22px; box-shadow: 0 18px 40px -24px rgba(22, 24, 29, 0.35); }
.trip-switch { display: inline-flex; background: var(--paper-2); border-radius: 12px; padding: 4px; gap: 4px; }
.trip-switch button { font: 600 15px var(--ui); color: var(--ink-2); background: transparent; border: none; border-radius: 9px; padding: 10px 16px; min-height: 44px; cursor: pointer; }
.trip-switch button[aria-pressed="true"] { background: var(--tomato); color: #FFFFFF; }
.trip-list { list-style: none; margin: 16px 0 0; padding: 0; position: relative; }
.trip-list li { display: flex; align-items: center; gap: 14px; height: 48px; border-bottom: 1px solid var(--rule); font-size: 17px; background: #FFFFFF; }
.trip-list li:last-child { border-bottom: none; }
.where { flex: 0 0 auto; width: 34px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 20px; color: var(--pencil); border: 1.5px dashed #A9AAB0; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.is-sorted .where { background: var(--tomato); color: #FFFFFF; border: 1.5px solid var(--tomato); }
.trip-caption { margin-top: 14px; font-size: 14px; color: var(--pencil); font-style: italic; }

/* Today mini */
.mini { background: var(--paper); border: 1px solid var(--rule); border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px -24px rgba(22, 24, 29, 0.35); }
.mini-blade { font-family: var(--display); text-transform: uppercase; line-height: 1; padding: 8px 20px; }
.mini-blade.now { background: var(--ink); color: #FFFFFF; font-weight: 900; font-size: 34px; }
.mini-blade.later { background: #E9E8E3; font-weight: 800; font-size: 24px; }
.mini-blade.week { background: var(--paper-2); color: #3C3E45; font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.mini-row { display: flex; align-items: center; gap: 14px; min-height: 62px; padding-left: 20px; border-bottom: 1px solid var(--rule); background: #FFFFFF; }
.mini-row span { flex: 1; display: flex; flex-direction: column; font-size: 16px; font-weight: 600; }
.mini-row small { font-size: 13px; font-weight: 400; color: #5F6068; }
.mini-row small.pencil { color: var(--pencil); font-style: italic; }
.mini-row .box { width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 7px; flex: 0 0 auto; }
.mini-row .act { color: var(--tint); font-size: 15px; padding: 0 6px; }
.mini-row .tab { width: 8px; height: 30px; border-radius: 4px 0 0 4px; flex: 0 0 auto; }
.tab.slate { background: var(--slate); } .tab.green { background: var(--eucalypt); } .tab.red { background: var(--tomato); }

/* Taste: the night aisle */
.aubergine .aisle-body { max-width: none; background: var(--night); color: #EDEDEA; padding-left: max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter))); }
.aubergine .copy p { color: #B9BBC2; }
.aubergine .copy .note { color: #A4A6AD; border-top-color: #3A3B42; }
.rarity { background: var(--aubergine); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 14px; color: #F3E9F7; }
.rarity-head { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: #FFFFFF; display: flex; flex-direction: column; gap: 6px; }
.rarity-head small { font-family: var(--ui); font-weight: 400; font-size: 12px; color: #CDB6D8; letter-spacing: 0.04em; text-transform: uppercase; }
.r-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 92px; gap: 14px; align-items: center; font-size: 15px; color: #CDB6D8; }
.r-bar { height: 10px; background: #6A4677; border-radius: 5px; overflow: hidden; }
.r-bar i { display: block; height: 100%; min-width: 5px; background: #A98AB8; border-radius: 5px; }
.r-row b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.r-row.rare { color: #FFFFFF; font-weight: 600; }
.r-row.rare .r-bar i { background: #FFFFFF; }
.rarity-foot { font-size: 15px; color: #E6D3EE; padding-top: 12px; border-top: 1px solid #6A4677; }
.rarity-foot b { color: #FFFFFF; }

/* What it knows */
.knows { display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--rule); border-radius: 22px; padding: 10px 22px 14px; box-shadow: 0 18px 40px -24px rgba(22, 24, 29, 0.35); }
.knows p { font-size: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.knows p:last-child { border-bottom: none; }
.knows p.pencil { color: var(--pencil); font-style: italic; }
.ask { display: flex; flex-direction: column; gap: 2px; border: 1.5px dashed #8A8B92; border-radius: 14px; padding: 14px; margin: 10px 0 6px; }
.ask b { font-size: 17px; }
.ask small { font-size: 13px; color: var(--pencil); font-style: italic; }
.ask-actions { display: flex; gap: 16px; margin-top: 10px; align-items: center; }
.keep { background: var(--tint); color: #FFFFFF; font-weight: 600; font-size: 15px; border-radius: 11px; padding: 9px 18px; }
.nope { color: var(--tint); font-weight: 600; font-size: 15px; }

/* Checkout */
.checkout-body { max-width: 760px; margin: 0 auto; padding: clamp(56px, 8vw, 112px) var(--gutter) clamp(72px, 10vw, 140px); display: flex; flex-direction: column; gap: 16px; }
.checkout-body h3 { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.checkout-body > p { font-size: 18px; color: var(--ink-2); max-width: 34em; }
.checkout .join { margin-top: 12px; }

.foot { border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px var(--gutter) 30px; font-size: 14px; color: var(--pencil); flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero, .aisle-body { grid-template-columns: minmax(0, 1fr); }
  .hero-phone { order: 2; }
}

@media (max-width: 420px) {
  .phone { zoom: 0.86; }
  .join button { flex: 1 1 100%; }
  .r-row { grid-template-columns: 80px minmax(0, 1fr) 82px; gap: 10px; font-size: 14px; }
  .trips, .rarity { padding: 18px; }
}

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