/* Tokens: ios/Peakset/Design/DS.swift ("electric orange"). */
:root {
  --bg: #121214; --surface: #24242c; --line: #4a4a56; --text: #fff; --muted: #c9c9d4;
  --accent: #ff5e00; --soft: #ff8b3d; --blue: #00a1ff; --danger: #ff4766;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); line-height: 1.5;
  display: flex; flex-direction: column; overflow-x: hidden; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -80px; background: var(--text); color: #000; padding: 10px 14px; border-radius: 8px; z-index: 5; }
.skip:focus { top: 12px; }

/* ---------- backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 88% 12%, rgba(255,94,0,.34), transparent 65%),
    radial-gradient(50vmax 40vmax at 4% 96%, rgba(0,161,255,.24), transparent 68%),
    radial-gradient(30vmax 30vmax at 62% 78%, rgba(255,139,61,.12), transparent 70%); }
.backdrop::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 56px 56px,
              linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(75% 65% at 50% 40%, #000, transparent); mask-image: radial-gradient(75% 65% at 50% 40%, #000, transparent); }
.current { position: absolute; left: 0; bottom: 6%; width: 100%; height: 180px; overflow: visible; }
.current path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.current .base { stroke: rgba(255,94,0,.22); stroke-width: 1.5; }
.current .spark { stroke: var(--soft); stroke-width: 2.5; stroke-dasharray: 90 910; stroke-dashoffset: -420;
  filter: drop-shadow(0 0 8px var(--accent)); animation: run 6s linear infinite; }
@keyframes run { from { stroke-dashoffset: 90; } to { stroke-dashoffset: -910; } }

/* ---------- layout ---------- */
header, main, footer { width: min(1120px, 100% - 40px); margin-inline: auto; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 24px 0; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo .mark { width: 54px; }
.logo .word { width: 124px; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--soft);
  border: 1px solid rgba(255,94,0,.55); border-radius: 99px; padding: 5px 12px; white-space: nowrap; }
main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 440px); gap: 24px 72px;
  grid-template-areas: "intro card" "facts card"; align-content: center; padding-block: 48px; }
.intro { grid-area: intro; align-self: end; }
h1 { margin: 0; font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: .96; letter-spacing: -.03em; font-weight: 800; }
h1 span { display: block; width: fit-content; padding-right: .06em;
  background: linear-gradient(100deg, #ffb27a, var(--accent) 55%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 20px 0 0; max-width: 46ch; font-size: 1.125rem; color: var(--muted); }
.prize { margin: 20px 0 0; width: fit-content; max-width: 40ch; padding: 12px 18px; border-radius: 16px; font-size: 1.125rem; font-weight: 700;
  border: 1px solid var(--accent); background: rgba(255,94,0,.16); box-shadow: 0 0 32px rgba(255,94,0,.25); }
.facts { grid-area: facts; list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; align-self: start; }
.facts li { border-left: 2px solid var(--accent); padding-left: 14px; color: var(--muted); }
.facts li:last-child { border-color: var(--blue); }
.facts b { display: block; color: var(--text); }

/* ---------- glass card ---------- */
.card { grid-area: card; align-self: center; position: relative; padding: 32px; border-radius: 28px; border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 60px rgba(255,94,0,.12), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); }
.card::before { content: ""; position: absolute; top: -1px; left: 14%; right: 14%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--blue), transparent); }
h2 { margin: 0 0 8px; font-size: 1.6rem; line-height: 1.2; letter-spacing: -.02em; }
.card p { margin: 0 0 20px; color: var(--muted); }
.card p.fine { margin: 16px 0 0; font-size: .85rem; }

/* Sign in with Apple: Apple's own button, rendered by Sign in with Apple JS. Only its box is sized here
   (HIG: min 140 x 30, no scrolling to reach it). */
#appleid-signin { width: 100%; max-width: 375px; height: 56px; margin: 6px auto; cursor: pointer; }
[hidden] { display: none !important; }
h2:focus:not(:focus-visible) { outline: none; }
.card p.fine.failed { margin-top: 12px; color: var(--text); border-left: 2px solid var(--danger); padding-left: 12px; }

details { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; color: var(--muted); }
summary { cursor: pointer; padding-block: 12px 0; min-height: 44px; color: var(--text); }
details ul { margin: 0; padding-left: 18px; }

.badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
.badge svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.badge.ok { background: var(--blue); color: #04121a; box-shadow: 0 0 0 10px rgba(0,161,255,.16), 0 0 32px rgba(0,161,255,.5); }
.badge.bad { background: var(--danger); color: #1a0409; box-shadow: 0 0 0 10px rgba(255,71,102,.16); }
.who { margin: 0; padding: 14px 16px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--line); display: grid; gap: 2px; }
.who dt { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.who dd { margin: 0; overflow-wrap: anywhere; }
.who dd + dt { margin-top: 10px; }
.link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }

/* Loading is a skeleton with shimmer, no spinner. */
.bone { height: 14px; border-radius: 99px; margin-bottom: 14px;
  background: linear-gradient(100deg, rgba(255,255,255,.09) 30%, rgba(255,139,61,.45) 50%, rgba(255,255,255,.09) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite; }
.bone.btn { height: 56px; margin: 22px 0 6px; }
.bone:nth-child(1) { width: 88%; }
.bone:nth-child(2) { width: 64%; }
.bone:nth-child(3) { width: 76%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

footer { padding-block: 0 28px; font-size: .8rem; color: var(--muted); }

@media (max-width: 860px) {
  /* Button before the feature list: Apple asks that nobody has to scroll to reach it. */
  main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "card" "facts"; padding-block: 28px 36px; gap: 24px; max-width: 480px; }
  .card { padding: 24px 20px; border-radius: 24px; }
  .lede { font-size: 1rem; margin-top: 14px; }
  .prize { font-size: 1rem; margin-top: 16px; }
  .logo .mark { width: 44px; }
  .logo .word { width: 100px; }
  .current { display: none; }
}
/* Narrow phones: keeps the title 8% clear of the button edge, still 43% of its height. */
@media (max-width: 360px) { .card { padding: 24px 14px; } #appleid-signin { height: 48px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } .current .spark { display: none; } }
@media (prefers-reduced-transparency: reduce) { .card { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* beta-privacy.html, ios-privacy.html */
.doc { display: block; max-width: 720px; }
.doc h1 { font-size: 2.2rem; }
.doc h2 { margin-top: 28px; font-size: 1.25rem; }
.doc p, .doc li { color: var(--muted); }
