/* FinGenie website. Colours follow the app's theme (frontend/apps/mobile/src/theme.ts). */
:root {
  --page: #f4f4f1;
  --surface: #fcfcfb;
  --border: rgba(11, 11, 11, 0.09);
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #6e6d68;
  --accent: #1f68c0;
  --accent-soft: #cde2fb;
  --hero: #1c5cab;
  --hero-ink: #ffffff;
  --hero-ink-2: rgba(255, 255, 255, 0.82);
  --amber: #eda100;
  --positive: #006300;
  --notice-bg: #fff4d6;
  --notice-ink: #5a4100;
  --radius: 16px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d0d0d;
    --surface: #1a1a19;
    --border: rgba(255, 255, 255, 0.11);
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --ink-3: #a3a29a;
    --accent: #6aa8f0;
    --accent-soft: #0d366b;
    --hero: #184f95;
    --amber: #f2b33a;
    --positive: #3ec43e;
    --notice-bg: #3a2c05;
    --notice-ink: #ffe3a3;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--page); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
@media (max-width: 520px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 8px; }
  .nav { width: 100%; gap: 4px 16px; }
}

/* Buttons and store badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 20px; border-radius: 12px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-light { background: #fff; color: #0b0b0b; }
.btn-outline { border-color: var(--border); color: var(--ink); background: var(--surface); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; min-width: 200px;
  padding: 8px 18px; border-radius: 12px; background: #0b0b0b; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store small { display: block; font-size: 0.72rem; opacity: 0.85; line-height: 1.2; }
.store span { display: block; font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.store[aria-disabled="true"] { cursor: default; opacity: 0.9; }
.store-note { font-size: 0.9rem; }

/* Hero */
.hero { background: var(--hero); color: var(--hero-ink); overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 56px; align-items: center; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; padding-top: 80px; padding-bottom: 80px; } }
.hero p.lede { font-size: 1.2rem; color: var(--hero-ink-2); max-width: 34em; }
.hero .store-note { color: var(--hero-ink-2); }
.hero a:not(.store):not(.btn) { color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hero-ink-2); margin-bottom: 14px; }
.dots { display: inline-flex; gap: 4px; align-items: end; }
.dots i { display: block; border-radius: 50%; background: var(--amber); }
.dots i:nth-child(1) { width: 5px; height: 5px; }
.dots i:nth-child(2) { width: 7px; height: 7px; }
.dots i:nth-child(3) { width: 9px; height: 9px; }

/* Phone mock (pure HTML, decorative copy of the Home screen) */
.phone {
  justify-self: center; width: min(300px, 100%);
  background: #0b0b0b; border-radius: 40px; padding: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.screen { background: #f4f4f1; color: #0b0b0b; border-radius: 30px; padding: 22px 16px 18px; font-size: 14px; line-height: 1.4; }
.screen .hi { color: #52514e; font-size: 13px; margin-bottom: 10px; }
.screen .card-hero { background: #1c5cab; color: #fff; border-radius: 18px; padding: 16px; }
.screen .card-hero .label { font-size: 12px; opacity: 0.8; }
.screen .card-hero .big { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0 6px; }
.screen .meter { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.screen .meter b { display: block; height: 100%; width: 62%; background: #fff; border-radius: 4px; }
.screen .card-hero .sub { font-size: 12px; opacity: 0.85; margin-top: 8px; }
.screen .row { display: flex; justify-content: space-between; gap: 8px; background: #fcfcfb; border: 1px solid rgba(11, 11, 11, 0.08); border-radius: 14px; padding: 11px 13px; margin-top: 10px; }
.screen .row .k { color: #52514e; }
.screen .row .v { font-weight: 600; }
.screen .row .up { color: #006300; font-weight: 600; }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lede { color: var(--ink-2); font-size: 1.1rem; max-width: 40em; margin-bottom: 32px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
section.alt .card { background: var(--page); }
.card p { color: var(--ink-2); margin: 0; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.card .icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 32px; position: relative; color: var(--ink-2); }
.ticks li strong { color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f68c0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.split { display: grid; gap: 32px; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.disclaimer { border-left: 4px solid var(--amber); padding: 4px 0 4px 16px; color: var(--ink-2); max-width: 46em; }
.cta { text-align: center; }
.cta .stores { justify-content: center; }

/* Long-form pages (privacy, terms, support) */
.page-head { padding: 48px 0 8px; }
.page-head p { color: var(--ink-2); }
.prose { max-width: 46em; padding-bottom: 64px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose .fill { background: var(--notice-bg); color: var(--notice-ink); padding: 0 4px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; min-width: 620px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: var(--page); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.notice { background: var(--notice-bg); color: var(--notice-ink); border-radius: 12px; padding: 14px 16px; margin: 16px 0 8px; }
.notice strong { color: inherit; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin: 16px 0; }
.toc ol { margin: 6px 0 0; padding-left: 1.3em; columns: 2 220px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
details p { color: var(--ink-2); }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.contact-card .email { font-size: 1.25rem; font-weight: 600; word-break: break-all; }

/* Download page */
.download { padding-top: 56px; padding-bottom: 72px; text-align: center; }
.download .app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15); }
.download .stores { justify-content: center; }
.download .lede { color: var(--ink-2); font-size: 1.15rem; max-width: 32em; margin: 0 auto; }
.download .invite { display: inline-block; background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 0.95rem; margin-bottom: 18px; }
.download .grid { text-align: left; margin-top: 48px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--ink-3); font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 16px; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--ink-2); }
.site-footer p { margin: 0 0 6px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Log in (web app): beside the logo on phones, after the links on wider screens. */
.site-header a.nav-login {
  order: 3; display: inline-flex; align-items: center; min-height: 38px; padding: 4px 16px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 0.95rem; text-decoration: none;
}
.site-header a.nav-login:hover { filter: brightness(1.08); }
.site-header .nav { order: 2; align-items: center; margin-left: auto; }
@media (max-width: 520px) {
  .site-header a.nav-login { order: 2; margin-left: auto; }
  .site-header .nav { order: 3; margin-left: 0; }
}
