/* Join page. Hero positions are in design pixels at 390 wide; --u is one design pixel on this screen.
   They live here, not in style attributes, because the page policy blocks inline styles. */
:root { --u: calc(min(100vw, 430px) / 390); }
.page { max-width: 430px; margin: 0 auto; overflow-x: clip; }
/* The logo and sign-in link used to sit in the top 58 design pixels of the hero; the locked header carries them now. */
.hero { position: relative; height: calc(var(--u) * 548); margin-top: calc(var(--u) * -58); overflow: hidden; }
.landing .site-footer { padding-bottom: 84px; }
.ground, .mug { position: absolute; display: block; will-change: transform; }
.ground { left: calc(var(--u) * 91.66); top: calc(var(--u) * 90.19); width: calc(var(--u) * 379.08); height: calc(var(--u) * 505.44); mix-blend-mode: multiply; }
.mug { left: calc(var(--u) * 168); top: calc(var(--u) * 285); width: calc(var(--u) * 250.09); height: calc(var(--u) * 250.09); }
.type { position: absolute; inset: 0; will-change: transform; }
.type h1 { margin: 0; }
.joinour { position: absolute; left: calc(var(--u) * 25); top: calc(var(--u) * 62); font-size: calc(var(--u) * 19); font-family: var(--display); font-weight: 600; letter-spacing: 0.14em; line-height: 1; }
.hl { position: absolute; left: calc(var(--u) * 24); display: flex; align-items: flex-end; overflow: hidden; line-height: 1; white-space: nowrap; letter-spacing: 0; }
.hl-row { display: contents; }
.hl-in { display: block; margin-bottom: -0.1em; will-change: transform; }
.hl-1 { top: calc(var(--u) * 92); height: calc(var(--u) * 119.01); font-size: calc(var(--u) * 167.16); letter-spacing: -0.01em; margin-left: calc(var(--u) * -2); }
.hl-2 { top: calc(var(--u) * 220.01); height: calc(var(--u) * 60.46); font-size: calc(var(--u) * 83.52); color: var(--gray); }
.hl-3 { top: calc(var(--u) * 288.47); height: calc(var(--u) * 60.46); font-size: calc(var(--u) * 83.52); color: var(--gray); }
.fade { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }

.sticker { position: absolute; transform: rotate(-10deg); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18)); will-change: transform; }
.sticker svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-hero { left: calc(var(--u) * 6); top: calc(var(--u) * 392); width: calc(var(--u) * 118); height: calc(var(--u) * 118); font-size: calc(var(--u) * 118); }
.st-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-family: var(--display); text-transform: uppercase; }
.st-s { font-weight: 600; font-size: 0.113em; letter-spacing: 0.16em; line-height: 1.1; margin-right: -0.16em; }
.st-n { display: flex; align-items: flex-start; font-weight: 800; font-size: 0.5em; line-height: 0.88; margin-left: -0.03em; }
.st-n.long { font-size: 0.3em; }
.st-d { font-size: 0.41em; line-height: 1; margin: 0.08em 0.03em 0 0; }

.pad { padding: 0 24px; }
.pad .lede { margin: 0 0 14px; text-wrap: balance; }
.pad .notice { margin: 0 0 14px; }
.legal { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.jump { display: inline-flex; align-items: center; height: 44px; margin-top: 4px; font-size: 15px; }
.page section { padding: 56px 24px 0; }
.page section h2 { margin: 0; font-size: 46px; line-height: 0.94; letter-spacing: 0.005em; }
.sub { margin: 14px 0 0; line-height: 1.45; color: var(--body); text-wrap: pretty; }

.pass { margin: 28px auto 0; width: 250px; padding: 18px 18px 16px; border: 2px solid var(--ink); border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 14px 30px rgba(12, 12, 12, 0.1); will-change: transform; }
.pass img { height: 34px; width: auto; align-self: flex-start; }
.pass .sample { width: 190px; height: 190px; }
.pass .sample svg { display: block; width: 100%; height: 100%; }
.pass p { margin: 0; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 19px; letter-spacing: 0.04em; line-height: 1; white-space: nowrap; }
.pass small { font-size: 12px; color: var(--muted); }

.count { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.count b { font-family: var(--display); font-weight: 800; font-size: 84px; line-height: 0.8; min-width: 1.05em; font-variant-numeric: tabular-nums; }
.count span { font-size: 15px; color: var(--body); }
.dots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 9px; margin-top: 20px; }
.dot { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--ink); background: var(--ink); transition: background-color 0.18s ease-out, border-color 0.18s ease-out, transform 0.18s ease-out; }
.dot.off { border-color: var(--line); background: #fff; transform: scale(0.86); }

.steps { margin-top: 22px; }
.step { position: relative; padding: 18px 0; }
.rule { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: left center; }
.step-in { display: flex; gap: 16px; align-items: flex-start; }
.num { width: 26px; flex-shrink: 0; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 0.9; color: var(--gray); }
.step h3 { margin: 0; font-size: 22px; }
.step p { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--body); text-wrap: pretty; }

