/* Landing (index.html). Same palette as the apps (Color.kt / iOS assets); Manrope is served
   from this site so no visitor data goes to a font provider. */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(/fonts/manrope-regular.ttf) format("truetype"); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(/fonts/manrope-semibold.ttf) format("truetype"); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(/fonts/manrope-bold.ttf) format("truetype"); }

:root {
  --primary: #167A34; --primary-dark: #146B2A; --primary-light: #DCFCE7; --jade: #5EDC7A; --on-primary: #FFFFFF;
  --bg: #F7F9F8; --surface: #FFFFFF; --surface-variant: #EEF2EF;
  --text: #17201A; --muted: #4F5B55; --border: #D7E0DB; --badge: #17201A; --on-badge: #FFFFFF;
  --shadow: rgba(23, 32, 26, 0.18);
  --error: #B3261E; --note-bg: #FFF4D6; --note-fg: #5A4300;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #5EDC7A; --primary-dark: #81E596; --primary-light: #193A25; --jade: #5EDC7A; --on-primary: #101412;
    --bg: #101412; --surface: #171C19; --surface-variant: #252C28;
    --text: #F3F6F4; --muted: #AAB7B0; --border: #3A443E; --badge: #F3F6F4; --on-badge: #101412;
    --shadow: rgba(0, 0, 0, 0.5);
    --error: #F2B8B5; --note-bg: #3A3010; --note-fg: #F5E2A8;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Manrope, -apple-system, system-ui, sans-serif; line-height: 1.5; }
body [lang="en"] { display: none; }
/* Language: site.js sets <html lang> from the visitor's choice or the browser. Rules live here,
   not injected by script, so the Content-Security-Policy can forbid inline styles. */
html[lang="en"] body [lang="es"] { display: none; }
html[lang="en"] body [lang="en"] { display: revert; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3, p { margin: 0; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* Skip link and focus */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 22px; }
.brand:hover { color: var(--text); }
/* The Kin symbol (img/kin-logo.svg) as a mask, so it takes the brand green in both themes. */
.brand-logo { flex: none; width: 34px; height: 34px; background: var(--primary); -webkit-mask: url(/img/kin-logo.svg) center / contain no-repeat; mask: url(/img/kin-logo.svg) center / contain no-repeat; }
.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-weight: 600; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang-switch button { font: inherit; font-size: 13px; font-weight: 600; border: 0; border-radius: 999px; min-width: 44px; min-height: 32px; padding: 4px 12px; background: transparent; color: var(--muted); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }

/* Sections */
section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 40px; }
.section-head p { max-width: 560px; font-size: 17px; }
h2 { font-size: 36px; line-height: 1.15; font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }

/* Hero */
.hero .container { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-copy { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.eyebrow { align-self: flex-start; background: var(--primary-light); color: var(--primary-dark); font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; }
.hero h1 { font-size: 56px; line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; }
.hero-copy > p { font-size: 19px; max-width: 540px; }
.note { font-size: 14px; }
@media (max-width: 600px) { .hero h1 { font-size: 40px; } h2 { font-size: 28px; } section { padding: 56px 0; } }

/* Store badges: disabled until the stores are live (site.js, STORE_LINKS). */
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px; border: 1.5px solid var(--badge); border-radius: 12px; background: var(--badge); color: var(--on-badge); text-decoration: none; }
.store:hover { color: var(--on-badge); }
/* Coming soon: outlined, text at full contrast (opacity dropped it below AA). */
.store[aria-disabled="true"] { background: transparent; color: var(--text); border-color: var(--muted); cursor: default; pointer-events: none; }
.store svg { flex: none; }
.store > span { display: flex; flex-direction: column; line-height: 1.2; }
.store small { font-size: 11px; }
.store strong { font-size: 17px; }
.stores.centered { justify-content: center; }

/* Illustrated phone (sample profile, decorative) */
.hero-art { flex: 1 1 320px; display: flex; justify-content: center; }
.phone { width: 300px; border-radius: 40px; background: #17201A; padding: 12px; box-shadow: 0 24px 60px var(--shadow); }
.phone-screen { border-radius: 30px; background: var(--bg); overflow: hidden; }
.phone-cover { height: 110px; background: var(--jade); }
.phone-body { padding: 0 20px 24px; margin-top: -40px; display: flex; flex-direction: column; gap: 10px; }
.avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--primary-light); border: 4px solid var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 28px; color: var(--primary); }
.phone-name { font-weight: 700; font-size: 20px; }
.phone-meta { font-size: 13px; }
.available { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--primary); font-weight: 700; }
.available::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.stat { background: var(--surface-variant); border-radius: 12px; padding: 10px 4px; text-align: center; }
.stat b { display: block; }
.stat small { font-size: 11px; color: var(--muted); }
.mini-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px; font-size: 14px; }
.mini-card small { display: block; font-size: 12px; color: var(--muted); }
.mini-button { background: var(--primary); color: var(--on-primary); border-radius: 14px; padding: 12px; text-align: center; font-weight: 700; font-size: 14px; }

