/* Percia pre-launch page: centered hero over concentric rings, the launch film
   in a blue-ringed card, the one-API-call band on white, four watches from the
   film, and the dark waitlist block. Light by design. */
:root {
  color-scheme: light;
  --ground: #FBFBF9;
  --paper: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #4A4A48;
  --muted: #6B6B68;
  --line: #D9D8D2;
  --rule: #E4E3DE;
  --hair: #ECEBE6;
  --blue: #1D4ED8;
  --blue-tint: #E8EEFF;
  --blue-line: #BFD0FF;
  --on-dark: #FBFBF9;
  --on-dark-2: #C9C8C1;
  --alert: #B42318;
  --alert-tint: #FEECEA;
  --error-on-dark: #FF9B8A;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::placeholder { color: var(--muted); opacity: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.eyebrow { margin: 0 0 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pill-tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px; border-radius: 999px; background: var(--blue-tint); border: 1px solid var(--blue-line); color: var(--blue); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; white-space: nowrap; }
.pill-tag .d { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }
.pulse { animation: pulse 2s ease-in-out infinite; }
h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid var(--ink); white-space: nowrap; }
.btn.solid { background: var(--ink); color: var(--on-dark); }
.btn.line { background: var(--paper); color: var(--ink); }
.btn:hover { opacity: .88; }

