/* Emoji Anywhere website, v3: clean.
   Rule: the interface is monochrome, the emojis are the only color.
   No gradients, glows or grain. One physical moment: the keycaps.
   Radius: buttons are pills, cards and inputs 14px, keycaps 12px. */

@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #fbfbfc;
  --surface: #ffffff;
  --sunk: #f3f3f5;
  --ink: #111215;
  --ink-2: #3a3c42;
  --muted: #6b6e76;
  --line: #e6e7ea;
  --btn: #111215;
  --btn-ink: #ffffff;
  --shadow: 0 1px 2px rgb(17 18 21 / 0.05), 0 8px 24px rgb(17 18 21 / 0.06);
  --cap-top: #ffffff;
  --cap-side: #d9dadf;
  --cap-edge: #c6c8ce;

  --font: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;

  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 80px; --s9: 128px;
  --r: 14px; --r-pill: 999px;
  --wrap: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: #141417;
    --sunk: #1a1a1e;
    --ink: #f2f2f3;
    --ink-2: #c9cace;
    --muted: #8e9099;
    --line: #26272c;
    --btn: #f2f2f3;
    --btn-ink: #0c0c0e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
    --cap-top: #2a2b31;
    --cap-side: #17181c;
    --cap-edge: #3a3b42;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); z-index: 100; background: var(--surface); padding: var(--s2) var(--s4); border-radius: var(--r-pill); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.code { font-family: var(--mono); font-size: 0.9em; background: var(--sunk); border: 1px solid var(--line); padding: 0 6px; border-radius: 6px; }
.emo { font-family: var(--emoji); font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: var(--r-pill);
  font: 600 0.98rem/1 var(--font); text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s var(--ease), opacity 0.15s;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { opacity: 0.86; }
.btn-ghost { color: var(--ink); border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--s5); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: var(--s5); }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 0.94rem; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav .btn { padding: 9px 16px; font-size: 0.9rem; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }
@media (max-width: 560px) { .nav .btn { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: var(--s8) 0 var(--s8); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s8); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.25rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 0 0 var(--s5); }
.hero h1 .typed { font-family: var(--mono); font-weight: 600; letter-spacing: -0.06em; }
.lede { color: var(--muted); font-size: 1.2rem; max-width: 34ch; margin: 0 0 var(--s6); }
.ctas { display: flex; flex-wrap: wrap; gap: var(--s3); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s7); } .hero { padding-top: var(--s6); } }

/* Live demo: a plain text box with the real-looking popup */
.demo { position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); box-shadow: var(--shadow); }
.demo label { display: block; font-weight: 600; margin-bottom: 2px; }
.demo .hint { color: var(--muted); font-size: 0.94rem; margin: 0 0 var(--s4); }
.field { position: relative; }
.demo input {
  width: 100%; font: 450 1.45rem/1.3 var(--font); color: var(--ink); letter-spacing: -0.01em;
  background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
}
.demo input:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: transparent; }
.demo input::placeholder { color: var(--muted); }
.measure { position: absolute; visibility: hidden; white-space: pre; font: 450 1.45rem/1.3 var(--font); letter-spacing: -0.01em; left: 0; top: 0; }
.out { margin: var(--s3) 0 0; min-height: 1.6em; color: var(--muted); font-size: 0.94rem; }

.pop {
  position: absolute; z-index: 5; min-width: 230px; max-width: 320px; margin: 8px 0 0; list-style: none; padding: 4px;
  background: #f9f9f9; color: #1a1a1a; border: 1px solid rgb(0 0 0 / 0.1); border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.16); font: 400 0.98rem/1 "Segoe UI", var(--font);
}
@media (prefers-color-scheme: dark) { .pop { background: #2b2b2b; color: #fff; border-color: rgb(255 255 255 / 0.12); box-shadow: 0 12px 32px rgb(0 0 0 / 0.5); } }
.pop[hidden] { display: none; }
.pop li { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.pop li .e { font-family: var(--emoji); font-size: 1.4rem; line-height: 1; width: 1.7rem; text-align: center; }
.pop li[aria-selected="true"] { background: rgb(127 127 127 / 0.16); }
@media (prefers-reduced-motion: no-preference) { .pop:not([hidden]) { animation: pop-in 0.14s var(--ease); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }

.burst { position: absolute; z-index: 6; pointer-events: none; font-family: var(--emoji); font-size: 2rem; line-height: 1; }
@media (prefers-reduced-motion: no-preference) { .burst { animation: burst 0.6s var(--ease) forwards; } }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, 6px) scale(0.6); } 30% { opacity: 1; transform: translate(-50%, -26px) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -48px) scale(1); } }

/* ---------- Sections ---------- */
section { padding: var(--s9) 0; border-top: 1px solid var(--line); }
.hero { border-top: 0; }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.06; letter-spacing: -0.04em; margin: 0 0 var(--s4); font-weight: 700; max-width: 20ch; }
.sub { color: var(--muted); max-width: 56ch; margin: 0 0 var(--s7); font-size: 1.12rem; }
@media (max-width: 760px) { section { padding: var(--s8) 0; } }

