/*
 * FINANZA: the app's own indigo and mint on graphite, built on the quantum30labs page system.
 * Geist with Geist Mono for figures. Fonts are served from this site, so pages make no
 * third-party requests.
 */

@font-face { font-family: "Geist"; src: url("fonts/geist_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist_semibold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist_mono_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist_mono_medium.ttf") format("truetype"); font-weight: 500 600; font-display: swap; }

:root {
  --bg: #0C0C12;
  --panel: #14141D;
  --raised: #1B1B27;
  --line: #26263A;
  --line-strong: #36364F;
  --text: #F2EFE8;
  --muted: #9EA4A9;
  --faint: #6C7378;
  --brass: #A99CFF;
  --brass-soft: rgba(169, 156, 255, 0.13);
  --brass-ink: #120E33;
  --glow: rgba(91, 75, 229, 0.30);
  --grid: rgba(255, 255, 255, 0.035);
  --shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.75);
  --mint: #4EDEA3;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.1rem);
  --wide: 76rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F7FA; --panel: #FFFFFF; --raised: #EFEEF8; --line: #E3E1F0; --line-strong: #CCC9E0;
    --text: #17191B; --muted: #585D61; --faint: #8A8F93;
    --brass: #4A3BD0; --brass-soft: rgba(91, 75, 229, 0.09); --brass-ink: #FFFFFF;
    --glow: rgba(91, 75, 229, 0.18); --grid: rgba(0, 0, 0, 0.04);
    --shadow: 0 40px 80px -40px rgba(40, 30, 110, 0.35);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F7F7FA; --panel: #FFFFFF; --raised: #EFEEF8; --line: #E3E1F0; --line-strong: #CCC9E0;
  --text: #17191B; --muted: #585D61; --faint: #8A8F93;
  --brass: #4A3BD0; --brass-soft: rgba(91, 75, 229, 0.09); --brass-ink: #FFFFFF;
  --glow: rgba(91, 75, 229, 0.18); --grid: rgba(0, 0, 0, 0.04);
  --shadow: 0 40px 80px -40px rgba(40, 30, 110, 0.35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brass); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; margin: 0; }
p { margin: 0; }
section[id] { scroll-margin-top: 72px; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.overline {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 0.75rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass);
}
.overline::before { content: ""; width: 18px; height: 1px; background: currentColor; }

/* Header: sticky, translucent */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .word span { color: var(--brass); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font: 600 0.95rem/1.2 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, filter 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary, .nav a.btn-primary { background: var(--brass); color: var(--brass-ink); box-shadow: 0 10px 30px -12px var(--glow); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--raised); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 900px; height: 900px; right: -240px; top: -360px;
  background: radial-gradient(circle, var(--glow), transparent 62%);
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 6vw, 96px); align-items: center;
  padding-block: clamp(56px, 8vw, 112px) clamp(56px, 7vw, 96px);
}
.hero h1 { font-size: var(--step-4); letter-spacing: -0.045em; margin-top: 22px; }
.hero h1 em { font-style: normal; color: var(--brass); }
.hero .lede { margin-top: 24px; max-width: 34rem; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); color: var(--muted); }
.hero .actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.orbit {
  position: absolute; inset: 50% auto auto 50%; width: 520px; aspect-ratio: 1; translate: -50% -50%;
  border: 1px solid var(--line); border-radius: 50%; z-index: -1;
}
.orbit::before { content: ""; position: absolute; inset: 70px; border: 1px dashed var(--line); border-radius: 50%; }
.orbit::after {
  content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--brass);
  top: 50%; left: -5px; box-shadow: 0 0 0 6px var(--brass-soft);
}
.phone {
  position: relative; width: 100%; max-width: 290px; aspect-ratio: 728 / 1622;
  padding: 8px; border-radius: 42px; background: #050607;
  box-shadow: 0 0 0 1px #2A3035, var(--shadow);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
.chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  font-size: 0.85rem; line-height: 1.3;
}
.chip b { display: block; font-weight: 600; }
.chip small { color: var(--muted); font-size: 0.78rem; }
.chip .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brass-soft); color: var(--brass); flex: none; }
.chip .dot svg { width: 18px; height: 18px; }
.chip.a { left: -2%; top: 18%; }
.chip.b { right: -4%; bottom: 16%; }

