/* Pairlex website. Mirrors the app's "Chunky" theme (source/Pairlex/Theme/Theme.swift):
   thick ink outlines, hard offset shadows, loud flat colour. Single light theme by design. */
:root {
  --yellow: #FFE14D; --purple: #6B4EFF; --lime: #C6F432; --pink: #FF4F8B;
  --orange: #FF8A3D; --sky: #5CD3FF; --ink: #111111; --paper: #FFFFFF;
  --muted: #444444; --rule: #E4E4E4;
  --font: "Bricolage Grotesque", "Arial Black", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --b: 3px; --sh: 5px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--yellow); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 0.98; text-wrap: balance; font-weight: 800; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- shared pieces ---------- */
.slab { background: var(--paper); border: var(--b) solid var(--ink); border-radius: 22px; box-shadow: var(--sh) var(--sh) 0 var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 26px;
  font-weight: 800; font-size: 18px; text-decoration: none; cursor: pointer;
  background: var(--purple); color: #fff; border: var(--b) solid var(--ink); border-radius: 18px;
  box-shadow: var(--sh) var(--sh) 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--ink); }
.btn.paper { background: var(--paper); color: var(--ink); }
.btn.lime { background: var(--lime); color: var(--ink); }
.btn.small { min-height: 44px; font-size: 15px; padding: 0 16px; border-radius: 13px; box-shadow: 3px 3px 0 var(--ink); }
.btn .two { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.btn .two small { font-size: 11px; font-weight: 600; letter-spacing: .04em; opacity: .85; }
.apple { width: 20px; height: 24px; flex: none; fill: currentColor; }
.badge { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border: var(--b) solid var(--ink); border-radius: 14px; font-weight: 800; font-size: 18px; background: var(--paper); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: var(--b) solid var(--ink); border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--yellow); white-space: nowrap; }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--yellow); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--yellow); transition: box-shadow .2s; }
.site-head.scrolled { box-shadow: 0 var(--b) 0 var(--ink); }
.nav { display: flex; align-items: center; gap: 22px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 26px; letter-spacing: -0.04em; text-decoration: none; }
.logo svg { width: 38px; height: 38px; flex: none; }
.nav .links { display: flex; gap: 22px; margin-left: auto; font-weight: 700; font-size: 15px; }
.nav .links a { text-decoration: none; }
.nav .links a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
@media (max-width: 760px) { .nav .links { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { border-bottom: var(--b) solid var(--ink); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-block: 28px 72px; }
.hero h1 { font-size: clamp(50px, 7.6vw, 104px); margin-top: 18px; }
.hero h1 em { font-style: normal; background: var(--purple); color: #fff; padding: 0 .12em; border: var(--b) solid var(--ink); border-radius: 18px; display: inline-block; transform: rotate(-2deg); box-shadow: var(--sh) var(--sh) 0 var(--ink); }
.lede { font-size: 20px; font-weight: 500; max-width: 40ch; margin-top: 22px; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.facts { display: flex; gap: 8px 20px; flex-wrap: wrap; margin: 26px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.facts li::before { content: "■ "; }

.stage { position: relative; display: grid; place-items: center; min-height: 600px; }
.tile { position: absolute; padding: 8px 14px; border: var(--b) solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); font-weight: 800; font-size: 17px; white-space: nowrap; animation: bob 5s ease-in-out infinite; }
.tile.t1 { top: 6%; left: -2%; background: var(--pink); rotate: -8deg; }
.tile.t2 { top: 24%; right: -4%; background: var(--lime); rotate: 7deg; animation-delay: -1.5s; }
.tile.t3 { bottom: 16%; left: -6%; background: var(--sky); rotate: 5deg; animation-delay: -3s; }
.tile.t4 { bottom: 3%; right: 2%; background: var(--orange); rotate: -5deg; animation-delay: -2s; }
@keyframes bob { 50% { translate: 0 -10px; } }
.stage .play-label { position: absolute; top: 0; left: 50%; translate: -50% 0; rotate: -3deg; z-index: 2; background: var(--lime); }

/* ---------- phone + demo round ---------- */
.phone { width: 310px; max-width: 100%; aspect-ratio: 300 / 620; border: 4px solid var(--ink); border-radius: 46px; background: var(--ink); padding: 9px; box-shadow: 10px 10px 0 var(--ink); }
.screen { height: 100%; border-radius: 37px; overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 11px; padding: 36px 14px 14px; background: var(--purple); transition: background-color .25s; }
.screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 82px; height: 22px; margin-left: -41px; background: var(--ink); border-radius: 12px; }
.screen.flash { background: var(--pink); }
.timer { display: flex; align-items: center; gap: 8px; }
.ibtn { width: 32px; height: 32px; flex: none; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--paper); display: grid; place-items: center; font-size: 13px; font-weight: 900; cursor: pointer; padding: 0; }
.bar { flex: 1; height: 15px; border: 2.5px solid var(--ink); border-radius: 99px; background: var(--paper); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--lime); border-right: 2.5px solid var(--ink); transition: width 1s linear; }
.secs { color: #fff; font-weight: 800; font-size: 16px; min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.status { display: flex; align-items: center; justify-content: space-between; height: 26px; }
.hearts { display: flex; gap: 4px; }
.heart { width: 19px; height: 17px; }
.streak { height: 26px; padding: 0 9px; font-size: 11.5px; border-width: 2.5px; }
.prompt { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); min-height: 150px; display: grid; place-items: center; text-align: center; padding: 12px; }
.prompt .lang { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.prompt .word { font-size: 42px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; overflow-wrap: anywhere; }
.prompt .word.long { font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.shake { animation: shake .4s linear; }
@keyframes shake { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }
.hint { text-align: center; color: #fff; font-weight: 700; font-size: 12.5px; min-height: 19px; }
.screen.flash .hint { color: var(--ink); font-weight: 800; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ans { min-height: 46px; border: 2.5px solid var(--ink); border-radius: 13px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; text-align: center; padding: 4px; cursor: pointer; transition: transform .1s, box-shadow .1s, background-color .15s; }
.ans:active { transform: translate(3px, 3px); box-shadow: none; }
.ans.right { background: var(--lime); }
.ans.wrong, .ans:disabled { background: var(--ink); color: #fff; box-shadow: none; text-decoration: line-through; cursor: default; }
.ans.wide { grid-column: span 2; background: var(--lime); text-decoration: none; }
.result { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); display: flex; justify-content: space-around; padding: 10px 4px; text-align: center; }
.result b { display: block; font-size: 24px; letter-spacing: -0.04em; line-height: 1; }
.result span { font-size: 10px; font-weight: 600; color: var(--muted); }

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: #fff; overflow: hidden; border-bottom: var(--b) solid var(--ink); }
.marquee div { display: flex; gap: 34px; padding: 14px 0; white-space: nowrap; font-weight: 800; font-size: 22px; animation: slide 45s linear infinite; width: max-content; }
.marquee span::after { content: "✦"; color: var(--yellow); margin-left: 34px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.band { padding-block: 88px; border-bottom: var(--b) solid var(--ink); }
.band.white { background: var(--paper); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 38px; }
.sec-head h2 { font-size: clamp(38px, 5vw, 64px); max-width: 14ch; }
.sec-head p { max-width: 40ch; font-weight: 500; color: var(--muted); font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.step { padding: 22px; display: grid; gap: 14px; align-content: start; }
.step h3 { font-size: 30px; }
.step p { font-weight: 500; color: var(--muted); }
.vis { height: 180px; border: var(--b) solid var(--ink); border-radius: 16px; display: grid; place-items: center; padding: 14px; }
.pairs { display: grid; gap: 7px; width: 100%; max-width: 250px; }
.pairs div { display: grid; grid-template-columns: 1fr 1fr; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--paper); font-weight: 700; font-size: 14px; overflow: hidden; }
.pairs span { padding: 5px 10px; } .pairs span + span { border-left: 2.5px solid var(--ink); }
.card-word { width: 150px; height: 96px; border: var(--b) solid var(--ink); border-radius: 16px; background: var(--paper); box-shadow: 5px 5px 0 var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 30px; letter-spacing: -0.04em; }
.tricky { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 260px; padding: 10px; background: var(--ink); color: #fff; border: 2.5px solid #fff; border-radius: 14px; }
.tricky .badge { width: 38px; height: 38px; border-width: 2.5px; border-color: #fff; background: var(--pink); color: var(--ink); border-radius: 10px; font-size: 15px; }
.tricky b { display: block; font-size: 14px; } .tricky small { font-size: 11px; color: #D6D6D6; font-weight: 500; }
.tricky .go { margin-left: auto; font-weight: 900; }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feat { padding: 22px; display: grid; gap: 10px; align-content: start; border-radius: 20px; }
.feat h3 { font-size: 25px; }
.feat p { font-weight: 500; font-size: 15.5px; }

.settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 56px; padding: 28px; }
.settings h3 { font-size: 34px; }
.settings p { font-weight: 500; color: var(--muted); margin-top: 10px; max-width: 40ch; }
.seg-group { display: grid; gap: 16px; }
.seg-group b { display: block; font-size: 17px; margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg span { min-height: 44px; display: grid; place-items: center; border: var(--b) solid var(--ink); border-radius: 12px; font-weight: 800; background: var(--paper); font-variant-numeric: tabular-nums; }
.seg .on { background: var(--purple); color: #fff; }

.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.faq-grid h2 { font-size: clamp(38px, 5vw, 64px); }
details { background: var(--paper); border: var(--b) solid var(--ink); border-radius: 18px; padding: 16px 20px; box-shadow: 4px 4px 0 var(--ink); }
details + details { margin-top: 14px; }
summary { font-weight: 800; font-size: 19px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 26px; line-height: .8; flex: none; }
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; font-weight: 500; color: var(--muted); max-width: 62ch; }
code { font-family: var(--mono); font-size: .88em; background: var(--yellow); border: 2px solid var(--ink); border-radius: 6px; padding: 0 5px; }

.cta-band { background: var(--purple); color: #fff; padding-block: 90px; border-bottom: var(--b) solid var(--ink); }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(42px, 6vw, 84px); max-width: 12ch; }

.site-foot { background: var(--ink); color: #fff; padding-block: 30px calc(30px + env(safe-area-inset-bottom, 0px)); font-size: 14px; font-weight: 600; }
.site-foot .wrap { display: flex; gap: 16px 24px; flex-wrap: wrap; align-items: center; }
.site-foot .logo { font-size: 20px; } .site-foot .logo svg { width: 30px; height: 30px; }
.site-foot nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.site-foot a { text-decoration: none; } .site-foot nav a { opacity: .8; } .site-foot nav a:hover { opacity: 1; text-decoration: underline; }
.site-foot .copy { width: 100%; opacity: .55; font-weight: 500; font-size: 13px; }

/* ---------- simple text pages (privacy, support) ---------- */
.page { padding-block: 40px 90px; }
.page .slab { padding: clamp(22px, 4vw, 44px); max-width: 780px; }
.page h1 { font-size: clamp(44px, 6vw, 72px); }
.page .updated { font-family: var(--mono); font-size: 12px; font-weight: 700; margin-top: 12px; color: var(--muted); }
.page h2 { font-size: 28px; margin-top: 34px; }
.page p, .page li { font-weight: 500; max-width: 65ch; }
.page p { margin-top: 12px; }
.page ul { padding-left: 22px; margin: 12px 0 0; } .page li + li { margin-top: 6px; }
.page a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .tile, .marquee div, .shake { animation: none; }
}
@media (max-width: 960px) {
  .hero-grid, .faq-grid, .settings { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { padding-block: 20px 60px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 0; padding-top: 18px; }
  .tile { display: none; }
  .band { padding-block: 64px; }
  .lede { font-size: 18px; }
}
