:root {
  --ink: #071b2b;
  --blue: #073f8c;
  --blue-bright: #0c5bb4;
  --gold: #d2af5d;
  --gold-soft: #f1dfad;
  --mist: #eef4f8;
  --paper: #ffffff;
  --text: #17212b;
  --muted: #5d6b78;
  --line: #dbe4ea;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(7, 27, 43, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: #f7f9fb;
  font: 400 15px/1.6 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(12,91,180,.35); outline-offset: 3px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.home-header {
  position: sticky; top: 0; z-index: 50; display: grid;
  grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem;
  min-height: 76px; padding: 10px max(24px, calc((100vw - 1440px) / 2));
  background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(7,27,43,.08);
  backdrop-filter: blur(18px); box-shadow: 0 4px 24px rgba(7,27,43,.04);
}
.home-brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.home-brand img { width: 52px; height: 52px; object-fit: contain; }
.home-brand span, .footer-brand span { display: grid; line-height: 1.15; }
.home-brand strong { font: 800 1rem/1.2 'Montserrat', sans-serif; color: var(--ink); }
.home-brand small { margin-top: 4px; color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; }
.home-nav { justify-self: center; display: flex; align-items: center; gap: 1.7rem; }
.home-nav a { color: var(--muted); font-size: .78rem; font-weight: 700; }
.home-nav a:hover { color: var(--blue); }
.home-actions { display: flex; align-items: center; gap: 8px; }
.header-dashboard-link, .install-home-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
  padding: 0 15px; border-radius: 11px; font: 800 .74rem/1 'Inter', sans-serif;
}
.header-dashboard-link { color: #fff; background: var(--ink); box-shadow: 0 7px 18px rgba(7,27,43,.16); }
.header-dashboard-link:hover { background: var(--blue); transform: translateY(-1px); }
.install-home-btn { gap: 7px; border: 1px solid var(--line); color: var(--blue); background: #fff; cursor: pointer; }
.install-home-btn:hover { border-color: var(--blue); background: var(--mist); }
.install-home-btn svg { width: 18px; height: 18px; }

main { overflow: hidden; }
.home-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr);
  align-items: center; gap: clamp(2rem, 6vw, 7rem); min-height: 650px;
  padding: clamp(4.5rem, 8vw, 8rem) max(24px, calc((100vw - 1240px) / 2));
  color: #fff; background:
    radial-gradient(circle at 79% 46%, rgba(12,91,180,.38), transparent 25rem),
    linear-gradient(118deg, #061724 0%, #092c4c 64%, #073f78 100%);
}
.home-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: linear-gradient(to right, transparent 15%, #000 80%);
}
.hero-copy { position: relative; z-index: 2; max-width: 720px; }
.eyebrow { margin: 0 0 .75rem; color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero-copy h1 {
  margin: 0; max-width: 760px; font: 800 clamp(2.5rem, 5.2vw, 5rem)/.99 'Montserrat', sans-serif;
  letter-spacing: -.055em; text-wrap: balance;
}
.hero-copy h1 span { display: block; color: var(--gold-soft); }
.hero-lead { max-width: 650px; margin: 1.65rem 0 0; color: rgba(255,255,255,.72); font-size: clamp(.96rem, 1.3vw, 1.08rem); }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2rem; }
.primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 19px; border-radius: 12px; font-weight: 800; }
.primary-action { gap: 11px; color: var(--ink); background: linear-gradient(135deg, #edd18c, var(--gold)); box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(0,0,0,.3); }
.primary-action svg { width: 20px; height: 20px; }
.secondary-action { color: #fff; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
.secondary-action:hover { background: rgba(255,255,255,.12); }
.trust-line { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; margin-top: 2.2rem; color: rgba(255,255,255,.58); font-size: .72rem; font-weight: 700; }
.trust-line span { display: inline-flex; align-items: center; gap: 6px; }
.trust-line i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(210,175,93,.12); }

.hero-emblem { position: relative; z-index: 1; min-height: 430px; display: grid; place-items: center; }
.hero-emblem img { position: relative; z-index: 2; width: min(340px, 75%); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 30px 28px rgba(0,0,0,.32)); }
.emblem-ring { position: absolute; width: min(440px, 98%); aspect-ratio: 1; border: 1px solid rgba(210,175,93,.28); border-radius: 50%; }
.emblem-ring::before, .emblem-ring::after { content: ''; position: absolute; inset: 8%; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.emblem-ring::after { inset: -7%; border-style: dashed; animation: turn 35s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.hero-note { position: absolute; z-index: 3; min-width: 174px; padding: .75rem .9rem; border: 1px solid rgba(255,255,255,.15); border-radius: 13px; background: rgba(7,27,43,.72); box-shadow: 0 16px 30px rgba(0,0,0,.24); backdrop-filter: blur(12px); }
.hero-note span { display: block; color: var(--gold); font-size: .61rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-note strong { display: block; margin-top: 2px; color: #fff; font-size: .76rem; }
.note-income { top: 15%; right: -2%; }
.note-health { bottom: 12%; left: -7%; }

.purpose-band {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.3rem max(24px, calc((100vw - 1240px) / 2)); color: var(--ink); background: var(--gold-soft);
}
.purpose-band p { margin: 0; max-width: 880px; font-weight: 700; }
.purpose-band a { flex: 0 0 auto; font-size: .78rem; font-weight: 800; }

.feature-section, .workflow-section { padding: clamp(4.5rem, 8vw, 7rem) max(24px, calc((100vw - 1240px) / 2)); }
.section-intro { display: grid; grid-template-columns: .72fr 1.28fr; gap: 1rem 4rem; align-items: end; margin-bottom: 2.3rem; }
.section-intro .eyebrow { grid-column: 1 / -1; margin-bottom: -.35rem; color: var(--blue); }
.section-intro h2, .workflow-heading h2, .privacy-section h2 { margin: 0; font: 800 clamp(2rem, 3.8vw, 3.4rem)/1.05 'Montserrat', sans-serif; letter-spacing: -.045em; color: var(--ink); }
.section-intro > p:last-child { margin: 0; max-width: 500px; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-card { position: relative; min-height: 255px; padding: 1.45rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 7px 24px rgba(7,27,43,.04); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature-card:hover { transform: translateY(-4px); border-color: #b9cbd8; box-shadow: var(--shadow); }
.feature-primary { color: #fff; border-color: var(--blue); background: linear-gradient(145deg, var(--blue), #052d64); }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--blue); background: var(--mist); }
.feature-primary .feature-icon { color: var(--gold-soft); background: rgba(255,255,255,.1); }
.feature-icon svg { width: 22px; height: 22px; }
.feature-number { position: absolute; top: 1.35rem; right: 1.35rem; color: #a8b5bf; font: 800 .68rem/1 'Montserrat', sans-serif; letter-spacing: .12em; }
.feature-primary .feature-number { color: rgba(255,255,255,.42); }
.feature-card h3 { margin: 2rem 0 .55rem; font: 800 1.12rem/1.2 'Montserrat', sans-serif; color: var(--ink); }
.feature-primary h3 { color: #fff; }
.feature-card p { margin: 0; color: var(--muted); font-size: .84rem; }
.feature-primary p { color: rgba(255,255,255,.68); }
.feature-link { display: block; margin-top: 1.2rem; color: var(--gold-soft); font-size: .75rem; font-weight: 800; }

.workflow-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; color: #fff; background: var(--ink); }
.workflow-heading { align-self: start; position: sticky; top: 110px; }
.workflow-heading h2 { color: #fff; }
.workflow-list { list-style: none; margin: 0; padding: 0; counter-reset: steps; }
.workflow-list li { display: grid; grid-template-columns: 58px 1fr; gap: 1.1rem; padding: 1.4rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.workflow-list li:first-child { padding-top: 0; }
.workflow-list li > span { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(210,175,93,.45); border-radius: 50%; color: var(--gold); font: 800 .8rem/1 'Montserrat', sans-serif; }
.workflow-list strong { display: block; color: #fff; font: 800 1rem/1.3 'Montserrat', sans-serif; }
.workflow-list p { margin: .35rem 0 0; color: rgba(255,255,255,.62); font-size: .84rem; }

.privacy-section { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; padding: clamp(3rem, 6vw, 5rem) max(24px, calc((100vw - 1240px) / 2)); background: #eaf2f8; }
.privacy-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; color: var(--blue); background: #fff; box-shadow: 0 12px 30px rgba(7,27,43,.08); }
.privacy-mark svg { width: 35px; height: 35px; }
.privacy-section .eyebrow { color: var(--blue); margin-bottom: .45rem; }
.privacy-section h2 { font-size: clamp(1.7rem, 3vw, 2.8rem); }
.privacy-section p:last-child { max-width: 760px; margin: .8rem 0 0; color: var(--muted); }
.privacy-section > a { min-height: 46px; display: inline-flex; align-items: center; padding: 0 17px; border-radius: 11px; color: #fff; background: var(--blue); font-size: .76rem; font-weight: 800; }

.home-footer { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 2rem; padding: 1.4rem max(24px, calc((100vw - 1240px) / 2)); color: rgba(255,255,255,.6); background: #04111c; font-size: .72rem; }
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand img { object-fit: contain; }
.footer-brand strong { color: #fff; font-family: 'Montserrat', sans-serif; }
.footer-brand small { color: var(--gold); }
.home-footer a { color: #fff; font-weight: 800; }

.home-install-dialog { width: min(92vw, 480px); padding: 1.25rem; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 28px 80px rgba(7,27,43,.3); }
.home-install-dialog::backdrop { background: rgba(7,27,43,.72); backdrop-filter: blur(6px); }
.home-install-dialog[open] { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; }
.home-install-dialog img { border-radius: 15px; }
.home-install-dialog .eyebrow { color: var(--blue); margin-bottom: .2rem; }
.home-install-dialog h2 { margin: 0; font: 800 1.15rem/1.25 'Montserrat', sans-serif; }
.home-install-dialog p:last-child { color: var(--muted); font-size: .8rem; }
.home-install-dialog button { grid-column: 1 / -1; min-height: 42px; border: 0; border-radius: 10px; color: #fff; background: var(--ink); font-weight: 800; cursor: pointer; }

@media (max-width: 1000px) {
  .home-header { grid-template-columns: auto 1fr; }
  .home-nav { display: none; }
  .home-actions { justify-self: end; }
  .home-hero { grid-template-columns: 1fr .75fr; min-height: 590px; }
  .hero-emblem { min-height: 350px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-section { gap: 3rem; }
}

@media (max-width: 720px) {
  .home-header { gap: .7rem; min-height: 70px; padding: max(8px, env(safe-area-inset-top)) .8rem 8px; }
  .home-brand img { width: 44px; height: 44px; }
  .home-brand small { display: none; }
  .home-actions { gap: 5px; }
  .install-home-btn, .header-dashboard-link { min-height: 42px; padding-inline: 11px; }
  .install-home-btn { width: 42px; padding: 0; font-size: 0; }
  .home-hero { grid-template-columns: 1fr; min-height: auto; padding: 4rem 1rem 3rem; }
  .hero-copy h1 { font-size: clamp(2.35rem, 13vw, 3.7rem); }
  .hero-emblem { min-height: 300px; margin-top: .5rem; }
  .hero-emblem img { width: 230px; }
  .emblem-ring { width: 290px; }
  .hero-note { min-width: 150px; padding: .6rem .7rem; }
  .note-income { right: 0; }
  .note-health { left: 0; }
  .trust-line { gap: .7rem 1rem; }
  .purpose-band { align-items: flex-start; flex-direction: column; gap: .6rem; padding: 1rem; }
  .feature-section, .workflow-section { padding: 4rem 1rem; }
  .section-intro { grid-template-columns: 1fr; gap: .8rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 225px; }
  .workflow-section { grid-template-columns: 1fr; gap: 2.5rem; }
  .workflow-heading { position: static; }
  .privacy-section { grid-template-columns: auto 1fr; gap: 1rem; padding: 3rem 1rem; }
  .privacy-mark { width: 58px; height: 58px; border-radius: 16px; }
  .privacy-section > a { grid-column: 1 / -1; justify-content: center; }
  .home-footer { grid-template-columns: 1fr auto; padding: 1.2rem 1rem max(1.2rem, env(safe-area-inset-bottom)); }
  .home-footer > p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media (display-mode: standalone) {
  .home-header { padding-top: max(10px, env(safe-area-inset-top)); }
  .install-home-btn { display: none !important; }
}