/* Real recording */
.film { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.film video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e9ebf0; }
.film figcaption { padding: var(--s3) var(--s5); color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
/* The landscape demo beside the vertical reel; stacked on phones */
.films { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: var(--s6); align-items: start; }
.film.reel video { aspect-ratio: 9 / 16; object-fit: contain; background: #000; }
@media (max-width: 860px) {
  .films { grid-template-columns: 1fr; }
  .film.reel { width: 100%; max-width: 340px; justify-self: center; }
}

/* How it works: a real sequence, with physical keycaps (the one tactile moment on the page) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s7); }
.steps li { display: grid; gap: var(--s4); align-content: start; }
.keys { display: flex; gap: 10px; align-items: flex-end; min-height: 80px; }
.cap {
  display: inline-grid; place-items: center; min-width: 64px; height: 64px; padding: 0 16px; border-radius: 12px;
  font: 600 1.55rem/1 var(--mono); color: var(--ink); background: var(--cap-top);
  border: 1px solid var(--cap-edge); box-shadow: 0 6px 0 var(--cap-side), 0 8px 14px rgb(0 0 0 / 0.08);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.cap.word { font-family: var(--font); font-size: 1.05rem; font-weight: 600; }
.cap.emo { font-family: var(--emoji); font-weight: 400; font-size: 1.9rem; }
.steps li:hover .cap { transform: translateY(4px); box-shadow: 0 2px 0 var(--cap-side), 0 3px 6px rgb(0 0 0 / 0.08); }
.steps h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.steps h3 span { color: var(--muted); font: 500 0.85em var(--mono); margin-right: 8px; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: var(--s6); } }

/* Privacy: plain list, hairlines, no decoration */
.proofs { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.proof { padding: var(--s6) var(--s6) var(--s6) 0; border-bottom: 1px solid var(--line); }
.proof:nth-child(odd) { border-right: 1px solid var(--line); }
.proof:nth-child(even) { padding-left: var(--s6); }
.proof h3 { margin: 0 0 var(--s2); font-size: 1.15rem; letter-spacing: -0.01em; }
.proof p { margin: 0; color: var(--muted); max-width: 46ch; }
.proof code { font-family: var(--mono); font-size: 0.9em; }
@media (max-width: 760px) { .proofs { grid-template-columns: 1fr; } .proof, .proof:nth-child(even) { padding: var(--s5) 0; border-right: 0; } }

/* Features: emoji as the only color */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s7) var(--s8); }
.feature { display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: start; }
.feature .glyph { font-family: var(--emoji); font-size: 2.4rem; line-height: 1; }
.feature h3 { margin: 0 0 6px; font-size: 1.15rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); margin-top: var(--s8); border-top: 1px solid var(--line); padding-top: var(--s6); }
.stat .num { font: 700 clamp(2.2rem, 4vw, 3rem)/1 var(--font); letter-spacing: -0.045em; margin: 0 0 var(--s2); }
.stat p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; gap: var(--s6); } .stats { grid-template-columns: 1fr; } }

/* Tray panel showcase */
.panel-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: center; }
.panel-row picture img { width: 100%; max-width: 420px; margin: 0 auto; }
@media (max-width: 860px) { .panel-row { grid-template-columns: 1fr; gap: var(--s6); } }

/* FAQ */
.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s4) 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--font); color: var(--muted); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: var(--s3) 0 0; color: var(--muted); max-width: 62ch; }

/* Download */
.get { text-align: center; }
.get img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto var(--s5); }
.get h2 { margin: 0 auto var(--s3); }
.get .meta { color: var(--muted); margin: 0 auto var(--s6); max-width: 46ch; }
.get .store-badge { display: block; width: max-content; margin: var(--s4) auto 0; border-radius: 6px; }
.get .store-badge img { display: block; height: 48px; width: auto; }
.get .alt { margin: var(--s5) auto 0; color: var(--muted); font-size: 0.94rem; max-width: 60ch; }

/* Footer */
footer { padding: var(--s6) 0 var(--s7); color: var(--muted); font-size: 0.92rem; border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); }
.foot nav { display: flex; gap: var(--s5); flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Motion: one calm load for the hero, quiet reveals below */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.7s var(--ease) both; }
  .rise.d1 { animation-delay: 0.06s; } .rise.d2 { animation-delay: 0.12s; } .rise.d3 { animation-delay: 0.18s; }
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Simple pages (privacy, 404) */
.page { padding: var(--s8) 0; max-width: 720px; }
.page h1 { font-size: clamp(2.2rem, 4.4vw, 3rem); letter-spacing: -0.04em; line-height: 1.05; margin: 0 0 var(--s5); }
.page h2 { font-size: 1.35rem; margin: var(--s6) 0 var(--s2); max-width: none; letter-spacing: -0.02em; }
.page p, .page li { color: var(--muted); }
.page .big { font-size: 4rem; margin: 0 0 var(--s4); }

h1, h2 { text-wrap: balance; }

/* ---------- Optional surveys (uninstall page and after download) ---------- */
.survey fieldset { border: 0; padding: 0; margin: var(--s6) 0 var(--s5); }
.survey legend { font-weight: 600; font-size: 1.1rem; margin-bottom: var(--s3); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 0.95rem; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chips label:hover span { border-color: var(--muted); }
.chips input:checked + span { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.note-label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.survey textarea {
  width: 100%; font: 400 1rem/1.5 var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; resize: vertical;
}
.survey textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: transparent; }
.survey .hint { font-size: 0.9rem; margin: 6px 0 var(--s5); }
.survey .status { min-height: 1.5em; margin: var(--s3) 0 0; font-size: 0.95rem; }
.survey .status.ok { color: var(--ink); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.heard { margin: var(--s6) auto 0; max-width: 640px; padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; }
.heard[hidden] { display: none; }
.heard .survey fieldset { margin: 0 0 var(--s3); }
.heard p.thanks { margin: 0; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .heard:not([hidden]) { animation: rise 0.4s var(--ease) both; } }
