/* Keyfidant marketing site — brand colours from the app (public/assets/style.css) */
:root {
  --bg: #f5f3ee;
  --bg-soft: #efece4;
  --card: #ffffff;
  --ink: #1b2420;
  --muted: #5d6a64;
  --line: #e4e0d6;
  --accent: #0f5c4c;
  --accent-deep: #0b4a3d;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0ec;
  --wait-bg: #fbefd5;
  --wait-ink: #7a5200;
  --shadow-sm: 0 1px 2px rgba(27,36,32,.06), 0 4px 16px rgba(27,36,32,.05);
  --shadow-lg: 0 20px 50px -24px rgba(11,74,61,.45);
  --radius: 16px;
  --maxw: 1080px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101513;
    --bg-soft: #151b18;
    --card: #1a221e;
    --ink: #eef2ef;
    --muted: #a3b0a9;
    --line: #2b352f;
    --accent: #5fc9ae;
    --accent-deep: #4fb89d;
    --accent-ink: #06231c;
    --accent-soft: #19332c;
    --wait-bg: #3d3113;
    --wait-ink: #f1cf7f;
    --shadow-sm: none;
    --shadow-lg: 0 20px 50px -24px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101513;
  --bg-soft: #151b18;
  --card: #1a221e;
  --ink: #eef2ef;
  --muted: #a3b0a9;
  --line: #2b352f;
  --accent: #5fc9ae;
  --accent-deep: #4fb89d;
  --accent-ink: #06231c;
  --accent-soft: #19332c;
  --wait-bg: #3d3113;
  --wait-ink: #f1cf7f;
  --shadow-sm: none;
  --shadow-lg: 0 20px 50px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); 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(--display); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 12px; border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* app store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 13px; min-width: 200px;
  transition: transform .12s ease, opacity .12s ease;
}
:root[data-theme="dark"] .store-btn, :root:not([data-theme="light"]) .store-btn { background: #000; color: #fff; }
.store-btn:hover { transform: translateY(-2px); }
.store-btn svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store-btn .st { display: grid; line-height: 1.15; }
.store-btn .st small { font-size: .68rem; opacity: .85; font-weight: 500; letter-spacing: .02em; }
.store-btn .st b { font-family: var(--display); font-size: 1.12rem; font-weight: 600; }
.store-btn.is-pending { background: var(--accent-soft); color: var(--accent); outline: 1.5px dashed var(--accent); }
.store-note { font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top, 0px);
  transition: border-color .2s ease, background .2s ease;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.22rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 22px; height: 27px; border-radius: 11px 11px 3px 3px; background: var(--accent); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; right: 4px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-ink); }
.head-right { display: flex; align-items: center; gap: 8px; }
.head-nav { display: flex; gap: 6px; }
.head-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 9px; }
.head-nav a:hover { color: var(--ink); background: var(--bg-soft); }
@media (max-width: 760px) { .head-nav { display: none; } }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.lang button { border: 0; background: transparent; color: var(--muted); font: 600 .82rem var(--sans); padding: 7px 11px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 7vw, 86px) 0 clamp(36px, 5vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
.hero .lede { font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--muted); margin-top: 20px; max-width: 34ch; }
.hero-cta { margin-top: 30px; display: grid; gap: 14px; }
.audience { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.audience span { font-size: .85rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-cta .stores, .audience { justify-content: center; }
  .phone-wrap { order: -1; }
}

/* phone mockup */
.phone-wrap { display: flex; justify-content: center; position: relative; }
.phone-wrap::before { content: ""; position: absolute; inset: -8% -4% 2%; background: radial-gradient(60% 55% at 50% 35%, var(--accent-soft), transparent 72%); z-index: 0; }
.phone {
  position: relative; z-index: 1; width: min(290px, 78vw); aspect-ratio: 1080/2160;
  background: #0c0f0e; border-radius: 38px; padding: 9px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,.2);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; background: var(--card); }
.phone::after { content: ""; position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 34%; height: 20px; background: #0c0f0e; border-radius: 0 0 14px 14px; z-index: 2; }

/* ---------- generic section ---------- */
section { padding: clamp(48px, 7vw, 92px) 0; }
.section-head { max-width: 40ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.08rem; }
.alt { background: var(--bg-soft); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 30px); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); display: grid; gap: 12px; align-content: start; }
.step .num { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-family: var(--display); font-weight: 600; font-size: 1.15rem; display: grid; place-items: center; }
.step h3 { font-size: 1.2rem; }
.step p { color: var(--muted); font-size: .98rem; }
.step .shot { margin-top: 6px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: var(--bg); }
.step .shot img { width: 100%; height: auto; }

/* security grid */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2.4vw, 22px); }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feat { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.feat .ic { flex: none; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feat .ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.feat h3 { font-size: 1.1rem; }
.feat p { color: var(--muted); font-size: .96rem; margin-top: 5px; }

/* pricing */
.prices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 760px; margin: 0 auto; }
@media (max-width: 680px) { .prices { grid-template-columns: 1fr; } }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); display: grid; gap: 14px; align-content: start; }
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow-lg); position: relative; }
.price-card .tag { position: absolute; top: -12px; right: 24px; background: var(--accent); color: var(--accent-ink); font: 600 .74rem var(--display); letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.price-card h3 { font-size: 1.3rem; }
.price-card .amount { font-family: var(--display); font-weight: 600; font-size: 2.6rem; letter-spacing: -.03em; display: flex; align-items: baseline; gap: 8px; }
.price-card .amount span { font-size: 1rem; font-weight: 500; color: var(--muted); font-family: var(--sans); }
.price-card ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 11px; }
.price-card li { position: relative; padding-left: 28px; color: var(--muted); font-size: .97rem; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5c4c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-size: 11px; background-repeat: no-repeat; background-position: center; }
.price-foot { max-width: 760px; margin: 22px auto 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 4px 20px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-family: var(--display); font-weight: 600; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--accent); font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .ans { padding: 0 0 20px; color: var(--muted); }
.faq .ans a { color: var(--accent); }

/* CTA band */
.cta { background: var(--accent); color: var(--accent-ink); }
:root:not([data-theme="light"]) .cta, :root[data-theme="dark"] .cta { background: var(--accent-soft); color: var(--ink); }
.cta .wrap { text-align: center; display: grid; gap: 22px; justify-items: center; }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: inherit; }
.cta p { max-width: 46ch; opacity: .92; }
.cta .stores .store-btn { background: #fff; color: #11231d; }
.cta .store-btn.is-pending { background: rgba(255,255,255,.16); color: #fff; outline-color: rgba(255,255,255,.7); }

/* footer */
.site-foot { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 48px 0 40px; }
.site-foot .wrap { display: grid; gap: 26px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.foot-links a:hover { color: var(--accent); }
.foot-legal { color: var(--muted); font-size: .85rem; line-height: 1.7; border-top: 1px solid var(--line); padding-top: 22px; }
.foot-legal b { color: var(--ink); font-weight: 600; }