/* Steps and features */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-number { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.feature svg { color: var(--primary); }
/* Four cards read better as two pairs than as three and one. */
.features-pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* Trust */
.trust { background: var(--primary-light); }
.trust .container { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.trust-copy { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; font-size: 17px; }
.trust-copy h2 { color: var(--primary-dark); }
.trust-cards { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.trust-card { background: var(--surface); border-radius: 16px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.trust-card svg { color: var(--primary); flex: none; }
.trust-card small { display: block; font-size: 14px; color: var(--muted); }

/* Final call and footer */
.cta { text-align: center; }
.cta .container { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cta h2 { font-size: 40px; }
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.site-footer .brand { font-size: 14px; font-weight: 400; color: var(--muted); }
.site-footer .site-footer .brand-logo { width: 26px; height: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; font-weight: 600; }

/* Contact (shared Atomic block, handbook/templates/landing-contact). */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-copy { display: flex; flex-direction: column; gap: 16px; }
.contact-copy .lead { font-size: 17px; }
.reasons { display: flex; flex-direction: column; gap: 12px; }
.reason { display: flex; gap: 12px; align-items: flex-start; }
.reason svg { flex: none; color: var(--primary); margin-top: 2px; }
.reason b { display: block; }
.small { font-size: 14px; }
.contact-form { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.topic { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.topic-label { font-weight: 600; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 460px) { .choices, .row { grid-template-columns: minmax(0, 1fr); } }
.choice { position: relative; display: flex; }
.choice input { position: absolute; top: 0; left: 0; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice label { flex: 1; display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice small { color: var(--muted); font-size: 14px; }
.choice input:checked + label { border: 2px solid var(--primary); padding: 11px 13px; background: var(--primary-light); }
.choice input:focus-visible + label { outline: 3px solid var(--primary); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; }
.field input, .field textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--muted); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
.field textarea { min-height: 140px; resize: vertical; }
.field [aria-invalid="true"] { border: 2px solid var(--error); }
.counter { font-size: 13px; color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; }
.field-error, .form-error { color: var(--error); font-size: 14px; }
.form-error a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 12px; min-height: 48px; padding: 12px 20px; background: var(--primary); color: var(--on-primary); cursor: pointer; width: 100%; max-width: 420px; align-self: center; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.contact-sent { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.contact-sent h3:focus { outline: none; }
/* Panels toggled by contact.js: [hidden] must win over their display rules. */
.contact-form[hidden], .contact-sent[hidden] { display: none; }
.check { width: 56px; height: 56px; border-radius: 999px; background: var(--primary-light); color: var(--primary); display: grid; place-items: center; }
.contact-note { background: var(--note-bg); color: var(--note-fg); padding: 14px 24px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; font-weight: 600; text-align: center; }
.contact-note a { color: inherit; }
