/* Dubkey: design system.
   Two voices: coral is yours (the language you speak), teal is theirs (what gets typed).
   Ink surfaces from the app icon. System fonts only, no web fonts, no third-party anything. */

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --bg:#101218;        --panel:#151821;     --card:#1A1E28;
  --text-hi:#F3F3F1;   --text:#D7D8DC;      --text-dim:#9DA1AB;  --text-faint:#6C717C;
  --coral:#FF6A4D;     --coral-ink:#3A0F06; --teal:#2EC5B6;      --teal-ink:#05302C;
  --coral-glow:rgba(255,106,77,.16);
  --teal-glow:rgba(46,197,182,.16);
  --hairline:rgba(255,255,255,.08);
  --hairline-strong:rgba(255,255,255,.16);
  --card-stroke:rgba(255,255,255,.10);
  --shadow:0 1px 0 rgba(255,255,255,.03), 0 28px 64px -24px rgba(0,0,0,.66);
  color-scheme: dark;

  --font-mono:ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --font-sans:-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --maxw:1120px;
  --r:14px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg:#F5F5F7;        --panel:#ECEDF1;     --card:#FFFFFF;
    --text-hi:#15171D;   --text:#30333B;      --text-dim:#5F6470;  --text-faint:#9A9FA9;
    --coral:#E8512F;     --teal:#13A193;
    --coral-glow:rgba(232,81,47,.12);
    --teal-glow:rgba(19,161,147,.12);
    --hairline:rgba(0,0,0,.08);
    --hairline-strong:rgba(0,0,0,.14);
    --card-stroke:rgba(0,0,0,.09);
    --shadow:0 1px 0 rgba(0,0,0,.02), 0 28px 64px -28px rgba(20,25,35,.18);
    color-scheme: light;
  }
}
[data-theme="light"] {
  --bg:#F5F5F7;        --panel:#ECEDF1;     --card:#FFFFFF;
  --text-hi:#15171D;   --text:#30333B;      --text-dim:#5F6470;  --text-faint:#9A9FA9;
  --coral:#E8512F;     --teal:#13A193;
  --coral-glow:rgba(232,81,47,.12);
  --teal-glow:rgba(19,161,147,.12);
  --hairline:rgba(0,0,0,.08);
  --hairline-strong:rgba(0,0,0,.14);
  --card-stroke:rgba(0,0,0,.09);
  --shadow:0 1px 0 rgba(0,0,0,.02), 0 28px 64px -28px rgba(20,25,35,.18);
  color-scheme: light;
}
[data-theme="dark"] { color-scheme: dark; }

