/* Home page motion and scarcity layer. Every number comes from issue.js; motion is off under prefers-reduced-motion. */

/* Hero: live close badge under the card */
.hero-badge { max-width: 260px; padding: 10px 14px 11px; background: var(--signal); color: var(--ink);
              border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-2deg); box-shadow: 0 8px 20px rgb(8 16 70 / .35); }
.hero-badge[hidden] { display: none; }
.hero-badge b { display: block; font: 900 15px/1.15 var(--display); font-stretch: 125%; letter-spacing: -0.01em; }
.hero-badge span { display: block; margin-top: 4px; font: 700 14px/1.3 var(--text); }
.pulse { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: #e8362b; vertical-align: 1px; }
.hero h1 .hl { background: linear-gradient(transparent 62%, rgb(255 211 61 / .45) 62%); }

/* Stats band */
.stats { background: var(--cobalt-deep); color: var(--white); padding: 26px 0; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 24px; list-style: none; }
.stat-n { display: block; font: 900 clamp(30px, 4vw, 46px)/1 var(--display); font-stretch: 125%; letter-spacing: -0.02em; color: var(--signal); }
.stat-l { display: block; margin-top: 6px; font-size: 15px; line-height: 1.35; color: #dfe4ff; }
.stat-s { display: block; font-size: 12px; color: #aab4f0; }

/* Category picker */
.picker { margin: 0 0 30px; padding: 22px 24px 24px; background: var(--white); color: var(--ink); border-radius: 10px; border: 2px solid var(--ink); }
.picker label { display: block; font: 800 clamp(20px, 2.4vw, 26px)/1.15 var(--display); font-stretch: 112%; margin-bottom: 12px; }
.picker select { width: 100%; max-width: 420px; padding: 14px 12px; font: 700 17px/1.2 var(--text); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; }
.pick-out { margin-top: 16px; min-height: 0; }
.pick-out p { max-width: 40em; }
.pick-out .pick-head { font: 800 20px/1.25 var(--text); margin-bottom: 8px; }
.pick-out .cta-row { margin-top: 16px; }
.pick-out .btn-outline { border-color: var(--ink); }
.pick-ok { border-left: 6px solid var(--cobalt); padding-left: 14px; }
.pick-taken { border-left: 6px solid #e8362b; padding-left: 14px; }

/* Board: pinned polaroid-style tiles */
.spot-list li { position: relative; padding: 0; }
.spot-list li > a, .spot-list li > .tile { display: flex; flex: 1; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 16px 14px; text-decoration: none; color: inherit; }
.spot-list li.open::before { content: ""; position: absolute; left: 50%; top: -7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--signal);
                             border: 2px solid var(--ink); box-shadow: 0 2px 3px rgb(0 0 0 / .3); z-index: 1; }
.spot-list li.open { background: rgb(255 255 255 / .12); }
.spot-list li.open .status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #1a8f3c; }
.spot-list li.quiet .status::before { display: none; }
.spot-list li.open:hover, .spot-list li.open:focus-within { background: rgb(255 255 255 / .2); }
.spot-list li.mine { background: var(--signal); color: var(--ink); border-color: var(--ink); }
.spot-list li.mine .status { background: var(--ink); color: var(--signal); }
.spot-list li.mine .status::before { background: var(--signal); }
.spot-list .taken .tile::after { content: "TAKEN"; position: absolute; right: 12px; top: 8px; transform: rotate(-8deg); font: 900 13px/1 var(--display); letter-spacing: .08em;
                                 color: #ff8a80; border: 2px solid #ff8a80; border-radius: 4px; padding: 3px 6px; }

/* Sticky bar */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); color: var(--white); transform: translateY(110%); visibility: hidden; transition: transform .35s ease, visibility .35s; }
.sticky.on { transform: none; visibility: visible; }
.sticky-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.sticky p { font: 700 15px/1.3 var(--text); }
.sticky .btn { flex: none; padding: 12px 16px; font-size: 15px; }
body.has-sticky .foot { padding-bottom: 84px; }

@media (max-width: 960px) { .stats-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .hero-badge { max-width: 190px; padding: 8px 10px 9px; }
  .picker { padding: 18px 16px 20px; }
  .sticky p { font-size: 14px; }
  .sticky .btn { padding: 11px 12px; font-size: 14px; }

  /* Phone cuts: the same story in fewer screens */
  .stats { padding: 20px 0; }
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .stats-row li:nth-child(4) { display: none; }
  .stat-n { font-size: 27px; }
  .stat-l { font-size: 13px; }
  .problem .bars, .problem .split-copy p:nth-of-type(2) { display: none; }
  .steps { gap: 22px; }
  .steps li { flex-direction: row; align-items: flex-start; gap: 16px; }
  .step-num { flex: none; width: 34px; font-size: 44px; }
  .hand-photo { display: none; }
  .problem, .how, .included, .spots, .faq { padding: 44px 0; }
  .tiers { padding-bottom: 44px; }
  .section-title { margin-bottom: 20px; }
  .spot-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spot-list li > a, .spot-list li > .tile { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 84px; }
  .spot-list .taken .status { display: none; }
  .spot-list .taken .tile::after { position: static; transform: rotate(-4deg); }
}

@media (max-width: 360px) { .stats-row { gap: 10px; } .stat-n { font-size: 22px; } }

/* Motion: only for people who have not asked for less */
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 1.6s ease-out infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(232 54 43 / .6); } 100% { box-shadow: 0 0 0 11px rgb(232 54 43 / 0); } }

  .js .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: rise .6s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 55ms + 80ms); }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .js .hero .kicker, .js .hero .lead, .js .hero .cta-row { opacity: 0; animation: fade .7s ease forwards; }
  .js .hero .kicker { animation-delay: .05s; }
  .js .hero .lead { animation-delay: .75s; }
  .js .hero .cta-row { animation-delay: .95s; }
  @keyframes fade { to { opacity: 1; } }

  .js .stage { animation: land .9s cubic-bezier(.2, .9, .25, 1.1) .25s both; }
  @keyframes land { from { opacity: 0; transform: translateY(40px) rotate(2.5deg) scale(.96); } to { opacity: 1; transform: none; } }
  .js .hero-badge { animation: slap .5s cubic-bezier(.3, 1.6, .5, 1) 1.3s both; }
  @keyframes slap { from { opacity: 0; transform: rotate(-12deg) scale(1.5); } to { opacity: 1; transform: rotate(-2deg); } }

  /* Scroll reveals */
  .js .rv { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .split-photo.rv, .js .hand-photo.rv { transform: translateY(28px) rotate(-1.5deg); }
  .js .split-photo.rv.in, .js .hand-photo.rv.in { transform: none; }

  /* Board tiles drop in and get pinned */
  .js .spot-list li { opacity: 0; transform: translateY(-22px) rotate(var(--r, 0deg)); transition: opacity .45s ease, transform .55s cubic-bezier(.3, 1.5, .5, 1); transition-delay: calc(var(--i) * 55ms); }
  .js .spot-list.in li { opacity: 1; transform: rotate(var(--r2, 0deg)); }
  .spot-list li.open:hover { transform: rotate(0deg) translateY(-3px) !important; transition-delay: 0s; }
  .spot-list li.open .status::before { animation: blink 2s ease-in-out infinite; }
  @keyframes blink { 50% { opacity: .25; } }
  .picker-result-in { animation: fade .35s ease both; }
  .stat-n { font-variant-numeric: tabular-nums; }
}
@media (prefers-reduced-motion: reduce) {
  .sticky { transition: none; }
}

