/* Qanary visual system 1.0 (brand/qanary-tokens.json). Self-hosted fonts; no third-party requests. */
@font-face { font-family: "Play"; src: url("/fonts/play-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --canary: #FFD23F; --canary-soft: #FFF4C7; --ink: #16150F; --paper: #FBFAF5; --line: #E7E3CF; --muted: #5E5B4C;
  --testing: #1E2A78; --report: #0E7C3A; --wallet: #0F3D2E; --gold: #F2C14E; --graphite: #23262B;
  --heat1: #FFE08A; --heat2: #FFB547; --heat3: #F2762E; --heat4: #D6361F;
  --display: "Play", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --raise-1: 0 1px 2px rgba(0,0,0,.08), 0 6px 16px -8px rgba(0,0,0,.18);
  --raise-2: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.14), 0 8px 18px -8px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--testing); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 6vw, 64px); letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 21px; }
p { margin: 0; max-width: 64ch; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.lede { font-size: 20px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* header / footer */
.top { background: var(--ink); color: var(--canary); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 2px; text-decoration: none; font: 700 26px/1 var(--display); }
.brand img { width: 46px; height: 46px; }
.brand span { margin-left: -6px; padding-top: 4px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font: 700 15px/1 var(--display); }
.nav a { text-decoration: none; opacity: .8; } .nav a:hover, .nav a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
footer { background: var(--ink); color: #E9E6D6; margin-top: 80px; }
footer .wrap { padding-block: 40px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
footer a { color: var(--canary); }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
footer small { display: block; margin-top: 12px; opacity: .7; }

/* bands: each section borrows a mode color from the app */
.band { padding-block: 72px; }
.band.ink { background: radial-gradient(120% 90% at 20% 10%, #2A281C 0%, var(--ink) 60%); color: #F3F1E6; }
.band.canary { background: var(--canary); }
.band.soft { background: var(--canary-soft); }
.band.testing { background: var(--testing); color: #F3F4FF; }
.band.report { background: var(--report); color: #fff; }
.band.wallet { background: var(--wallet); color: #fff; }
.band.graphite { background: var(--graphite); color: #ECEDEF; }

.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--canary); }
.hero .mark { justify-self: center; width: min(340px, 80%); filter: drop-shadow(0 18px 22px rgba(0,0,0,.45)); }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn { display: inline-block; text-decoration: none; font: 700 16px/1 var(--display); padding: 16px 22px; border-radius: 14px; box-shadow: var(--raise-2); }
.btn.canary { background: var(--canary); color: var(--ink); }
.btn.ghost { background: rgba(255,255,255,.1); color: inherit; box-shadow: none; border: 1px solid rgba(255,255,255,.3); }
.btn.ink { background: var(--ink); color: var(--canary); }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { border-radius: 16px; padding: 22px; background: rgba(255,255,255,.7); box-shadow: var(--raise-1); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.band.testing .card, .band.report .card, .band.wallet .card, .band.graphite .card, .band.ink .card { background: rgba(255,255,255,.08); }
.step { font: 700 14px/1 var(--mono); opacity: .7; }
.price { font: 700 34px/1 var(--display); }
.price small { font: 500 15px var(--body); opacity: .75; }
.pill { display: inline-block; font: 600 12px/1 var(--mono); padding: 5px 10px; border-radius: 99px; background: var(--ink); color: var(--canary); }

/* struggle sample */
.struggle { background: #FFF7EC; color: #2A1607; border-radius: 18px; padding: 22px; box-shadow: var(--raise-1); display: flex; flex-direction: column; gap: 14px; }
.srow { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.srow b { font-family: var(--display); font-size: 18px; }
.srow .score { font: 700 13px var(--mono); color: #fff; padding: 3px 9px; border-radius: 99px; }
.srow .bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: #F6E9D6; overflow: hidden; }
.srow .bar i { display: block; height: 100%; }
.srow small { grid-column: 1 / -1; opacity: .8; }

table { border-collapse: collapse; width: 100%; font-size: 16px; }
.tablewrap { overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: var(--raise-1); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
td.num { font-family: var(--display); font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

/* long-form (legal, security) */
.doc { max-width: 760px; padding-block: 56px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc h2 { font-size: 26px; margin-top: 40px; margin-bottom: 10px; }
.doc p, .doc li { max-width: 68ch; }
.doc p + p, .doc ul { margin-top: 12px; }
.doc li + li { margin-top: 6px; }

@media (max-width: 860px) {
  .hero .wrap, .grid3, .grid2 { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
  .hero .mark { width: 200px; grid-row: 1; }
  .band { padding-block: 52px; }
}
@media (prefers-reduced-motion: no-preference) { .btn { transition: transform .15s; } .btn:hover { transform: translateY(-2px); } }

/* no inline styles anywhere (CSP style-src 'self') */
.grid2.center { align-items: center; }
.h4 { background: var(--heat4); } .h3 { background: var(--heat3); } .h2 { background: var(--heat2); } .dark { color: #2A1607 !important; }
.w88 { width: 88%; } .w61 { width: 61%; } .w12 { width: 12%; }

/* ===================== Visual details (v2) — CSS only; every animation is off under reduced motion ===================== */

/* Faceted gold texture (img/facets.svg) behind dark bands, strongest on the right, like the feathers in the mark */
.facets { position: relative; isolation: isolate; }
.facets::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("/img/facets.svg") right center / cover no-repeat; opacity: .9;
  -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 75%); mask-image: linear-gradient(90deg, transparent 15%, #000 75%); }
.facets-dim { position: relative; isolation: isolate; }
.facets-dim::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("/img/facets.svg") left center / cover no-repeat; opacity: .35; }
.slant { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0 100%); padding-bottom: calc(72px + 4vw); }

/* Hero phone that cycles through the app's mode colors */
.device { justify-self: center; width: min(300px, 78vw); aspect-ratio: 9 / 18.5; border-radius: 40px; padding: 12px; background: linear-gradient(145deg, #3a382c, #0c0b07);
  box-shadow: 0 0 0 1px rgba(255,210,63,.25), 0 40px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12); transform: rotate(3deg); }
.screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: #FFD23F; }
.scr { position: absolute; inset: 0; padding: 22px 16px; display: flex; flex-direction: column; gap: 10px; font: 500 13px/1.3 var(--body); opacity: 0; }
.scr:first-child { opacity: 1; }
.slabel { font: 600 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin-top: 8px; }
.stitle { font: 700 22px/1.1 var(--display); }
.stitle.big { font-size: 40px; color: var(--gold); }
.srow-mini { display: flex; justify-content: space-between; gap: 6px; padding: 11px 12px; border-radius: 12px; background: rgba(0,0,0,.08); box-shadow: 0 2px 6px -3px rgba(0,0,0,.3); }
.srow-mini i { font-style: normal; } .srow-mini em { font: 700 11px/1.4 var(--mono); font-style: normal; }
.s-discover { background: linear-gradient(#FFD23F 0 34%, #FFF4C7 34%); color: var(--ink); }
.s-discover .srow-mini { background: #FFD23F; } .s-discover em { background: var(--ink); color: var(--canary); padding: 0 6px; border-radius: 99px; }
.s-testing { background: var(--testing); color: #F3F4FF; } .s-testing .srow-mini { background: rgba(255,255,255,.1); }
.s-testing .done { opacity: .6; } .s-testing .on { outline: 2px solid #F3F4FF; }
.s-report { background: var(--report); color: #fff; } .s-report .srow-mini { background: rgba(255,255,255,.14); }
.s-wallet { background: var(--wallet); color: #fff; } .s-wallet .srow-mini { background: rgba(255,255,255,.08); } .s-wallet em { color: var(--gold); }
.sprog { height: 7px; border-radius: 99px; background: rgba(255,255,255,.2); overflow: hidden; } .sprog i { display: block; height: 100%; width: 62%; background: #fff; border-radius: 99px; }
.sprog.gold i { width: 72%; background: var(--gold); }
.dots { display: flex; gap: 8px; } .dots i { width: 24px; height: 24px; border-radius: 50%; background: #fff; } .dots i.off { background: rgba(255,255,255,.2); }

/* Qanary + Qanaries */
.names .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: stretch; }
.name-card { display: flex; gap: 22px; align-items: center; padding: 28px; border-radius: 22px; background: #fff; box-shadow: var(--raise-1); min-width: 0; }
.name-card:first-child { background: var(--ink); color: #F3F1E6; }
.name-card h2 { font-size: clamp(34px, 4vw, 46px); }
.name-card:first-child h2 { color: var(--canary); }
.solo { width: 120px; flex: none; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.flock { flex: none; width: 150px; height: 120px; position: relative; }
.flock img { position: absolute; width: 52px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.flock img:nth-child(1) { left: 0; top: 34px; width: 60px; } .flock img:nth-child(2) { left: 42px; top: 0; width: 46px; }
.flock img:nth-child(3) { left: 50px; top: 58px; width: 56px; } .flock img:nth-child(4) { left: 96px; top: 18px; width: 50px; }
.flock img:nth-child(5) { left: 104px; top: 72px; width: 40px; }
.amp { align-self: center; font: 700 44px/1 var(--display); color: var(--canary); text-shadow: 0 2px 0 var(--ink); }

/* SDK event ticker */
.ticker { background: var(--ink); color: #CFCBB6; overflow: hidden; border-block: 1px solid rgba(255,210,63,.18); }
.ticker .track { display: flex; width: max-content; gap: 44px; padding-block: 14px; font: 500 13px/1 var(--mono); white-space: nowrap; }
.ticker span::before { content: "●"; margin-right: 10px; color: var(--canary); font-size: 9px; vertical-align: 2px; }
.ticker .g { color: var(--gold); } .ticker .r { color: #FF8A7A; }

/* How it works: mini screens in mode colors */
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: m; }
.mini { margin: 0; border-radius: 22px; padding: 18px 16px 22px; min-height: 230px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--raise-1), inset 0 0 0 6px rgba(0,0,0,.06); position: relative; }
.mini::after { counter-increment: m; content: counter(m); position: absolute; right: 14px; top: 10px; font: 700 54px/1 var(--display); opacity: .14; }
.mini b { font: 700 24px/1.1 var(--display); margin-top: auto; }
.mini figcaption { font-size: 15px; line-height: 1.45; opacity: .9; }
.mlabel { font: 600 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.m-discover { background: var(--canary); } .m-testing { background: var(--testing); color: #F3F4FF; }
.m-report { background: var(--report); color: #fff; } .m-wallet { background: var(--wallet); color: #fff; } .m-wallet b { color: var(--gold); }

/* Rage-tap ripple on the worst screen */
.srow.hot { position: relative; }
.ripple { position: absolute; right: 64px; top: 4px; width: 18px; height: 18px; pointer-events: none; }
.ripple i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--heat4); opacity: .55; }
.ripple i:nth-child(2) { inset: -7px; opacity: .35; } .ripple i:nth-child(3) { inset: -14px; opacity: .18; }

@media (prefers-reduced-motion: no-preference) {
  .scr { animation: modecycle 16s infinite; }
  .scr:nth-child(2) { animation-delay: 4s; } .scr:nth-child(3) { animation-delay: 8s; } .scr:nth-child(4) { animation-delay: 12s; }
  .scr:first-child { opacity: 0; animation-delay: 0s; }
  .device { animation: float 7s ease-in-out infinite; }
  .ticker .track { animation: tick 60s linear infinite; }
  .flock img { animation: bob 3.6s ease-in-out infinite; }
  .flock img:nth-child(2) { animation-delay: -.7s; } .flock img:nth-child(3) { animation-delay: -1.4s; }
  .flock img:nth-child(4) { animation-delay: -2.1s; } .flock img:nth-child(5) { animation-delay: -2.8s; }
  .ripple i { animation: ripple 1.8s ease-out infinite; } .ripple i:nth-child(2) { animation-delay: .25s; } .ripple i:nth-child(3) { animation-delay: .5s; }
}
/* first frame of the cycle shows Discover, so a still capture is never blank */
@keyframes modecycle { 0% { opacity: 1; } 22% { opacity: 1; } 25% { opacity: 0; } 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes float { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-10px); } }
@keyframes tick { to { transform: translateX(-50%); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ripple { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

@media (max-width: 860px) {
  .names .wrap { grid-template-columns: 1fr; }
  .amp { justify-self: center; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device { width: min(240px, 70vw); grid-row: 1; }
}
@media (max-width: 480px) {
  .name-card { flex-direction: column; align-items: flex-start; }
  .minis { grid-template-columns: 1fr; }
  .mini { min-height: 0; }
}

.tabs { margin-top: auto; margin-inline: -16px; margin-bottom: -22px; display: flex; justify-content: space-around; padding: 12px 6px 16px; background: var(--ink); }
.tabs i { font: 700 11px/1 var(--display); font-style: normal; color: rgba(255,210,63,.45); } .tabs i.on { color: var(--canary); }
.srow-mini em { white-space: nowrap; }

/* Ranks (testers page) */
.ranks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rank { border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--raise-1); min-width: 0; }
.rank img { width: 64px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.rank .tier { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.rank ul { margin: 0; padding-left: 18px; } .rank li + li { margin-top: 4px; }
.r1 { background: #fff; } .r1 img { filter: grayscale(.85) brightness(1.1) drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.r2 { background: var(--canary-soft); }
.r3 { background: var(--ink); color: #F3F1E6; } .r3 h3 { color: var(--gold); }
@media (max-width: 860px) { .ranks { grid-template-columns: 1fr; } }
