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

/* Hero: live close badge on the photo */
.hero-photo { position: relative; }
.hero-badge { position: absolute; left: -14px; bottom: 22px; max-width: 240px; padding: 14px 16px 15px; background: var(--signal); color: var(--ink);
              border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-3deg); box-shadow: 0 10px 24px 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.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 { left: 8px; bottom: -22px; max-width: 210px; padding: 10px 12px 11px; }
  .hero-photo { margin-bottom: 14px; }
  .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 .hero-photo img { 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(-3deg); } }
  .hero .btn { animation: nudge 3.2s ease-in-out 3s infinite; }
  @keyframes nudge { 0%, 88%, 100% { transform: none; } 92% { transform: translateY(-4px); } 96% { transform: translateY(0); } }

  /* 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: "OPEN"; 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; } }
  .hero-photo.tilt img { transition: transform .15s ease-out; will-change: transform; }
}
@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%; } }
}
