/* Second Shift Coffee. The shop at night: an espresso rail that stays with you, a latte under one
   lamp, an order slip, and a punch card whose punches are crescent moons cut out of the card. */
:root {
  --moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.4 14.1A8.6 8.6 0 1 1 9.9 3.6 6.7 6.7 0 0 0 20.4 14.1Z'/%3E%3C/svg%3E");
  --espresso: #2B1A11;
  --espresso-2: #3A2618;
  --espresso-3: #1E120B;
  --oat: #EFE3CF;
  --oat-ink: #6B5644;
  --cream: #FBF7EF;
  --enamel: #2E5CA6;
  --enamel-deep: #244A88;
  --lamp: #F0B867;
  --line-dark: rgba(239, 227, 207, .16);
  --line-light: #D9CBB3;
  --rail-w: 340px;
  --display: "Petrona", Georgia, serif;
  --text: "Gantari", "Segoe UI", sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .94 0 0 0 0 .89 0 0 0 0 .81 .2 0 0 0 -.07'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .1 0 0 0 0 .07 .3 0 0 0 -.09'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--espresso); color: var(--espresso); font: 400 18px/1.55 var(--text); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--enamel); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
button, select, label, summary, [role="tab"] { cursor: pointer; }
button, select, input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--enamel); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cream); color: var(--espresso); padding: 12px 18px; font-weight: 600; }
.skip:focus, .skip:hover { top: 12px; color: var(--espresso); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px;
  background: var(--enamel); color: var(--cream); border: 2px solid var(--enamel); border-radius: 4px;
  font: 600 18px/1.1 var(--text); text-decoration: none; transition: background-color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--enamel-deep); border-color: var(--enamel-deep); color: var(--cream); }
