/* altpass.app — same Aura/Dusk tokens as the product (theme.dart / popup.css).
 * The site IS the app's design language: peach→lilac→ice wash + white glass
 * by day, deep-indigo dusk + luminous glass by night, one lavender→mint jewel. */

:root {
  color-scheme: light dark;
  --bg: #ece6e8;
  --bg-wash: linear-gradient(160deg, #f4e9dd 0%, #e8e3ef 45%, #d9e7ea 100%);
  --surface: #ffffff;
  --glass: color-mix(in srgb, var(--surface) 78%, transparent);
  --border: rgb(255 255 255 / 0.85);
  --text: #33302e;
  --text-secondary: #8b8580;
  --accent: #7a6ac2;
  --jewel: linear-gradient(135deg, #9d8cff, #6dd6c1);
  --jewel-glow: 0 6px 24px rgb(157 140 255 / 0.35);
  --shadow: 0 1px 2px rgb(90 80 100 / 0.05), 0 8px 22px rgb(90 80 100 / 0.09);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131019;
    --bg-wash: linear-gradient(175deg, #17141f 0%, #100e17 100%);
    --surface: #1d1926;
    --glass: rgb(255 255 255 / 0.05);
    --border: rgb(255 255 255 / 0.075);
    --text: #efedf5;
    --text-secondary: #8d87a0;
    --accent: #9d8cff;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.07) inset;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-wash), var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--jewel-glow); }
.brand strong { font-size: 19px; letter-spacing: -0.01em; }
nav.site a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-left: 22px;
}
nav.site a:hover { color: var(--text); }

/* i18n — one page, two languages; show only the active one. */
html[lang="en"] [lang="es"], html[lang="es"] [lang="en"] { display: none !important; }

.lang-toggle {
  margin-left: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.lang-toggle:hover { color: var(--text); border-color: var(--accent); }
.lang-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0 48px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  background: var(--jewel);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 46ch;
}
.phone {
  justify-self: center;
  width: min(300px, 80vw);
  border-radius: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow), var(--jewel-glow);
  overflow: hidden;
}
.phone img { display: block; width: 100%; }

/* ── Buttons ── */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--glass);
  backdrop-filter: blur(10px);
}
.btn.jewel {
  background: var(--jewel);
  color: #fff;
  border: none;
  box-shadow: var(--jewel-glow);
}
.btn .soon {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.12);
}
.note { font-size: 13px; color: var(--text-secondary); }

/* ── Sections ── */
section { padding: 44px 0; }
h2 {
  font-size: 28px;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 6px;
}
p.sub { color: var(--text-secondary); max-width: 62ch; margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 22px;
}
.card .icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--jewel);
  display: grid; place-items: center;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: var(--jewel-glow);
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 14px; color: var(--text-secondary); }

/* screenshots strip */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.shots figure { margin: 0; }
.shots img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.shots figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
}

/* platforms */
.platforms { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
}

/* security spec list */
.spec { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.spec li {
  display: flex; gap: 12px; align-items: baseline;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
}
.spec li::before { content: '◆'; font-size: 11px; color: var(--accent); }
.spec b { font-weight: 600; }

/* ── How sync works — three numbered steps ── */
.steps {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 24px 22px;
}
.step-n {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--jewel);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--jewel-glow);
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--text-secondary); }
/* connective thread between steps on wide layouts */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 41px; right: -9px;
  width: 18px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.5;
}

/* ── FAQ — native <details> accordion ── */
.faq { margin-top: 28px; display: grid; gap: 12px; }
.qa {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 4px 20px;
}
.qa summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '+';
  color: var(--accent);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: transform 200ms ease;
}
.qa[open] summary::after { transform: rotate(45deg); }
.qa summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.qa p { margin: 0 0 16px; font-size: 15px; color: var(--text-secondary); max-width: 64ch; }
.qa code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}

/* ── Footer ── */
footer.site {
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 14px;
}
footer.site a { color: var(--text-secondary); text-decoration: none; margin-right: 18px; }
footer.site a:hover { color: var(--text); }

/* ── Legal pages ── */
main.legal { max-width: 720px; margin: 0 auto; padding: 24px 24px 64px; }
main.legal h1 { letter-spacing: -0.02em; }
main.legal h2 { font-size: 20px; margin-top: 36px; }
main.legal p, main.legal li { color: var(--text); font-size: 15.5px; }
main.legal .muted { color: var(--text-secondary); font-size: 14px; }

/* Tablet: three-up grids relax to two-up before collapsing. */
@media (max-width: 920px) {
  .grid, .steps { grid-template-columns: repeat(2, 1fr); }
  nav.site a { margin-left: 16px; }
  /* the connective thread only reads on the full three-up row */
  .step::after { display: none; }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
    padding-top: 32px;
  }
  .hero p.lead { margin-inline: auto; }
  .cta-row { justify-content: center; }
  /* text (headline + CTA) leads; the phone follows as a contained preview so
     the value prop and download button are what land above the fold. */
  .phone { width: min(240px, 62vw); }
  h2 { font-size: 24px; }
}

/* Phone: single column, and the header sheds its section links so it never
   crowds — brand + language toggle only (the page is one scroll anyway). */
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .grid, .shots, .steps { grid-template-columns: 1fr; }
  .nav-link { display: none; }
  .lang-toggle { margin-left: 0; }
  section { padding: 36px 0; }
  .hero h1 { font-size: clamp(30px, 8vw, 40px); }
}

@media (prefers-reduced-motion: no-preference) {
  .phone { transition: transform 300ms ease; }
  .phone:hover { transform: translateY(-4px); }

  /* Cards and steps lift on hover — subtle, jewel-tinted. */
  .card, .step {
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  }
  .card:hover, .step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow), var(--jewel-glow);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  }

  /* Scroll-reveal — only when JS confirmed (html.js), so no-JS never hides content. */
  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms ease, transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
    will-change: opacity, transform;
  }
  html.js .reveal.in {
    opacity: 1;
    transform: none;
  }
}
