/* ============================================================
   Taupi — design tokens
   "Taupi" is Latvian for "save". The palette pairs the product's
   own brand blue with a warm amber (Baltic amber is Latvia's
   signature material) and a ledger/statement layout motif —
   the whole product turns a messy bank statement into a clean one.
   ============================================================ */

:root {
  /* -- surfaces & ink (cool, blue-tinted neutrals — not pure grey) -- */
  --paper: #f4f6fb;
  --paper-raised: #ffffff;
  --ink: #12182b;
  --ink-muted: #4c5670;
  --ink-faint: #8890a8;
  --line: #dee3f0;
  --line-strong: #c7cee3;

  /* -- brand blue (matches the product's own token) -- */
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-tint: #e7eefe;

  /* -- amber: secondary accent (Baltic amber, "savings") -- */
  --amber: #d97706;
  --amber-ink: #92400e;
  --amber-tint: #fdf1e0;

  /* -- semantic (kept separate from the accent hue) -- */
  --positive: #16a34a;
  --positive-tint: #e7f6ec;
  --negative: #dc2626;

  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-card: 0 1px 2px rgba(18, 24, 43, 0.04), 0 8px 24px -12px rgba(18, 24, 43, 0.12);
  --max-width: 1120px;

  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1120;
    --paper-raised: #151b2e;
    --ink: #edf0fa;
    --ink-muted: #a7b0cc;
    --ink-faint: #6b7591;
    --line: #262f49;
    --line-strong: #333f60;

    --primary: #5b8def;
    --primary-deep: #7ea4f2;
    --primary-tint: #16233f;

    --amber: #eba64c;
    --amber-ink: #f3c483;
    --amber-tint: #2a2013;

    --positive: #3ecb72;
    --positive-tint: #112a1c;
    --negative: #f16565;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  --paper: #0d1120;
  --paper-raised: #151b2e;
  --ink: #edf0fa;
  --ink-muted: #a7b0cc;
  --ink-faint: #6b7591;
  --line: #262f49;
  --line-strong: #333f60;
  --primary: #5b8def;
  --primary-deep: #7ea4f2;
  --primary-tint: #16233f;
  --amber: #eba64c;
  --amber-ink: #f3c483;
  --amber-tint: #2a2013;
  --positive: #3ecb72;
  --positive-tint: #112a1c;
  --negative: #f16565;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.55);
}

:root[data-theme="light"] {
  --paper: #f4f6fb;
  --paper-raised: #ffffff;
  --ink: #12182b;
  --ink-muted: #4c5670;
  --ink-faint: #8890a8;
  --line: #dee3f0;
  --line-strong: #c7cee3;
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-tint: #e7eefe;
  --amber: #d97706;
  --amber-ink: #92400e;
  --amber-tint: #fdf1e0;
  --positive: #16a34a;
  --positive-tint: #e7f6ec;
  --negative: #dc2626;
  --shadow-card: 0 1px 2px rgba(18, 24, 43, 0.04), 0 8px 24px -12px rgba(18, 24, 43, 0.12);
}

/* ============================================================
   Base
   ============================================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: balance;
  color: var(--ink);
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  flex-shrink: 0;
}

.brand .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand .tagline {
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--font-body);
  display: none;
}

@media (min-width: 560px) {
  .brand .tagline {
    display: inline;
  }
}

.site-header nav {
  display: flex;
  gap: 28px;
}

.site-header nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}

.site-header nav a:hover {
  color: var(--primary);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: var(--font-body);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--primary-deep);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: 76px 0 88px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

@media (max-width: 880px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-ink);
  background: var(--amber-tint);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero p.subtitle {
  font-size: 17px;
  color: var(--ink-muted);
  max-width: 46ch;
  margin: 0 0 30px;
}

.hero .beta-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-faint);
}

.hero .beta-note .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  margin-right: 7px;
}

/* -- ledger mockup -- */

.ledger {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.ledger-head .bank {
  font-weight: 600;
  font-size: 14px;
}

.ledger-head .period {
  font-size: 12.5px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

.ledger-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
}

.ledger-row:last-of-type {
  border-bottom: none;
}

.ledger-row .date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.ledger-row .who {
  min-width: 0;
}

.ledger-row .merchant {
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-row .raw {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  margin-top: 3px;
}

.chip-groceries { background: var(--amber-tint); color: var(--amber-ink); }
.chip-income { background: var(--positive-tint); color: var(--positive); }
.chip-transport { background: var(--primary-tint); color: var(--primary-deep); }
.chip-subs { background: var(--line); color: var(--ink-muted); }

.ledger-row .amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.amount.negative { color: var(--negative); }
.amount.positive { color: var(--positive); }

.ledger-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--paper);
  font-size: 12.5px;
  color: var(--ink-muted);
}