.btn-wide { width: 100%; min-height: 56px; }
.place { gap: 8px; }
.place-time { font-weight: 500; color: #DCE5F4; }
.btn-line { background: transparent; color: var(--enamel); }
.btn-line:hover { background: var(--enamel); color: var(--cream); }

/* Logo: an enamel mug whose handle is a crescent moon, and the Second Shift wordmark whose S curves are drawn at the
   mug wall's weight. Every size is in em, so one font-size scales the whole lockup. */
.brand { display: flex; align-items: center; text-decoration: none; color: var(--cream); min-height: 44px; }
.brand:hover { color: var(--cream); }
.lg { display: inline-flex; align-items: center; gap: .3em; color: #2B1A11; --lg-desc: #5A4433; }
.lg-on-dark { color: #FBF7EF; --lg-desc: #CDBBA0; --lg-moon: #FBF7EF; --lg-rim: #FBF7EF; }
.lg-icon { width: 2.1em; height: 2.1em; flex: none; display: block; margin: -.2em -.06em -.2em -.1em; }
.lg-type { display: grid; justify-items: start; gap: .1em; }
.lg-word { display: block; font: 700 1em/1 'Petrona', Georgia, serif; letter-spacing: -.01em; white-space: nowrap; }
.lg-word > span { white-space: nowrap; }
.lg-S { display: inline-block; width: .562em; height: 1em; vertical-align: -.2em; overflow: visible; }
.lg-desc { display: block; font: 500 max(15px, .54em)/1 'Gantari', 'Segoe UI', sans-serif; letter-spacing: .02em; color: var(--lg-desc); }
.lg-stack { display: inline-grid; justify-items: start; gap: .08em; }
.lg-stack .lg-icon { margin: 0 0 0 -.14em; width: 1.9em; height: 1.9em; }
.brand-rail .lg { font-size: 28px; }

/* Phone header: hidden while the rail is on screen */
.top { display: none; }
.scrim { display: none; }

/* Page grid: rail, hero, order slip */
main {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) 430px;
  grid-template-areas: "rail hero order" "rail board board" "rail ahead ahead" "rail rewards rewards" "rail study study";
}
.rail {
  grid-area: rail; align-self: start; position: sticky; top: 0; height: 100svh; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 26px; padding: 28px 28px 30px;
  background-color: var(--espresso); color: var(--oat);
  background-image: radial-gradient(130% 55% at 20% -6%, rgba(240, 184, 103, .2), transparent 62%), var(--grain-dark);
  border-right: 1px solid rgba(0, 0, 0, .35);
  scrollbar-width: thin;
}
.rail-nav { display: grid; }
.rail-nav a { display: flex; align-items: center; min-height: 44px; color: var(--cream); font-weight: 500; font-size: 18px; text-decoration: none; border-top: 1px solid var(--line-dark); }
.rail-nav a:last-child { border-bottom: 1px solid var(--line-dark); }
.rail-nav a:hover { color: var(--lamp); }
.rail-nav a::before { content: ""; width: 16px; height: 16px; margin-right: 10px; flex: none; background: var(--oat); opacity: .22; -webkit-mask: var(--moon) center / contain no-repeat; mask: var(--moon) center / contain no-repeat; transition: opacity .2s ease; }
.rail-nav a[aria-current="location"] { color: var(--lamp); font-weight: 600; }
.rail-nav a[aria-current="location"]::before { opacity: 1; background: var(--lamp); }
.status-pill { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--oat); }
.status-big { margin-top: 6px; font: 700 40px/1 var(--display); color: var(--cream); letter-spacing: -.01em; }
.status-time { margin-top: 8px; font-size: 17px; color: #D8C8B0; }
.daybar { position: relative; margin-top: 40px; }
.daybar-track { position: relative; height: 16px; border-radius: 2px; background: repeating-linear-gradient(-45deg, #120A06 0 4px, #24160E 4px 8px); box-shadow: inset 0 0 0 1px rgba(239, 227, 207, .25); }
.daybar-open { position: absolute; left: 25%; right: 0; top: 0; bottom: 0; border-radius: 0 2px 2px 0; background: linear-gradient(90deg, #F6EDDD 0%, #EFE3CF 34%, #F0B867 66%, #6A86BE 86%, #2E5CA6 100%); }
.tick { position: absolute; top: 0; height: 6px; left: var(--t); width: 1.5px; margin-left: -.75px; background: rgba(43, 26, 17, .5); }
.daybar-now { position: absolute; top: -5px; bottom: -5px; left: var(--x); width: 3px; margin-left: -1.5px; background: var(--cream); box-shadow: 0 0 0 1.5px var(--espresso); }
.daybar-now::before { content: ""; position: absolute; left: 50%; top: -9px; width: 12px; height: 8px; margin-left: -6px; background: var(--cream); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.now-tag { position: absolute; top: -32px; left: var(--x); transform: translateX(-50%); font-size: 15px; font-weight: 600; line-height: 1; color: var(--cream); white-space: nowrap; }
.daybar-labels { position: relative; height: 22px; margin-top: 8px; font-size: 15px; color: #CDBBA0; }
.daybar-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.daybar-labels span:nth-child(1) { left: 25%; }
.daybar-labels span:nth-child(2) { left: 50%; }
.daybar-labels span:nth-child(3) { right: 0; left: auto; transform: none; }

/* The punch card */
.card {
  position: relative; color: var(--espresso);
  background-color: var(--oat); background-image: var(--grain), linear-gradient(170deg, #F4EADA, #E8D9C1);
  border-radius: 7px; padding: 18px 20px 16px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .42), 0 2px 0 rgba(0, 0, 0, .25);
}
.card::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid rgba(46, 92, 166, .5); border-radius: 4px; pointer-events: none; }
.card-rail { transform: rotate(-2.2deg); margin: 4px 2px 0; }
.card-title { font: 700 21px/1.1 var(--display); color: var(--enamel); padding-right: 64px; }
.card-no { position: absolute; top: 20px; right: 20px; font-size: 16px; font-weight: 600; color: var(--oat-ink); font-variant-numeric: tabular-nums; }
.punches { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 6px; }
.punches li { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.punches svg { width: 82%; height: 82%; overflow: visible; transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--rot, 0deg)); }
.punches .spot { fill: none; stroke: var(--enamel); stroke-width: 1.3; stroke-dasharray: 2.2 1.8; }
.punches .hole { fill: url(#hole-shade); stroke: rgba(0, 0, 0, .6); stroke-width: .9; display: none; }
.punches .edge { fill: #FFF8EA; display: none; }
.punches li.punched .spot { display: none; }
.punches li.goal .goal-cup { fill: none; stroke: var(--enamel); stroke-width: 1.8; stroke-linejoin: round; }
.punches li.goal.punched .goal-cup { fill: var(--enamel); }
.punches li.punched .edge { display: inline; }
.punches li.punched .hole { display: inline; }
.punches .chad { position: absolute; inset: 9%; display: none; pointer-events: none; }
.punches .chad svg { width: 100%; height: 100%; fill: var(--oat); }
.card-left { font-weight: 600; font-size: 17px; line-height: 1.3; }
.card.is-full .card-left { color: var(--enamel); }

/* Hero: the latte under the lamp */
.hero { grid-area: hero; position: relative; height: 100svh; min-height: 760px; overflow: hidden; background: #060403; color: var(--cream); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(1.12); transform-origin: 50% 0; filter: saturate(.95) contrast(1.05); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 11, 6, .55) 0%, rgba(20, 11, 6, 0) 46%), linear-gradient(0deg, rgba(20, 11, 6, .45) 0%, rgba(20, 11, 6, 0) 22%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; padding: 64px 52px 0; max-width: 780px; }
h1 { font-size: clamp(56px, 6.4vw, 108px); line-height: .9; letter-spacing: -.025em; color: var(--cream); }
h1 span { display: block; }
.lede { margin-top: 24px; max-width: 32ch; font-size: 20px; line-height: 1.5; color: #EADCC4; }
.hero-cta { display: none; margin-top: 24px; }

/* Order slip */
.order { grid-area: order; height: 100svh; min-height: 760px; overflow-y: auto; display: flex; flex-direction: column; padding: 26px 30px 22px 34px;
  -webkit-mask: radial-gradient(circle 5px at 0 11px, transparent 98%, #000 100%) 0 0 / 100% 22px repeat-y; mask: radial-gradient(circle 5px at 0 11px, transparent 98%, #000 100%) 0 0 / 100% 22px repeat-y; background: var(--cream); color: var(--espresso); scrollbar-width: thin; }
.order-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 2px solid var(--espresso); }
.order-head h2 { font-size: 40px; line-height: 1; letter-spacing: -.015em; }
.ready { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 600; color: var(--oat-ink); }
.ready svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.order-form { display: flex; flex-direction: column; flex: 1; }
.of-step { display: flex; flex-direction: column; flex: 1; }
.of-step[hidden] { display: none; }
.of-cell { margin: 0; padding: 11px 0 0; border: 0; min-width: 0; }
.of-cell legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-weight: 600; font-size: 16px; }
.of-cell legend + * { clear: both; }
.drinks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.opt-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 7px 12px; border: 1.5px solid var(--line-light); border-radius: 2px; background: #FFFDF8; font-size: 17px; line-height: 1.15; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.opt-box b { font-weight: 500; }
.drinks .opt-box b { font: 700 17px/1.15 var(--display); }
.drinks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; border-top: 1.5px solid var(--line-light); }
.drinks .opt-box { border-width: 0 0 1.5px; border-radius: 0; background: transparent; padding: 8px 5px; gap: 5px; min-height: 47px; }
.drinks .opt-box::before { width: 13px; height: 13px; }
.drinks .opt input:checked + .opt-box { border-bottom-color: var(--enamel); }
.opt-box small { font-size: 15px; color: var(--oat-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt:hover .opt-box { border-color: var(--enamel); background: #F4EDE1; }
.opt:hover input:checked + .opt-box { background: var(--enamel-deep); }
.opt input:checked + .opt-box { background: var(--enamel); border-color: var(--enamel); color: var(--cream); }
.opt-box::before { content: ""; flex: none; width: 15px; height: 15px; margin-right: 2px; background: rgba(107, 86, 68, .28); -webkit-mask: var(--moon) center / contain no-repeat; mask: var(--moon) center / contain no-repeat; transition: background-color .15s ease; }
.opt input:checked + .opt-box::before { background: var(--cream); }
.opt input:disabled + .opt-box::before { background: transparent; }
.opt-box b { margin-right: auto; }
.sizes .opt-box::before { position: absolute; top: 7px; left: 8px; margin: 0; }

.sizes .opt-box { position: relative; }
.sizes .opt-box b { margin-right: 0; }
.opt input:checked + .opt-box small { color: #DCE5F4; }
.opt input:focus-visible + .opt-box { outline: 3px solid var(--enamel); outline-offset: 2px; }
.opt input:disabled + .opt-box { cursor: not-allowed; background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(107, 86, 68, .12) 6px 8px); border-style: dashed; color: var(--oat-ink); }
.opt input:disabled + .opt-box b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.opt:has(input:disabled) { cursor: not-allowed; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sizes .opt-box { flex-direction: column; justify-content: center; gap: 1px; min-height: 58px; text-align: center; }
.sizes .opt-box svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.sizes .opt:nth-child(1) svg { transform: scale(.78); }
.sizes .opt:nth-child(3) svg { transform: scale(1.18); }
.milks { display: flex; flex-wrap: wrap; gap: 6px; }
.milks .opt-box { min-height: 44px; padding: 6px 14px; }
.of-two { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 16px; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid #BCA98C; border-radius: 4px;
  background: #FFFDF8; color: var(--espresso); font-size: 17px; font-weight: 400;
}
.field select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%232B1A11' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--enamel); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: #A3311E; border-width: 2px; }
.of-total { margin-top: auto; padding-top: 12px; }
.total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 12px; border-top: 1.5px solid var(--espresso); }
.total-label { font-weight: 600; font-size: 17px; }
.total [data-total] { font: 700 34px/1 var(--display); font-variant-numeric: tabular-nums; }
.total-note { margin: 2px 0 10px; font-size: 17px; color: var(--oat-ink); }
.form-error { margin-bottom: 10px; font-size: 17px; font-weight: 600; color: #9A2E1B; }
.of-done { justify-content: flex-start; gap: 14px; padding: 24px 0 8px; }
.ticket { margin: 4px 0 0; border-top: 1.5px dashed var(--espresso); border-bottom: 1.5px dashed var(--espresso); padding: 6px 0; }
.ticket div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.ticket dt { font-size: 16px; color: var(--oat-ink); font-weight: 600; }
.ticket dd { margin: 0; font-size: 18px; font-weight: 600; text-align: right; }
.ticket-tag { align-self: flex-start; padding: 8px 14px; background: var(--enamel); color: var(--cream); font: 700 22px/1 var(--display); border-radius: 3px; transform: rotate(-3deg); }
.of-done h3 { font-size: 36px; line-height: 1.05; }
.of-done p:not(.ticket-tag) { font-size: 19px; line-height: 1.5; }
.done-punch { padding: 12px 14px; border: 1.5px dashed var(--enamel); border-radius: 4px; color: var(--enamel); font-weight: 600; }
.of-done .btn { align-self: flex-start; }

/* Menu board: oat paper */
.board, .study { background-color: var(--oat); background-image: var(--grain); padding: 120px 64px; color: var(--espresso); }
.board { grid-area: board; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px 56px; align-items: end; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(56px, 6.8vw, 112px); line-height: .9; letter-spacing: -.03em; }
.sec-head p { font-size: 19px; max-width: 50ch; }
.switch { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px 0 10px; border: 1.5px solid var(--espresso); border-radius: 26px; background: transparent; font-weight: 600; font-size: 17px; }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #CDBBA0; transition: background-color .2s ease; }
.switch-track span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--cream); transition: transform .2s ease; }
.switch[aria-pressed="true"] .switch-track { background: var(--enamel); }
.switch[aria-pressed="true"] .switch-track span { transform: translateX(18px); }
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; align-items: start; }
.board-col h3 { font-size: 34px; line-height: 1.05; padding-bottom: 10px; border-bottom: 2px solid var(--espresso); }
.board-col h3:not(:first-child) { margin-top: 44px; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 16px 0; border-bottom: 1px solid rgba(43, 26, 17, .18); font-size: 17px; }
.it-name { font-weight: 600; font-size: 19px; }
.it-price { font: 700 21px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.it-desc { grid-column: 1 / -1; color: var(--oat-ink); line-height: 1.45; }
.tag { grid-column: 1 / -1; justify-self: start; margin-top: 6px; padding: 3px 10px; border: 1.5px solid var(--enamel); border-radius: 13px; font-size: 15px; font-weight: 600; color: var(--enamel); }
.tag-out { border-color: var(--oat-ink); color: var(--oat-ink); }
.items li.sold .it-name { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.items li.later .tag { background: var(--enamel); color: var(--cream); }
.board-photo { margin: 32px 0 0; }
.board-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; filter: saturate(.92) contrast(1.04) sepia(.06); }

/* Order ahead: the shelf */
.ahead { grid-area: ahead; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--cream); color: var(--espresso); }
.ahead-photo { margin: 0; min-height: 620px; }
.ahead-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.ahead-text { align-self: center; padding: 96px 64px; }
.ahead-text h2 { font-size: clamp(44px, 4.4vw, 72px); line-height: .95; letter-spacing: -.02em; margin-bottom: 24px; }
.ahead-text p { font-size: 19px; max-width: 46ch; margin-bottom: 16px; }
.ahead-text .btn { margin-top: 12px; }

/* Rewards: the night band */
.rewards {
  grid-area: rewards; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding: 120px 64px;
  background-color: var(--espresso); background-image: radial-gradient(70% 90% at 80% 40%, rgba(240, 184, 103, .16), transparent 70%), var(--grain-dark); color: var(--oat);
}
.rewards h2 { font-size: clamp(56px, 6.8vw, 112px); line-height: .9; letter-spacing: -.03em; color: var(--cream); margin-bottom: 26px; }
.rewards-text p { font-size: 20px; max-width: 42ch; margin-bottom: 16px; color: #E6D7BF; }
.card-big { max-width: 480px; width: 100%; justify-self: center; padding: 30px 32px 26px; transform: rotate(2.5deg); }
.card-big::after { content: ""; position: absolute; right: 0; bottom: 0; width: 124px; height: 116px; border-radius: 0 0 7px 0; pointer-events: none;
  background: radial-gradient(circle at 75px 75px, transparent 0 63px, rgba(120, 72, 38, .2) 65px, rgba(120, 72, 38, .07) 70px, transparent 73px); }
.card-big .card-title { font-size: 32px; padding-right: 90px; }
.card-big .card-no { top: 34px; right: 32px; font-size: 17px; }
.card-big .punches { gap: 12px 12px; margin: 24px 0 18px; }
.card-big .card-left { font-size: 22px; }

/* Study space */
.study { grid-area: study; }
.study-grid { display: grid; grid-template-columns: 1.25fr 1fr .8fr; grid-template-rows: auto auto; gap: 20px; align-items: start; }
.study-grid figure { margin: 0; }
.study-grid img { width: 100%; object-fit: cover; border-radius: 4px; filter: saturate(.92) contrast(1.04) sepia(.05); }
.st-a { grid-row: span 2; }
.st-a img { aspect-ratio: 3 / 4; }
.st-b img { aspect-ratio: 4 / 5; }
.st-c img { aspect-ratio: 2 / 3; }
.st-note { grid-column: 2 / -1; align-self: end; font: 700 28px/1.3 var(--display); max-width: 26ch; }

/* Footer */
.foot { position: relative; z-index: 1; background-color: var(--espresso-3); background-image: var(--grain-dark); color: var(--oat); padding: 64px 64px 0 calc(var(--rail-w) + 64px); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.foot p { font-size: 17px; color: #DCCDB4; }
.foot-name { margin-bottom: 14px; }
.foot .lg { font-size: 32px; }
.foot-h { font-weight: 600; font-size: 17px; color: var(--cream) !important; margin-bottom: 6px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cream); font-weight: 600; text-decoration: none; font-size: 19px; }
.foot a:hover { color: var(--lamp); }
.demo-line { border-top: 1px solid var(--line-dark); padding: 22px 0 28px; font-size: 17px; }

/* Load moment: the day fills to now, then the card is punched hole by hole */
@media (prefers-reduced-motion: no-preference) {
  .daybar { animation: now-slide 1.1s .25s cubic-bezier(.22, 1, .36, 1) both; }
  .punches li.punched .hole { animation: punch .32s calc(.75s + var(--i) * 120ms) cubic-bezier(.22, 1, .36, 1) both; transform-box: fill-box; transform-origin: center; }
  .punches li.just-punched .hole { animation: punch .32s .1s cubic-bezier(.22, 1, .36, 1) both; }
  .punches li.just-punched .chad { display: block; animation: chad .9s .12s cubic-bezier(.4, 0, .6, 1) both; }
}
@property --x { syntax: "<percentage>"; inherits: true; initial-value: 75%; }
@keyframes now-slide { from { --x: 25%; } }
@keyframes punch { 0% { transform: scale(.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes chad { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(14px, 70px) rotate(70deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* Mid widths: the order slip moves under the photo */
@media (max-width: 1279px) {
  :root { --rail-w: 300px; }
  main { grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-areas: "rail hero" "rail order" "rail board" "rail ahead" "rail rewards" "rail study"; }
  .rail { padding: 24px 22px; gap: 22px; }
  .status-big { font-size: 34px; }
  .hero { height: auto; min-height: 0; aspect-ratio: 5 / 4.6; }
  .hero-img { transform: none; object-position: 50% 32%; }
  .order { height: auto; min-height: 0; overflow: visible; padding: 40px 48px 48px; }
  .order-form .of-step[data-step="pick"] { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-content: start; }
  .order-form .of-step[data-step="pick"][hidden] { display: none; }
  .of-step[data-step="pick"] > .of-cell:first-child { grid-row: span 3; }
  .of-total { grid-column: 1 / -1; }
  .board, .study, .rewards { padding: 96px 48px; }
  .board-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .board-col:nth-child(3) { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .board-col:nth-child(3) h3:not(:first-child) { margin-top: 0; }
  .board-col:nth-child(3) h3:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .board-col:nth-child(3) .items:nth-of-type(2) { grid-column: 2; grid-row: 2; }
  .ahead-text { padding: 72px 48px; }
  .foot { padding-left: calc(var(--rail-w) + 48px); padding-right: 48px; }
}

/* Phones and small tablets: the rail becomes a block under the photo */
@media (max-width: 959px) {
  .top {
    display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 50; height: 64px; padding: 0 12px 0 16px;
    background-color: var(--espresso); background-image: var(--grain-dark); border-bottom: 1px solid rgba(0, 0, 0, .4); color: var(--oat);
  }
  .brand-top .lg { font-size: 23px; }
  .brand-top .lg-desc { display: none; }
  .brand-top .lg-word { white-space: normal; line-height: .96; }
  .top-status { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 15px; font-weight: 600; color: #E2D3BA; white-space: nowrap; }
  .burger {
    display: inline-grid; place-content: center; gap: 5px; width: 48px; height: 48px; padding: 0; flex: none;
    background: transparent; border: 0; border-radius: 4px;
  }
  .burger span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: var(--cream); transition: transform .2s ease, opacity .2s ease; }
  .burger:hover { background: rgba(239, 227, 207, .1); }
  .burger[aria-expanded="true"] { background: transparent; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .burger:focus-visible { outline-color: var(--lamp); }
  .menu {
    position: absolute; left: 0; right: 0; top: 100%; padding: 6px 20px 22px;
    min-height: calc(100svh - 64px); display: flex; flex-direction: column;
    background-color: var(--espresso); background-image: var(--grain-dark); border-bottom: 1px solid rgba(0, 0, 0, .5);
  }
  .menu[hidden] { display: none; }
  .menu-list { list-style: none; margin: 0 0 16px; padding: 0; }
  .menu-list li { font-size: 17px; }
  .menu-list a { display: flex; align-items: center; min-height: 52px; color: var(--cream); font: 700 26px/1 var(--display); text-decoration: none; border-bottom: 1px solid rgba(239, 227, 207, .24); }
  .menu-list a:hover { color: var(--lamp); }
  .menu-cta { width: 100%; min-height: 54px; }
  .card-menu { margin-top: 24px; padding: 17px 19px 15px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; box-shadow: none; }
  .card-menu .card-title { font-size: 19px; padding: 0; }
  .card-menu .card-no { position: static; font-size: 16px; }
  .card-menu .punches { grid-column: 1 / -1; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 10px 0 8px; }
  .card-menu .card-left { grid-column: 1 / -1; }
  .menu-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(239, 227, 207, .24); font-size: 17px; line-height: 1.4; color: #DCCDB4; }
  .menu-foot b { display: block; font-weight: 600; color: var(--cream); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(20, 11, 6, .72); }
  .scrim[hidden] { display: none; }

  main { display: flex; flex-direction: column; }
  .hero { order: 1; height: auto; min-height: 0; aspect-ratio: auto; }
  .rail { order: 2; position: static; height: auto; overflow: visible; gap: 18px; padding: 22px 18px 26px; border-right: 0; }
  .order { order: 3; }
  .board { order: 4; }
  .ahead { order: 5; }
  .rewards { order: 6; }
  .study { order: 7; }
  .brand-rail, .rail-nav, .status-pill, .status-big { display: none; }
  .status-time { margin: 0; font-size: 17px; }
  .daybar { margin-top: 36px; }
  .card-rail { transform: none; margin: 0; padding: 17px 19px 15px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; }
  .card-rail .card-title { font-size: 19px; padding: 0; }
  .card-rail .card-no { position: static; font-size: 16px; }
  .card-rail .punches { grid-column: 1 / -1; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 10px 0 8px; }
  .card-rail .card-left { grid-column: 1 / -1; }
  .hero-img { position: absolute; }
  .hero-img { object-position: 50% 61%; transform: scale(1.5); transform-origin: 0 0; }
  .hero-copy { padding: 28px 20px 26px; min-height: 640px; display: flex; flex-direction: column; }
  .hero .lede { max-width: 27ch; }
  h1 { font-size: clamp(44px, 12.8vw, 70px); line-height: .94; }
  .lede { font-size: 18px; margin-top: 16px; }
  .hero-cta { display: inline-flex; align-self: flex-start; margin-top: 22px; }
  .hero::after { background: linear-gradient(180deg, rgba(20, 11, 6, .55) 0%, rgba(20, 11, 6, 0) 46%), linear-gradient(0deg, var(--espresso) 0%, rgba(43, 26, 17, 0) 18%); }
  .order { padding: 32px 18px 36px; -webkit-mask: none; mask: none; }
  .order-form .of-step[data-step="pick"] { display: flex; }
  .order-head h2 { font-size: 36px; }
  .drinks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .of-two { grid-template-columns: 1fr; }
  .board, .study { padding: 72px 18px; }
  .sec-head { grid-template-columns: 1fr; margin-bottom: 36px; }
  .sec-head h2 { font-size: 60px; }
  .switch { grid-column: 1; }
  .board-grid { grid-template-columns: 1fr; gap: 44px; }
  .board-col:nth-child(3) { display: block; }
  .board-col:nth-child(3) h3:not(:first-child) { margin-top: 44px; }
  .board-photo img { aspect-ratio: 16 / 10; }
  .ahead { grid-template-columns: 1fr; }
  .ahead-photo { min-height: 0; }
  .ahead-photo img { aspect-ratio: 4 / 3; height: auto; }
  .ahead-text { padding: 48px 18px 64px; }
  .rewards { grid-template-columns: 1fr; gap: 40px; padding: 72px 18px; }
  .card-big { transform: rotate(1.5deg); padding: 22px 20px 18px; }
  .card-big .card-title { font-size: 25px; }
  .card-big .card-no { top: 24px; right: 20px; font-size: 15px; }
  .card-big .card-left { font-size: 19px; }
  .study-grid { grid-template-columns: 1fr 1fr; }
  .st-a { grid-column: 1 / -1; grid-row: auto; }
  .st-a img { aspect-ratio: 4 / 3; }
  .st-note { grid-column: 1 / -1; font-size: 24px; }
  .foot { padding: 56px 18px 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}
.ts-short { display: none; }
@media (max-width: 399px) {
  .ts-long { display: none; }
  .ts-short { display: inline; }
}
@media (max-width: 420px) {
  .drinks .opt-box { flex-wrap: wrap; align-content: center; row-gap: 1px; min-height: 52px; }
  .drinks .opt-box b { min-width: 0; }
  .drinks .opt-box small { flex-basis: 100%; padding-left: 18px; }
}
@media (max-width: 599px) {
  .hero-img { object-position: 50% 0%; transform: translate(40px, 60px) scale(1.15); }
  .hero-copy { min-height: 500px; }
  .hero .lede { max-width: none; }
}
@media (max-width: 359px) {
  .brand-top .lg { font-size: 21px; }
  .card-rail .punches { gap: 3px; }
}