/* Proof strip under the hero */
.strip { border-block: 1px solid var(--line); background: var(--panel); }
.strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strip li { padding: 26px 24px; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.strip li:first-child { border-left: 0; padding-left: 0; }
.strip b { font: 500 1.35rem/1.2 var(--mono); letter-spacing: -0.02em; }
.strip span { color: var(--muted); font-size: 0.9rem; }

/* Sections */
section.block { padding-block: clamp(72px, 10vw, 128px); }
.section-head { max-width: 44rem; display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); font-size: var(--step-1); }

/* Featured app */
.feature-app {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 5vw, 64px); border: 1px solid var(--line); border-radius: 28px;
  background: linear-gradient(160deg, var(--raised), var(--panel) 55%);
}
.feature-app::after {
  content: ""; position: absolute; z-index: -1; width: 600px; height: 600px; right: -200px; bottom: -300px;
  background: radial-gradient(circle, var(--glow), transparent 65%);
}
.app-id { display: flex; align-items: center; gap: 16px; }
.app-id img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.app-id h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
.app-id p { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.feature-app .pitch { margin-top: 24px; font-size: var(--step-1); color: var(--muted); max-width: 32rem; }
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: rgba(78, 222, 163, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='%234EDEA3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.feature-app .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.feature-app .links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.9rem; }
.feature-app .links a { color: var(--muted); }
.feature-app .links a:hover { color: var(--text); }
.app-shots { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 100%; }
.app-shots .phone { max-width: 250px; z-index: 1; }
.app-shots .page {
  position: absolute; right: -2%; bottom: 4%; width: 42%; max-width: 200px; aspect-ratio: 900 / 1274;
  border-radius: 6px; overflow: hidden; background: #fff; transform: rotate(5deg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), var(--shadow); z-index: 2;
}
.app-shots .page img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.next-app {
  margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 28px; border: 1px dashed var(--line-strong); border-radius: 20px; color: var(--muted);
}
.next-app b { color: var(--text); font-weight: 500; }
.next-app .mono { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.principle {
  padding: 28px 24px 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel);
  display: grid; gap: 12px; align-content: start; transition: border-color 200ms ease, transform 200ms ease;
}
.principle:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.principle .n { font: 500 0.8rem/1 var(--mono); color: var(--brass); letter-spacing: 0.08em; }
.principle h3 { font-size: 1.15rem; letter-spacing: -0.015em; margin-top: 12px; line-height: 1.25; }
.principle p { color: var(--muted); font-size: 0.95rem; }

/* Contact */
.contact {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px); border: 1px solid var(--line); border-radius: 32px;
  background: var(--panel);
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, var(--glow), transparent 70%);
}
.contact h2 { font-size: var(--step-3); max-width: 36rem; margin: 18px auto 0; }
.contact > p { color: var(--muted); font-size: var(--step-1); max-width: 34rem; margin: 16px auto 0; }
.email {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 36px; max-width: 100%;
  padding: 6px 6px 6px 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg);
}
.email a { font: 500 clamp(0.95rem, 0.85rem + 0.5vw, 1.15rem)/1.2 var(--mono); color: var(--text); text-decoration: none; overflow-wrap: anywhere; text-align: left; }
.email a:hover { color: var(--brass); }
.email button { font-family: var(--sans); }
.contact .actions { margin-top: 20px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; margin-top: clamp(72px, 10vw, 128px); }
.site-footer .top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; padding-block: 56px 40px; }
.site-footer .top > div:first-child p { margin-top: 14px; max-width: 22rem; }
.site-footer h4 { margin: 0 0 14px; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--text); }
.site-footer .bottom { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 24px; font-size: 0.85rem; color: var(--faint); }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 16px; padding-block: 64px; }
.notfound .code { font: 500 0.9rem/1 var(--mono); color: var(--brass); letter-spacing: 0.1em; }
.notfound h1 { font-size: var(--step-3); }
.notfound p { color: var(--muted); }
.notfound .btn { margin-top: 8px; justify-self: center; }