/* nav */
header.nav .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { display: block; flex: none; }
.brand .word { font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: .32em; }
.nav-left { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
nav.links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
nav.links a.plain { padding: 10px 14px; font-size: 15px; text-decoration: none; color: var(--ink-2); }
nav.links a.cta { padding: 11px 18px; font-size: 15px; font-weight: 500; text-decoration: none; background: var(--ink); color: var(--on-dark); border-radius: 999px; }

/* hero */
.hero { position: relative; overflow: hidden; }
.rings { position: absolute; left: 50%; top: -40px; width: 1200px; max-width: none; height: 800px; transform: translateX(-50%); pointer-events: none; }
.hero .inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 56px max(24px, env(safe-area-inset-right, 0px)) 96px max(24px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(36px, 6vw, 76px); line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
.hero h1 .before { display: block; color: #9A9994; }
.see { position: relative; display: inline-block; padding: 0 .12em; color: var(--blue); }
.see i { position: absolute; width: .24em; height: .24em; border: 0 solid var(--blue); }
.see i:nth-child(1) { top: .04em; left: 0; border-top-width: 2.5px; border-left-width: 2.5px; }
.see i:nth-child(2) { top: .04em; right: 0; border-top-width: 2.5px; border-right-width: 2.5px; }
.see i:nth-child(3) { bottom: .04em; left: 0; border-bottom-width: 2.5px; border-left-width: 2.5px; }
.see i:nth-child(4) { bottom: .04em; right: 0; border-bottom-width: 2.5px; border-right-width: 2.5px; }
.see .tag { position: absolute; right: 0; top: 100%; margin-top: 6px; white-space: nowrap; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0; color: #fff; background: var(--blue); padding: 3px 8px; }
.lede { margin: 44px 0 0; max-width: 640px; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.hero-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.film { position: relative; margin-top: 64px; width: 100%; max-width: 960px; text-align: left; }
.film .badge { position: absolute; top: -15px; left: 24px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--blue); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; }
.film .badge .d { width: 6px; height: 6px; border-radius: 999px; background: #fff; }
.film .card { background: var(--paper); border: 2px solid var(--blue); border-radius: 22px; overflow: hidden; box-shadow: 0 1px 2px rgba(10,10,10,.04), 0 24px 56px rgba(29,78,216,.14); }
.film video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; background: #0A0C0C; object-fit: cover; }
.film .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px 14px 22px; border-top: 1px solid var(--hair); }
.film .bar .meta { flex: 1 1 200px; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.film .track { flex: 1 1 220px; min-width: 0; height: 6px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.film .track b { display: block; height: 6px; width: 0; background: var(--blue); }
.film .tc { font-family: var(--mono); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sound { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sound[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }

/* api band */
.band { border-top: 1px solid var(--rule); }
.band.white { background: var(--paper); }
.band > .wrap { padding-block: 104px; }
.api { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; }
.api .copy { flex: 1 1 360px; min-width: 0; }
.api .console { flex: 1 1 520px; min-width: 0; }
.struck { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 6px; font-family: var(--display); font-size: 22px; }
.struck li { color: #9A9994; text-decoration: line-through; text-decoration-color: var(--ink); text-decoration-thickness: 1.5px; }
.api p.note { margin: 24px 0 0; color: var(--ink-2); max-width: 460px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.toggle { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; cursor: pointer; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); }
.toggle[aria-selected="true"] { background: var(--ink); color: var(--on-dark); }
.code { background: var(--ink); border-radius: 14px; overflow: hidden; }
.code .hd { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px 0; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: #A8A7A0; }
.code .scroll { overflow-x: auto; }
.code pre { margin: 0; padding: 12px 18px 18px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #F2F1EC; min-width: max-content; }
.c-cm { color: #8E8D86; } .c-m { color: #9DB5FF; } .c-k { color: #C9C8C1; } .c-s { color: #FFFFFF; }
.code .resp { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid #262624; font-family: var(--mono); font-size: 13px; color: #F2F1EC; }
.code .resp .s { padding: 2px 9px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 500; }
.code .resp .src { margin-left: auto; color: #A8A7A0; font-size: 12px; }

/* watches */
.cards { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 1px 2px rgba(10,10,10,.04), 0 18px 48px rgba(10,10,10,.05); min-width: 0; }
.card figure { margin: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: #0A0C0C; }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 12px; }
.card .src { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .src code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; border: 1px solid; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.state.met { color: var(--blue); background: var(--blue-tint); border-color: var(--blue-line); }
.state.alert { color: var(--alert); background: var(--alert-tint); border-color: #F6C3BD; }
.state.neutral { color: var(--ink-2); background: var(--ground); border-color: var(--line); }
.card .q { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }
.card .act { display: flex; gap: 12px; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 15px; }
.card .act .k { flex: none; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }

/* waitlist */
#waitlist { scroll-margin-top: 24px; }
.wl { background: var(--ink); color: var(--on-dark); border-radius: 32px; padding: clamp(32px, 6vw, 72px); display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
.wl .l { flex: 1 1 380px; min-width: 0; }
.wl .r { flex: 1 1 380px; min-width: 0; max-width: 560px; }
.wl h2 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.025em; margin-top: 20px; }
.wl .l p { margin: 18px 0 0; max-width: 520px; color: var(--on-dark-2); }
.wl .pill-tag { background: var(--blue-tint); border-color: var(--blue-tint); }
.wl :focus-visible { outline-color: var(--on-dark); }
form { display: flex; flex-direction: column; gap: 14px; }
.grp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grp .lab { font-family: var(--mono); font-size: 12px; color: var(--on-dark-2); margin-right: 2px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; cursor: pointer; border: 1px solid #8E8E8A; background: transparent; color: var(--on-dark); }
.chip[aria-pressed="true"] { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
label.f { font-size: 14px; font-weight: 500; }
label.f .opt { font-weight: 400; color: var(--on-dark-2); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row input { flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid #BDBCB5; border-radius: 12px; background: #FFFFFF; color: var(--ink); font-family: var(--body); font-size: 16px; }
.row input[aria-invalid="true"] { border-color: var(--error-on-dark); box-shadow: 0 0 0 2px var(--error-on-dark); }
.row button { min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--on-dark); color: var(--ink); font-size: 16px; font-weight: 500; cursor: pointer; }
.row button[disabled] { opacity: .6; cursor: progress; }
.watch { width: 100%; height: 48px; padding: 0 16px; border: 1px solid #3A3A38; border-radius: 12px; background: #161615; color: var(--on-dark); font-family: var(--body); font-size: 15px; }
.watch::placeholder { color: #8E8E8A; }
.err { font-size: 14px; color: var(--error-on-dark); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done { display: flex; flex-direction: column; gap: 10px; }
.done:focus { outline: none; }
.done .h { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -.01em; }
.done .h svg { flex: none; }
.done p { margin: 0; color: var(--on-dark-2); }
.done code { font-family: var(--mono); font-size: 14px; color: var(--on-dark); word-break: break-all; }

/* add-watch card (dark, same look as the waitlist block) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.try-wrap { width: 100%; max-width: 880px; margin-top: 56px; text-align: left; scroll-margin-top: 24px; }
.try { position: relative; width: 100%; background: var(--ink); color: var(--on-dark); border-radius: 28px; padding: 40px clamp(18px, 3vw, 40px) 30px; box-shadow: 0 30px 80px rgba(10,10,10,.28); display: flex; flex-direction: column; gap: 28px; }
.try :focus-visible { outline-color: var(--on-dark); }
.try .tag { position: absolute; left: 28px; top: -15px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--on-dark); color: var(--ink); border: 2px solid var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; }
.try .tag .d { width: 7px; height: 7px; border-radius: 999px; background: var(--blue); }
.step-hd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.step-l { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; }
.step > .step-l { margin-bottom: 14px; }
.step-l span { color: #8E8E8A; }
.modes { display: flex; flex-wrap: wrap; gap: 8px; }
.mode { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid #5A5A57; background: transparent; color: var(--on-dark); }
.mode[aria-pressed="true"] { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.field { width: 100%; border: 1px solid #3A3A38; border-radius: 14px; background: #161615; color: var(--on-dark); font-family: var(--body); font-size: 16px; }
input.field { min-height: 54px; padding: 0 18px; }
.field.mono { font-family: var(--mono); font-size: 14px; }
.field[aria-invalid="true"] { border-color: var(--error-on-dark); box-shadow: 0 0 0 2px var(--error-on-dark); }
textarea.field { padding: 14px 18px; font-size: 19px; line-height: 1.5; resize: none; }
.field::placeholder { color: #8E8E8A; }
.hint { margin: 10px 0 0; font-size: 13px; color: #A8A7A0; }
.link { color: var(--on-dark); }
.soon { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 96px; padding: 16px 18px; border: 1.5px dashed #5A5A57; border-radius: 14px; background: #161615; font-size: 15px; color: var(--on-dark-2); }
.soon-tag { padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
.tchips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tchip { min-height: 44px; padding: 0 16px; border: 1px solid #3A3A38; border-radius: 999px; background: #1C1C1B; font-size: 14px; cursor: pointer; color: #E4E3DE; text-align: left; }
.go { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid #2B2B2A; }
.ts { min-height: 0; }
.btn.light { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.btn.lg { min-height: 54px; padding: 0 30px; font-size: 17px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.try .err { margin: 0; }
.done-card { gap: 16px; }
.done-card .h { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -.01em; }
.done-card:focus { outline: none; }
.done-card p { margin: 0; color: var(--on-dark-2); }
.done-card .btn { align-self: flex-start; }
.wl .ts { margin-top: 2px; }
footer .m a { color: inherit; }

/* plain text pages (terms) */
.doc { max-width: 760px; padding-block: 72px 120px; }
.doc h1 { margin: 0 0 8px; font-family: var(--display); font-weight: 500; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.025em; line-height: 1.08; }
.doc h2 { font-size: 24px; margin: 40px 0 8px; letter-spacing: -.01em; }
.doc p, .doc li { color: var(--ink-2); }
.doc .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* not-found page */
.lost { padding-block: 120px 160px; text-align: center; }
.lost h1 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -.025em; }
.lost p { margin: 20px 0 32px; color: var(--ink-2); }

footer { border-top: 1px solid var(--rule); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-block: 32px; }
footer .word { font-family: var(--display); font-weight: 500; font-size: 14px; letter-spacing: .32em; }
footer .m { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

@media (max-width: 860px) { .cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .hero .inner { padding-top: 32px; }
  .lede { font-size: 17px; }
  .wl { border-radius: 24px; }
  .row button { width: 100%; }
  .try .tag { left: 18px; }
  .go .btn { width: 100%; }
  nav.links a.plain { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } html { scroll-behavior: auto; } }