/* ---- Reset / base -------------------------------------------------------- */
*,*::before,*::after { box-sizing:border-box; }
* { margin:0; }
html { -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body {
  font-family:var(--font-sans); background:var(--bg); color:var(--text);
  line-height:1.6; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
a { color:inherit; text-decoration:none; }
img,svg { display:block; max-width:100%; }
button { font:inherit; color:inherit; background:none; border:none; cursor:pointer; }
:focus-visible { outline:2px solid var(--coral); outline-offset:2px; border-radius:4px; }

.mono { font-family:var(--font-mono); }
.coral { color:var(--coral); }
.teal { color:var(--teal); }
.wrap { width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:24px; }

/* ---- Type ---------------------------------------------------------------- */
h1,h2,h3 { font-family:var(--font-sans); color:var(--text-hi); font-weight:650; letter-spacing:-.025em; line-height:1.07; }
.eyebrow { font-family:var(--font-mono); font-size:12px; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--coral); }
.lede { color:var(--text-dim); font-size:clamp(16px,1.7vw,19px); }

/* ---- Nav ----------------------------------------------------------------- */
.nav {
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:saturate(140%) blur(12px);
  border-bottom:1px solid var(--hairline);
}
.nav__in { display:flex; align-items:center; gap:18px; height:60px; }
.brand { display:flex; align-items:center; gap:9px; font-weight:650; color:var(--text-hi); letter-spacing:-.02em; font-size:17px; }
.brand__ic { width:26px; height:26px; display:block; flex:none; }
.nav__links { display:flex; gap:22px; margin-left:8px; }
.nav__links a { font-size:14px; color:var(--text-dim); transition:color .2s; }
.nav__links a:hover { color:var(--text-hi); }
.nav__spacer { flex:1; }
.nav__right { display:flex; align-items:center; gap:12px; }

.theme-toggle {
  font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.12em;
  color:var(--text-dim); padding:6px 10px; border:1px solid var(--hairline);
  border-radius:999px; display:inline-flex; align-items:center; gap:7px; transition:.2s;
}
.theme-toggle:hover { color:var(--text-hi); border-color:var(--hairline-strong); }
.theme-toggle .ind { width:7px; height:7px; border-radius:50%; background:linear-gradient(90deg,var(--coral) 50%,var(--teal) 50%); }

/* ---- Buttons ------------------------------------------------------------- */
.btn { display:inline-flex; align-items:center; gap:9px; font-size:15px; font-weight:600; padding:12px 20px; border-radius:12px; transition:transform .15s, filter .2s, border-color .2s; }
.btn:active { transform:translateY(1px); }
.btn-coral { background:var(--coral); color:#fff; box-shadow:0 8px 24px -8px var(--coral-glow); }
.btn-coral:hover { filter:brightness(1.06); }
.btn-coral.sm { padding:8px 14px; font-size:13.5px; border-radius:10px; }
.btn-ghost { color:var(--text); border:1px solid var(--hairline-strong); }
.btn-ghost:hover { border-color:var(--teal); color:var(--text-hi); }
.btn svg { width:18px; height:18px; }
.appstore { display:inline-flex; align-items:center; gap:10px; text-align:left; }
.appstore small { display:block; font-size:10px; line-height:1; opacity:.9; letter-spacing:.03em; font-weight:500; }
.appstore b { display:block; font-size:16px; line-height:1.15; letter-spacing:-.01em; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding:64px 0 24px; text-align:center; position:relative; }
.hero::before {
  content:""; position:absolute; inset:-80px 0 auto 0; height:520px; z-index:-1; pointer-events:none;
  background:
    radial-gradient(40% 60% at 35% 40%, var(--coral-glow), transparent 70%),
    radial-gradient(40% 60% at 65% 40%, var(--teal-glow), transparent 70%);
}
.hero__ic { width:112px; height:112px; margin:0 auto 26px; filter:drop-shadow(0 16px 36px rgba(0,0,0,.34)); }
.hero__h1 { font-size:clamp(36px,6.4vw,68px); }
.hero__h1 .l { display:block; }
.hero__sub { margin:22px auto 30px; max-width:54ch; }
.hero__cta { display:flex; align-items:center; justify-content:center; gap:18px; flex-wrap:wrap; }
.hero__req { font-family:var(--font-mono); font-size:12.5px; color:var(--text-faint); }

/* The conversation demo: their message, what you say, what Dubkey types. */
.convo { max-width:460px; margin:46px auto 0; display:flex; flex-direction:column; gap:12px; text-align:left; }
.bubble { max-width:82%; padding:11px 16px; border-radius:20px; font-size:16px; line-height:1.4; }
.bubble__cap { display:block; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-faint); margin:0 6px 4px; }
.row { display:flex; flex-direction:column; }
.row--them { align-items:flex-start; }
.row--you { align-items:flex-end; }
.bubble--them { background:var(--card); border:1px solid var(--card-stroke); color:var(--text-hi); border-bottom-left-radius:6px; }
.bubble--said { border:1.5px dashed var(--coral); color:var(--text); font-style:italic; border-bottom-right-radius:6px; }

.bubble--sent { background:var(--teal); color:#fff; border-bottom-right-radius:6px; }
.means { font-size:13px; color:var(--text-dim); margin:6px 8px 0; }
.means b { color:var(--text); font-weight:600; }

/* ---- Sections ------------------------------------------------------------ */
.section { padding:84px 0; }
.section__head { max-width:62ch; margin-bottom:38px; }
.section__head h2 { font-size:clamp(25px,3.4vw,36px); margin:12px 0 12px; }
.section__head p { color:var(--text-dim); }

/* Steps */
.steps { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; counter-reset:step; }
.step { border:1px solid var(--card-stroke); border-radius:var(--r); padding:24px; background:var(--card); }
.step__n { font-family:var(--font-mono); font-size:12px; color:var(--text-faint); letter-spacing:.12em; }
.step h3 { font-size:18px; margin:10px 0 8px; }
.step p { color:var(--text-dim); font-size:14.5px; }
.step--you h3 { color:var(--coral); }
.step--them h3 { color:var(--teal); }

/* Modes / features */
.features { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px,1fr)); gap:14px; }
.feature { border:1px solid var(--card-stroke); border-radius:var(--r); padding:24px; background:var(--card); transition:border-color .2s, transform .2s; }
.feature:hover { border-color:var(--hairline-strong); transform:translateY(-2px); }
.feature__ic { width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:var(--coral-glow); color:var(--coral); margin-bottom:16px; }
.feature__ic.t { background:var(--teal-glow); color:var(--teal); }
.feature__ic svg { width:20px; height:20px; }
.feature h3 { font-size:17px; margin-bottom:8px; }
.feature p { color:var(--text-dim); font-size:14.5px; line-height:1.55; }