@media (max-width: 960px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip li:nth-child(3) { border-left: 0; padding-left: 0; }
  .strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .hero .wrap, .feature-app { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { margin-top: 8px; }
  .orbit { width: 420px; }
  .app-shots { margin-top: 8px; }
  .site-footer .top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer .top > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .strip li { padding: 20px 16px; }
  .strip li:nth-child(odd) { padding-left: 0; }
  .strip li:nth-child(even) { padding-right: 0; }
  .chip.a { left: 0; top: 10%; }
  .chip.b { right: 0; }
  .phone { max-width: 250px; }
  .orbit { width: 340px; }
  .email { flex-direction: column; padding: 16px; border-radius: 20px; gap: 12px; }
  .email a { text-align: center; }
  .next-app { padding: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 800ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 90ms); }
  .orbit { animation: spin 60s linear infinite; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes spin { to { rotate: 360deg; } }
}

/* ---- FINANZA additions ---- */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); font: 500 0.82rem/1 var(--sans); color: var(--text); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(78, 222, 163, 0.15); }
.hero .fine { margin-top: 16px; font-size: 0.875rem; color: var(--faint); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 28px 26px 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); display: grid; gap: 10px; align-content: start; }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brass-soft); color: var(--brass); margin-bottom: 8px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.15rem; letter-spacing: -0.015em; line-height: 1.25; }
.feature p { color: var(--muted); font-size: 0.95rem; }

.free { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 64px); border-radius: 32px; border: 1px solid var(--line);
  background: linear-gradient(160deg, #5B4BE5, #3C2FA6); color: #fff; }
.free::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%); }
.free .overline { color: #CFFBE8; }
.free h2 { font-size: var(--step-3); max-width: 38rem; margin: 18px auto 0; }
.free p { color: rgba(255, 255, 255, 0.8); max-width: 38rem; margin: 16px auto 0; font-size: var(--step-1); }
.free ul { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.free li { padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); font-weight: 500; font-size: 0.92rem; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.gallery figure { margin: 0; display: grid; gap: 16px; }
.gallery .phone { max-width: none; border-radius: 34px; }
.gallery .phone img { border-radius: 27px; }
.gallery figcaption b { display: block; font-weight: 600; }
.gallery figcaption span { color: var(--muted); font-size: 0.92rem; }

.ledger { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.ledger .section-head { margin-bottom: 0; }
.ledger dl { margin: 0; border-top: 1px solid var(--line); }
.ledger dl div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger dt { color: var(--muted); font-size: 0.92rem; }
.ledger dd { margin: 0; font-weight: 500; }
.ledger dd small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; }

/* Long-form pages */
.doc { padding-block: clamp(40px, 6vw, 72px) 0; }
.doc .narrow { max-width: calc(68ch + 40px); }
.doc header { display: grid; gap: 14px; margin-bottom: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.doc h1 { font-size: var(--step-3); }
.doc .meta { color: var(--muted); font-size: 0.92rem; }
.doc h2 { font-size: var(--step-2); margin: 44px 0 12px; scroll-margin-top: 80px; letter-spacing: -0.02em; }
.doc p + p { margin-top: 14px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.3em; margin: 12px 0; display: grid; gap: 8px; }
.doc .summary { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 14px; padding: 20px 24px; }
.doc code { font-family: var(--mono); font-size: 0.9em; }

@media (max-width: 960px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) { .ledger { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .gallery { gap: 16px; }
  .ledger dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