.clubs-h, .club-coffee { display: none; }
.latte { position: relative; margin: 56px 24px 0; padding: 28px 0 0; border-top: 3px solid var(--ink); }
.latte h2 { margin: 0; font-size: 46px; line-height: 0.94; }
.latte .mask { display: block; overflow: hidden; }
.latte .mask > span { display: block; will-change: transform; }
.latte .sub { max-width: 215px; min-height: 96px; font-size: 15px; }
.st-latte { right: -4px; top: 122px; width: 112px; height: 112px; font-size: 112px; transform: rotate(8deg); }
/* No CSS transition here: the scroll motion moves this button, and a transition makes it settle 14px low. */
.latte .btn { margin-top: 20px; transition: none; }
.latte .legal { margin-top: 14px; }

.faqs { margin-top: 20px; }
.faqs details { border-top: 1px solid var(--line); }
.faqs details:last-child { border-bottom: 1px solid var(--line); }
.faqs summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; font-weight: 500; }
.faqs summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--ink); transition: transform 0.2s ease-out; }
.plus::after { transform: rotate(90deg); }
.faqs details[open] .plus::after { transform: rotate(0); }
.faqs p { margin: 0 0 16px; font-size: 15px; color: var(--body); text-wrap: pretty; }
.close .btn { margin-top: 22px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; visibility: hidden; background: #fff; border-top: 1px solid var(--line); padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.3s; }
.bar.show { visibility: visible; transform: none; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bar .btn { max-width: 382px; min-height: 56px; margin: 0 auto; font-size: 22px; }

@media (prefers-reduced-motion: reduce) { .bar, .bar.show, .dot, .plus::before, .plus::after { transition: none; } }

/* ================= Tablet and desktop =================
   The hero is laid out again in design pixels, this time on a 1280-wide sheet: the headline is a two-line
   lock-up on the left (DAILY over COFFEE CLUB), the mug stands in front of its right end, and the sign-up
   text sits under the headline. The header carries the Join button, so the bottom bar is off. */
@media (min-width: 768px) {
  :root { --u: calc(min(100vw, 1440px) / 1280); }
  .page { max-width: none; }
  .landing .site-footer { padding-bottom: 0; }
  .bar { display: none; }

  .top { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: calc(var(--u) * 440) minmax(calc(var(--u) * 268), auto); max-width: 1440px; margin: 0 auto; }
  .hero { grid-area: 1 / 1 / 3 / 2; height: auto; margin-top: 0; }
  .pad { grid-area: 2 / 1; position: relative; z-index: 2; align-self: start; width: calc(var(--gutter) + var(--u) * 520); max-width: 100%; padding: 0 0 40px var(--gutter); }
  .pad .lede { font-size: clamp(1.0625rem, calc(var(--u) * 22), 1.5rem); margin-bottom: 18px; }
  .pad .btn { max-width: 400px; }

  .joinour { left: var(--gutter); top: calc(var(--u) * 30); font-size: calc(var(--u) * 26); }
  .hl { left: var(--gutter); }
  .hl-1 { top: calc(var(--u) * 68); height: calc(var(--u) * 230.7); font-size: calc(var(--u) * 324); margin-left: calc(var(--u) * -4); }
  .hl-row { position: absolute; left: var(--gutter); top: calc(var(--u) * 314); display: flex; gap: calc(var(--u) * 28); }
  .hl-row .hl { position: static; }
  .hl-2, .hl-3 { height: calc(var(--u) * 101.4); font-size: calc(var(--u) * 140); }

  .mug { left: auto; right: calc(var(--gutter) + var(--u) * 6); top: calc(var(--u) * 218); width: calc(var(--u) * 500); height: calc(var(--u) * 500); }
  .ground { left: auto; right: calc(var(--gutter) + var(--u) * (6 - 105.2)); top: calc(var(--u) * (218 - 389.5)); width: calc(var(--u) * 757.9); height: calc(var(--u) * 1010.5); }
  .st-hero { left: auto; right: calc(var(--gutter) + var(--u) * 424); top: calc(var(--u) * 548); width: calc(var(--u) * 150); height: calc(var(--u) * 150); font-size: calc(var(--u) * 150); }
  .fade { height: 40px; }

  .page section, .clubs { max-width: 1440px; margin: 0 auto; padding: clamp(72px, 9vw, 128px) var(--gutter) 0; }
  .page section h2, .clubs-h { font-size: clamp(52px, 6.2vw, 88px); line-height: 0.92; }
  .sub { font-size: clamp(1.0625rem, 1.5vw, 1.3rem); max-width: 30em; margin-top: 18px; }

  .reason { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; }
  .reason h2 { align-self: end; }
  .reason .pass { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0 auto; width: 320px; padding: 24px 24px 22px; gap: 14px; }
  .pass img { height: 42px; }
  .pass .sample { width: 240px; height: 240px; }
  .pass p { font-size: 24px; }
  .pass small { font-size: 14px; }

  .month { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; grid-template-rows: auto auto 1fr; }
  .month h2, .month .sub, .month .count { grid-column: 2; }
  .month .dots { grid-column: 1; grid-row: 1 / 4; align-self: center; width: 100%; max-width: 520px; margin: 0; gap: clamp(9px, 1.2vw, 16px); }
  .count { margin-top: 32px; gap: 14px; }
  .count b { font-size: clamp(96px, 11vw, 160px); }
  .count span { font-size: 17px; }

  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3.2vw, 48px); margin-top: 40px; }
  .step { padding: 24px 0 0; }
  .rule { height: 3px; background: var(--ink); }
  .step-in { flex-direction: column; gap: 14px; }
  .num { width: auto; font-size: clamp(64px, 7vw, 96px); line-height: 0.8; }
  .step h3 { font-size: clamp(24px, 2.4vw, 32px); }
  .step p { font-size: 16px; margin-top: 8px; max-width: 22em; }

  .clubs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(32px, 4vw, 64px); }
  .clubs-h { display: block; grid-column: 1 / -1; margin: 0; }
  .club { position: relative; display: flex; flex-direction: column; margin: 0; padding: 28px 0 0; border-top: 3px solid var(--ink); }
  .club h2, .club h3 { margin: 0; font-size: clamp(40px, 4.6vw, 64px); line-height: 0.94; }
  .latte .mask.or { display: none; }
  .club .sub, .latte .sub { max-width: none; min-height: clamp(96px, 10vw, 132px); margin-right: clamp(124px, 13vw, 170px); font-size: 16px; }
  .club .sticker { right: 0; top: clamp(84px, 8.4vw, 112px); width: clamp(112px, 11.5vw, 148px); height: clamp(112px, 11.5vw, 148px); font-size: clamp(112px, 11.5vw, 148px); }
  .st-club { transform: rotate(-8deg); }
  .club .sub { flex: 1 0 auto; }
  .club .btn { margin-top: 24px; min-height: 60px; }
  .club .legal { margin-top: 14px; min-height: 4.5em; }

  .qs { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 48px; align-items: start; }
  .faqs { margin-top: 0; }
  .faqs summary { min-height: 72px; font-size: 19px; }
  .faqs p { font-size: 17px; max-width: 36em; margin-bottom: 22px; }

  .close { text-align: center; }
  .close .sub { margin-left: auto; margin-right: auto; }
  .close .btn { max-width: 400px; margin: 28px auto 0; }
  .close .legal { max-width: 34em; margin-left: auto; margin-right: auto; }
}
/* Past the 1440 sheet the mug's ground shadow would stop at a hard edge, so it fades out instead. */
@media (min-width: 1441px) {
  .ground { -webkit-mask-image: linear-gradient(90deg, #000 58%, transparent 90%); mask-image: linear-gradient(90deg, #000 58%, transparent 90%); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .faqs summary { min-height: 64px; font-size: 17px; }
}