.ledger-foot svg {
  width: 14px;
  height: 14px;
  color: var(--positive);
  flex-shrink: 0;
}

/* entrance animation, skipped entirely under reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero h1,
  .hero p.subtitle,
  .hero .cta-row,
  .hero .beta-note,
  .ledger-row,
  .ledger-head,
  .ledger-foot {
    opacity: 0;
    animation: fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .hero .eyebrow { animation-delay: 0.02s; }
  .hero h1 { animation-delay: 0.08s; }
  .hero p.subtitle { animation-delay: 0.16s; }
  .hero .cta-row { animation-delay: 0.22s; }
  .hero .beta-note { animation-delay: 0.28s; }

  .ledger-head { animation-delay: 0.15s; }
  .ledger-row:nth-of-type(1) { animation-delay: 0.28s; }
  .ledger-row:nth-of-type(2) { animation-delay: 0.38s; }
  .ledger-row:nth-of-type(3) { animation-delay: 0.48s; }
  .ledger-row:nth-of-type(4) { animation-delay: 0.58s; }
  .ledger-foot { animation-delay: 0.68s; }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Sections (shared)
   ============================================================ */

section {
  padding: 64px 0;
}

section.alt {
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 620px;
  margin: 0 0 44px;
}

.section-head .eyebrow-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

h2.section-title {
  font-size: clamp(26px, 3.2vw, 34px);
  margin: 0 0 10px;
}

p.section-subtitle {
  color: var(--ink-muted);
  font-size: 16px;
  margin: 0;
  max-width: 52ch;
}

/* -- bank strip -- */

.banks-strip .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 32px;
}

.banks-strip .label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.banks-strip .banks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stamp {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 12px;
  background: var(--paper);
}

/* -- steps -- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.step {
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--line);
}

.steps .step:not(:last-child) {
  border-right: 1px solid var(--line);
  padding-right: 28px;
}

@media (max-width: 700px) {
  .steps .step:not(:last-child) {
    border-right: none;
  }
}

.step .step-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-ink);
  background: var(--amber-tint);
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 16px;
}

.step h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
}

.step p {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0;
}

/* -- feature grid -- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card {
  background: var(--paper-raised);
  padding: 26px;
}

.card .mark {
  width: 34px;
  height: 34px;
  color: var(--primary);
  margin-bottom: 16px;
}

.card .mark svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.card p {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.55;
}

/* -- final cta -- */

.final-cta {
  text-align: center;
}

.final-cta .section-head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.final-cta .cta-row {
  justify-content: center;
}

/* ============================================================
   Footer
   ============================================================ */

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  font-size: 13px;
  color: var(--ink-faint);
}

footer.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

footer.site-footer .foot-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

footer.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

footer.site-footer nav a {
  color: var(--ink-faint);
  text-decoration: none;
}

footer.site-footer nav a:hover {
  color: var(--primary);
}

/* ============================================================
   Legal / support pages
   ============================================================ */

.legal-page main {
  padding: 52px 0 80px;
}

.legal-page .container {
  max-width: 720px;
}

.legal-page h1 {
  font-size: 34px;
  margin-bottom: 6px;
}

.legal-page .effective-date {
  color: var(--ink-faint);
  font-size: 14px;
  margin-bottom: 40px;
  font-family: var(--font-mono);
}

.legal-page h2 {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-page h3 {
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page p,
.legal-page li {
  color: var(--ink-muted);
  font-size: 15px;
}

.legal-page ul {
  padding-left: 20px;
}

.callout {
  background: var(--amber-tint);
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--amber-ink);
  margin-bottom: 32px;
}

.callout strong {
  color: var(--amber-ink);
}

table.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

table.info-table th,
table.info-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.info-table th {
  color: var(--ink-faint);
  font-weight: 600;
  width: 30%;
}

.contact-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}

.contact-card a {
  font-weight: 600;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
  .site-header nav {
    gap: 16px;
  }

  footer.site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 52px 0 60px;
  }

  section {
    padding: 48px 0;
  }
}