/* Round two: rotating category line, ticker, bars, live clock */
.hero-pick { margin: -8px 0 24px; font: 700 clamp(17px, 1.7vw, 20px)/1.3 var(--text); color: #e8ecff; }
.hero-pick[hidden] { display: none; }
.hero-pick b { display: inline-block; padding: 2px 10px; background: var(--signal); color: var(--ink); border-radius: 4px; }

.ticker { background: var(--signal); color: var(--ink); overflow: hidden; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.ticker[hidden] { display: none; }
.ticker-track { display: flex; width: max-content; font: 900 15px/1 var(--display); font-stretch: 112%; letter-spacing: .04em; text-transform: uppercase; }
.ticker-track span { padding: 14px 22px; white-space: nowrap; }
.ticker-track span::after { content: "ONLY ONE"; margin-left: 10px; padding: 3px 6px; background: var(--ink); color: var(--signal); border-radius: 3px; font-size: 12px; }

.bars { margin: 22px 0 8px; display: grid; gap: 12px; max-width: 34em; }
.bar { display: grid; grid-template-columns: 9.5em 1fr; align-items: center; gap: 4px 12px; font-weight: 700; font-size: 16px; }
.bar i { grid-column: 2; height: 22px; width: var(--w); min-width: 6px; background: var(--rule); border-radius: 4px; transform-origin: left; }
.bar-hot i { background: var(--cobalt); }
.bar em { grid-column: 2; font-style: normal; font-size: 14px; color: var(--muted); margin-top: -4px; }
.bar span { grid-row: 1 / span 2; }
@media (max-width: 480px) { .bar { grid-template-columns: 1fr; } .bar span, .bar i, .bar em { grid-column: 1; grid-row: auto; } }

.clock { background: var(--ink); color: var(--white); padding: clamp(48px, 7vw, 88px) 0; }
.clock[hidden] { display: none; }
.clock-in { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.clock-kicker { font: 800 14px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--signal); margin-bottom: 16px; }
.clock h2 { font-size: clamp(30px, 4.6vw, 54px); font-stretch: 125%; font-weight: 900; line-height: 1.02; }
.clock-sub { margin-top: 18px; color: #cfd5ee; max-width: 32em; }
.clock-box { padding: 24px; border: 2px solid var(--signal); border-radius: 10px; }
.clock-label { font-weight: 700; margin-bottom: 14px; color: #e8ecff; }
.clock-digits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.clock-digits div { text-align: center; padding: 12px 4px 10px; background: rgb(255 255 255 / .08); border-radius: 6px; }
.clock-digits b { display: block; font: 900 clamp(28px, 4vw, 42px)/1 var(--display); font-stretch: 125%; color: var(--signal); font-variant-numeric: tabular-nums; }
.clock-digits span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #aab4f0; }
@media (max-width: 860px) { .clock-in { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: scroll 38s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  @keyframes scroll { to { transform: translateX(-50%); } }
  #hero-pick.swap { animation: swap .45s cubic-bezier(.2, .9, .3, 1.2); }
  @keyframes swap { from { opacity: 0; transform: translateY(.6em) rotate(-2deg); } to { opacity: 1; transform: none; } }
  .js .bar i { transform: scaleX(0); transition: transform 1.3s cubic-bezier(.2, .8, .2, 1) .2s; }
  .js .bar-hot i { transition-delay: .6s; transition-duration: 1.9s; }
  .js .bars.in i { transform: none; }
  .btn { position: relative; overflow: hidden; }
  .btn::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / .55), transparent); transform: skewX(-18deg); animation: shine 4.5s ease-in-out 2s infinite; }
  @keyframes shine { 0%, 70% { left: -80%; } 100% { left: 140%; } }
  .clock-digits b.tick { animation: tick .35s ease; }
  @keyframes tick { 40% { transform: translateY(-4px); opacity: .6; } }
}
@media (prefers-reduced-motion: reduce) { .ticker { overflow-x: auto; } }

/* Highlighter: yellow marker that sweeps across key phrases */
mark.hl { color: var(--ink); padding: 0 .18em; margin: 0 -.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 3px;
          background: linear-gradient(100deg, rgb(255 211 61 / .9) 0%, #ffd33d 6%, #ffd33d 94%, rgb(255 211 61 / .85) 100%) no-repeat 0 82% / 100% 92%; }
.yl, .hero h1 .yl { color: var(--signal); }
.hero .lead mark.hl, .clock mark.hl { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .js mark.hl:not(.on) { background-size: 0% 92%; }
  .js mark.hl.on { animation: sweep .85s cubic-bezier(.3, .7, .2, 1) calc(var(--d, 0) * 220ms) both; }
  @keyframes sweep { from { background-size: 0% 92%; } to { background-size: 100% 92%; } }
}

/* Hero card: the real card, big, flips front and back, every ad is a tappable category */
/* Hero: copy on top, then the builder. Wide screens put the form beside the card; phones pin the card at the top while the form scrolls under it. */
.hero { padding-top: clamp(24px, 3vw, 40px); }
.hero-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(22px, 3vw, 32px); align-items: start; }
.hero-copy { max-width: 46em; }
.hero .kicker { margin-bottom: 12px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 54px); }
.hero .lead { margin: 16px 0 14px; max-width: 36em; }
.hero-now { margin: 0; font: 400 16px/1.5 var(--text); color: #e8ecff; }
.hero-now b { color: var(--white); }
.hero-now .link { margin-left: 6px; white-space: nowrap; }
.hero-pick { margin: 6px 0 0; min-height: 1.6em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 16px/1.6 var(--text); }
.builder { display: grid; gap: 20px; min-width: 0; }
.b-stage, .b-form { min-width: 0; }
.stage { perspective: 1800px; }
.card3d { position: relative; aspect-ratio: 1800 / 1000; transform-style: preserve-3d; transform: rotateY(var(--flip, 0deg)); }
.face { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; box-shadow: 0 22px 48px rgb(8 16 70 / .45); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--cobalt-deep); }
.face img { display: block; width: 100%; height: 100%; border-radius: 10px; }
.face-back { transform: rotateY(180deg); }
.hs { position: absolute; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; transition: background .15s, box-shadow .15s; }
.hs:hover, .hs:focus-visible { background: rgb(255 211 61 / .22); box-shadow: 0 0 0 3px var(--signal); }
.hs:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* The picked ad gets a yellow frame and the rest of the face dims, so there is no doubt which one the caption is about. */
.hs.on { z-index: 2; background: transparent; box-shadow: 0 0 0 4px var(--signal), 0 0 0 9999px rgb(8 16 70 / .6); }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 16px; min-height: 64px; }
.flip { display: inline-flex; padding: 4px; gap: 4px; background: rgb(255 255 255 / .14); border-radius: 999px; }
.flip button { padding: 10px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--white); font: 800 16px/1 var(--text); cursor: pointer; }
.flip button i { margin-left: 6px; font-style: normal; font-weight: 700; font-size: 13px; opacity: .8; }
.flip button.on { background: var(--signal); color: var(--ink); }
.flip button:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.stage-cap, .try-out { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font: 700 16px/1.35 var(--text); color: #e8ecff; }
.stage-cap { margin-top: 12px; min-height: 5em; }
.stage-cap b, .try-out b { color: var(--white); font-size: 18px; }
.stage-cap .st, .try-out .st { padding: 3px 9px; border-radius: 4px; font: 900 12px/1.2 var(--text); letter-spacing: .06em; text-transform: uppercase; background: var(--signal); color: var(--ink); }
.stage-cap .st.taken { background: #ff8a80; }
.stage-cap .btn, .try-out .btn { padding: 10px 16px; font-size: 15px; }
.stage-cap .wait-head, .try-out .wait-head { color: var(--white); }
.stage-cap .wait-say, .try-out .wait-say { color: #ffb4ab; }
.b-title { margin: 0 0 10px; font: 900 18px/1.2 var(--display); font-stretch: 125%; color: var(--white); }
.try { display: grid; gap: 12px; padding: 14px 16px 16px; background: rgb(255 255 255 / .12); border-radius: 12px; }
.try label { display: block; font: 800 14px/1.2 var(--text); color: #e8ecff; }
.try input, .try select { display: block; width: 100%; margin-top: 7px; padding: 13px 12px; font: 700 17px/1.2 var(--text); color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: 8px; }
.try input:focus-visible, .try select:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.try-out { margin-top: 14px; }
.live-fr { position: absolute; left: 0; top: 0; width: 1080px; height: 600px; border: 0; transform-origin: 0 0; pointer-events: none; }
@media (min-width: 1000px) {
  .builder { grid-template-columns: 330px minmax(0, 1fr); gap: 32px; align-items: start; }
  .b-form { order: -1; }
}
@media (max-width: 999px) {
  .builder { gap: 0; }
  .b-stage { display: contents; } /* so the pinned card sticks for the whole builder, form included */
  .stage-bar { margin-top: 12px; }
  .b-form { margin-top: 20px; }
  .stage-pin { position: sticky; top: var(--top-h, 64px); z-index: 6; margin: 0 calc(var(--gutter) * -1); padding: 8px var(--gutter) 10px; background: var(--cobalt); }
  .try { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .try .t-name { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .flip button { padding: 10px 14px; font-size: 15px; } .stage-cap, .try-out { font-size: 15px; } .hero-badge { max-width: 190px; } }
@media (prefers-reduced-motion: no-preference) {
  .js .card3d { transition: transform .22s ease-out; }
  .js .card3d.flipping { transition: transform .85s cubic-bezier(.3, .7, .2, 1); }
}
