/* ==========================================================================
   fram.d marketing site
   Design tokens mirror the Flutter app (lib/theme/app_theme.dart):
   background #FFFFFF · surface #F7F7F7 · textPrimary #0A0A0A ·
   textSecondary #9E9E9E · accent #1A1A1A · border #EDEDED · font DM Sans
   ========================================================================== */

:root {
  --background: #ffffff;
  --surface: #f7f7f7;
  --text-primary: #0a0a0a;
  --text-secondary: #9e9e9e;
  --accent: #1a1a1a;
  --border: #ededed;

  --radius-card: 16px;
  --radius-button: 12px;

  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.08);

  --max-width: 1120px;
  --space-section: 120px;

  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius-button);
  font-weight: 600;
}

.nav-cta:hover {
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

/* Store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  min-width: 200px;
}

.store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.store-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-badge .badge-small {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.store-badge .badge-large {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 66px);
  margin-bottom: 24px;
}

.hero .lead {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-actions {
  margin-bottom: 20px;
}

.hero-note {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone {
  width: 300px;
  aspect-ratio: 300 / 620;
  background: var(--accent);
  border-radius: 46px;
  padding: 12px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--background);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: var(--accent);
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-topbar {
  padding: 26px 20px 14px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.phone-card {
  margin: 0 16px 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.phone-photo {
  height: 150px;
  background: linear-gradient(135deg, #1a1a1a 0%, #444 60%, #6b6b6b 100%);
  position: relative;
}

.phone-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 25%,
    rgba(255, 255, 255, 0.18),
    transparent 55%
  );
}

.phone-meta {
  padding: 12px 14px;
}

.phone-caption {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.phone-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.phone-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--background);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
}

.phone-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.phone-audio .play {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-audio .play svg {
  width: 9px;
  height: 9px;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  flex: 1;
}

.waveform span {
  flex: 1;
  background: var(--text-secondary);
  border-radius: 2px;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Logos / social proof strip
   -------------------------------------------------------------------------- */
.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.stat {
  text-align: center;
}

.stat .num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat .label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Trust / security band
   -------------------------------------------------------------------------- */
.trust-band {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 44px;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 28px;
  padding: 56px 52px;
  box-shadow: var(--shadow-card);
}

.trust-shield {
  width: 104px;
  height: 104px;
  border-radius: 26px;
  background: rgba(125, 211, 252, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.32);
  color: #7dd3fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-shield svg {
  width: 52px;
  height: 52px;
}

.trust-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 700;
  color: #7dd3fc;
  margin-bottom: 14px;
}

.trust-band h2 {
  font-size: clamp(26px, 3.6vw, 40px);
  margin-bottom: 16px;
  color: #fff;
  max-width: 640px;
}

.trust-band p {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 620px;
  margin-bottom: 26px;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
  font-weight: 500;
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dd3fc;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: var(--space-section) 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: 20px;
}

.section-head p {
  font-size: 18px;
  color: var(--text-secondary);
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-button);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  padding: 32px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}

.step .step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 20px;
}

.step h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Split / privacy feature */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split .kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.split h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 20px;
}

.split p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
}

.check-list .check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.check-list .check svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
}

.split-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-subtle);
}

.split-visual svg {
  width: 55%;
  height: auto;
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--accent);
  border-radius: 28px;
  padding: 72px 48px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-card);
}

.cta-band h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: 18px;
  color: #fff;
}

.cta-band p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 480px;
  margin: 0 auto 36px;
}

.cta-band .store-badges {
  justify-content: center;
}

.cta-band .store-badge {
  background: #fff;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
  margin-top: var(--space-section);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .brand {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.footer-col a {
  color: var(--text-primary);
  font-size: 15px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--text-secondary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Legal / document pages
   -------------------------------------------------------------------------- */
.doc {
  padding: 72px 0 40px;
}

.doc-inner {
  max-width: 760px;
  margin: 0 auto;
}

.doc .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 32px;
}

.doc .back-link:hover {
  color: var(--text-primary);
}

.doc h1 {
  font-size: clamp(34px, 5vw, 48px);
  margin-bottom: 12px;
}

.doc .updated {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.doc h2 {
  font-size: 24px;
  margin: 48px 0 16px;
}

.doc h3 {
  font-size: 18px;
  margin: 28px 0 10px;
}

.doc p,
.doc li {
  color: #3a3a3a;
  font-size: 16px;
  margin-bottom: 14px;
}

.doc ul {
  padding-left: 22px;
  margin-bottom: 20px;
}

.doc li {
  margin-bottom: 8px;
}

.doc a.inline {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc .toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 48px;
}

.doc .toc h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.doc .toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 32px;
}

.doc .toc li {
  margin-bottom: 8px;
}

.doc .toc a {
  color: var(--text-primary);
  font-size: 15px;
}

.doc .toc a:hover {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  :root {
    --space-section: 88px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions .store-badges {
    justify-content: center;
  }

  .eyebrow {
    margin-left: auto;
    margin-right: auto;
  }

  .features,
  .steps {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .trust-band {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
    padding: 44px 28px;
  }

  .trust-shield {
    margin-left: auto;
    margin-right: auto;
  }

  .trust-band h2,
  .trust-band p {
    margin-left: auto;
    margin-right: auto;
  }

  .trust-badges {
    justify-content: center;
  }

  .split-visual {
    aspect-ratio: 16 / 10;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .cta-band {
    padding: 48px 24px;
  }

  .doc .toc ul {
    columns: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   Cookie consent banner (Google Consent Mode v2)
   -------------------------------------------------------------------------- */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 660px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  z-index: 1000;
}

.consent-text {
  flex: 1 1 260px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.consent-text a {
  color: var(--text-primary);
  text-decoration: underline;
}

.consent-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.consent-btn {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text-primary);
  cursor: pointer;
}

.consent-accept {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 480px) {
  .consent-actions {
    width: 100%;
  }

  .consent-btn {
    flex: 1;
  }
}