/* Split: text + aside */
.split { display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:center; }
.panel { border:1px solid var(--card-stroke); border-radius:var(--r); background:var(--card); padding:26px; box-shadow:var(--shadow); }
.panel h3 { font-size:15px; font-family:var(--font-mono); font-weight:500; letter-spacing:.08em; text-transform:uppercase; color:var(--text-faint); margin-bottom:14px; }
.ticks { list-style:none; padding:0; display:flex; flex-direction:column; gap:12px; }
.ticks li { display:flex; gap:12px; color:var(--text); font-size:15px; line-height:1.5; }
.ticks li::before { content:""; width:7px; height:7px; border-radius:50%; margin-top:8px; flex:none; background:var(--teal); }

/* Languages */
.langs { display:flex; flex-wrap:wrap; gap:8px; }
.lang { font-size:14px; padding:7px 13px; border-radius:999px; border:1px solid var(--card-stroke); background:var(--card); color:var(--text); }

/* Pricing band */
.band { border-block:1px solid var(--hairline); background:linear-gradient(90deg, color-mix(in srgb, var(--coral) 7%, transparent), color-mix(in srgb, var(--teal) 7%, transparent)); }
.band__in { text-align:center; padding:72px 24px; max-width:660px; margin:0 auto; }
.band h2 { font-size:clamp(26px,3.6vw,38px); margin:14px 0 12px; }
.band p { color:var(--text-dim); margin-bottom:26px; }

/* FAQ */
.faq { max-width:780px; }
.faq details { border-top:1px solid var(--hairline); }
.faq details:last-of-type { border-bottom:1px solid var(--hairline); }
.faq summary { list-style:none; cursor:pointer; padding:19px 2px; display:flex; align-items:center; gap:12px; font-size:16px; font-weight:600; color:var(--text-hi); }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:"+"; margin-left:auto; color:var(--text-faint); font-size:20px; line-height:1; font-weight:400; }
.faq details[open] summary::after { content:"\2013"; }
.faq__a { color:var(--text-dim); padding:0 2px 20px; font-size:15px; line-height:1.62; max-width:68ch; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { border-top:1px solid var(--hairline); margin-top:96px; padding:40px 0 56px; }
.site-footer__in { display:flex; flex-wrap:wrap; gap:18px 28px; align-items:center; }
.site-footer a { font-size:14px; color:var(--text-dim); transition:color .2s; }
.site-footer a:hover { color:var(--text-hi); }
.site-footer__brand { display:flex; align-items:center; gap:9px; font-weight:650; color:var(--text); }
.site-footer__spacer { flex:1; }
.site-footer__legal { width:100%; font-size:12.5px; color:var(--text-faint); line-height:1.7; padding-top:10px; border-top:1px solid var(--hairline); margin-top:6px; }

/* ---- Prose pages (privacy / support) ------------------------------------- */
.page { max-width:740px; padding:60px 24px 8px; }
.page h1 { font-size:clamp(30px,4.4vw,42px); margin-bottom:10px; }
.page__meta { font-family:var(--font-mono); font-size:12.5px; color:var(--text-faint); margin-bottom:34px; }
.page h2 { font-size:19px; margin:36px 0 10px; }
.page p { color:var(--text-dim); margin-bottom:14px; max-width:68ch; }
.page a.link, .faq__a a, .section a.link { color:var(--coral); }
.page a.link:hover, .faq__a a:hover { text-decoration:underline; }
.page ul, .page ol { color:var(--text-dim); margin:0 0 14px; padding-left:22px; }
.page li { margin-bottom:8px; max-width:66ch; }
.page code, .faq__a code { font-family:var(--font-mono); font-size:.92em; color:var(--text); }
.callout { border:1px solid var(--card-stroke); border-left:3px solid var(--teal); border-radius:10px; background:var(--card); padding:16px 18px; margin:0 0 18px; color:var(--text); }

/* ---- Reveal-on-scroll ---------------------------------------------------- */
.js .reveal { opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.001ms !important; transition-duration:.001ms !important; }
  .js .reveal { opacity:1; transform:none; }
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width:820px) {
  .steps { grid-template-columns:1fr; }
  .split { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .nav__links { display:none; }
  .wrap { padding-inline:16px; }
  .page { padding-inline:16px; }
  .section { padding:60px 0; }
  .theme-toggle { display:none; }
}
