/* Daybook public site — tokens follow the Android/iOS teal (#009688 / #128595). */

:root {
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --color-bg: oklch(0.975 0.012 192);
  --color-bg-accent: oklch(0.948 0.019 192.809);
  --color-surface: oklch(1 0 0);
  --color-surface-muted: oklch(0.97 0.008 192);
  --color-text: oklch(0.3 0.011 225.468);
  --color-text-muted: oklch(0.423 0.018 229.396);
  --color-heading: oklch(0.26 0.02 210);
  --color-border: oklch(0.88 0.015 192);
  --color-accent: oklch(0.467 0.084 180.397);
  --color-accent-hover: oklch(0.4 0.08 180);
  --color-on-accent: oklch(1 0 0);
  --color-link: oklch(0.467 0.084 180.397);
  --color-expense: oklch(0.58 0.2 24.658);
  --color-income: oklch(0.52 0.14 144.208);
  --color-icon: oklch(0.566 0.094 210.074);
  --color-focus: oklch(0.467 0.084 180.397);
  --color-shadow: oklch(0.3 0.03 210 / 0.12);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-full: 999px;

  --width-page: 72rem;
  --width-prose: 40rem;
  --header-h: 4.25rem;

  --shadow-card:
    0 1px 1px oklch(0.3 0.03 210 / 0.04),
    0 8px 24px oklch(0.3 0.03 210 / 0.08);
  --shadow-phone:
    0 20px 50px oklch(0.3 0.04 210 / 0.18),
    0 2px 8px oklch(0.3 0.03 210 / 0.08);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: oklch(0.18 0.02 210);
    --color-bg-accent: oklch(0.22 0.025 210);
    --color-surface: oklch(0.23 0.02 210);
    --color-surface-muted: oklch(0.26 0.022 210);
    --color-text: oklch(0.93 0.01 192);
    --color-text-muted: oklch(0.78 0.02 192);
    --color-heading: oklch(0.96 0.01 192);
    --color-border: oklch(0.35 0.02 210);
    --color-accent: oklch(0.72 0.11 183);
    --color-accent-hover: oklch(0.78 0.11 183);
    --color-on-accent: oklch(0.2 0.03 210);
    --color-link: oklch(0.78 0.11 183);
    --color-expense: oklch(0.75 0.18 24);
    --color-income: oklch(0.78 0.14 144);
    --color-focus: oklch(0.78 0.11 183);
    --color-shadow: oklch(0 0 0 / 0.4);
    --shadow-card:
      0 1px 1px oklch(0 0 0 / 0.2),
      0 8px 24px oklch(0 0 0 / 0.28);
    --shadow-phone:
      0 20px 50px oklch(0 0 0 / 0.45),
      0 2px 8px oklch(0 0 0 / 0.3);
  }
}

@media (prefers-contrast: more) {
  :root {
    --color-text: oklch(0.18 0.02 225);
    --color-text-muted: oklch(0.32 0.02 225);
    --color-border: oklch(0.55 0.02 192);
    --color-accent: oklch(0.4 0.09 180);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --color-text: oklch(0.98 0 0);
      --color-text-muted: oklch(0.88 0.01 192);
      --color-border: oklch(0.7 0.02 192);
      --color-accent: oklch(0.82 0.12 183);
    }
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-optical-sizing: auto;
  font-feature-settings: "cv05" 1, "ss01" 1;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-link);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus {
  outline: none;
}

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

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(100% - 2rem, var(--width-page));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in oklch, var(--color-bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--color-heading);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  outline: 1px solid oklch(0 0 0 / 0.1);
}

@media (prefers-color-scheme: dark) {
  .brand img {
    outline-color: oklch(1 0 0 / 0.1);
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.nav a:hover {
  color: var(--color-link);
}

.nav a[aria-current="page"] {
  color: var(--color-heading);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-on-accent) !important;
  font-weight: 600;
  text-decoration: none;
  transition-property: transform, background-color;
  transition-duration: 160ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.nav-cta:hover {
  background: var(--color-accent-hover);
}

.nav-cta:active {
  transform: scale(0.96);
}

.hero {
  padding-block: var(--space-8) var(--space-9);
  background:
    radial-gradient(1200px 480px at 80% -10%, var(--color-bg-accent), transparent 70%),
    var(--color-bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-7);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--space-4);
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-bg-accent);
  border-radius: var(--radius-full);
}

.eyebrow img {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.35rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  color: var(--color-heading);
  text-wrap: balance;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0 0 var(--space-4);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 520;
  line-height: 1.08;
}

.lede {
  margin: 0 0 var(--space-6);
  max-width: 36rem;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.5rem;
  row-gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
  border-radius: 0.55rem;
}

.store-badge:hover {
  text-decoration: none;
}

.store-badge img {
  display: block;
  width: auto;
  max-width: none;
  height: 2.75rem;
}

/* Official Play PNG includes 41px padding on a 250px canvas (badge is 168px tall).
   Scale so the black badge matches the 2.75rem App Store height. */
.store-badge--play img {
  height: calc(2.75rem * 250 / 168);
}

.fine-print {
  margin: var(--space-4) 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.phone {
  width: min(100%, 20.5rem);
  margin-inline: auto;
  padding: 0.7rem;
  border-radius: 2.35rem;
  background: oklch(0.22 0.02 210);
  box-shadow: var(--shadow-phone);
}

.phone-screen {
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--color-surface);
  color: var(--color-text);
  min-height: 32rem;
}

.phone-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 1.1rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.phone-head {
  padding: 0.4rem 1.1rem 0.85rem;
}

.phone-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--color-heading);
}

.totals {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
  padding: 0 0.85rem 0.85rem;
}

.total {
  padding: 0.55rem 0.45rem;
  border-radius: 0.7rem;
  background: var(--color-surface-muted);
  text-align: center;
}

.total span {
  display: block;
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

.total strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.total--out strong { color: var(--color-expense); }
.total--in strong { color: var(--color-income); }

.txn-list {
  margin: 0;
  padding: 0 0 1rem;
  border-top: 1px solid var(--color-border);
}

.txn {
  display: grid;
  grid-template-columns: 2.1rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 1.05rem;
}

.txn + .txn {
  border-top: 1px solid var(--color-border);
}

.txn-emoji {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 0.6rem;
  background: var(--color-bg-accent);
  font-size: 1rem;
}

.txn b {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
}

.txn small {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.amt {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 0.9rem;
}

.amt--out { color: var(--color-expense); }
.amt--in { color: var(--color-income); }

.section {
  padding-block: var(--space-8);
}

.section--tint {
  background: var(--color-bg-accent);
}

.section-kicker {
  margin: 0 0 var(--space-2);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.section h2 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 520;
  line-height: 1.15;
}

.section-intro {
  margin: 0 0 var(--space-6);
  max-width: 38rem;
  color: var(--color-text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 40rem) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64rem) {
  .feature-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.feature {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-4);
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--color-bg-accent);
  color: var(--color-accent);
}

.feature-icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.feature h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.feature p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.privacy-band {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 52rem) {
  .privacy-band {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.checks {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
}

.checks li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding-block: 0.45rem;
}

.checks svg {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.15rem;
  color: var(--color-income);
}

.panel {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.panel h3 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-body);
  font-size: 1.1rem;
}

.panel dl {
  margin: 0;
}

.panel div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--space-3);
  padding-block: 0.65rem;
  border-top: 1px solid var(--color-border);
}

.panel dt {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.panel dd {
  margin: 0;
  font-weight: 550;
}

.download {
  text-align: center;
}

.download .store-row {
  justify-content: center;
}

.download .lede {
  margin-inline: auto;
}

.site-footer {
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-links a {
  color: var(--color-text);
  text-decoration: none;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--color-link);
  text-decoration: underline;
}

.prose {
  width: min(100% - 2rem, var(--width-prose));
  margin-inline: auto;
  padding-block: var(--space-8);
}

.prose .store-row {
  margin-block: var(--space-4);
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.prose h2 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
  font-size: 1.45rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.prose h3 {
  margin-top: var(--space-5);
  font-family: var(--font-body);
  font-size: 1.1rem;
}

.prose p,
.prose li {
  color: var(--color-text);
}

.prose ul {
  padding-inline-start: 1.2rem;
}

.meta {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.faq details {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  margin: var(--space-3) 0 0;
  color: var(--color-text-muted);
}

.page-hero {
  padding-block: var(--space-7) var(--space-4);
}

@media (max-width: 40rem) {
  .nav a:not(.nav-cta) {
    display: none;
  }

  .panel div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

::selection {
  background: oklch(0.82 0.08 183);
  color: oklch(0.2 0.03 210);
}
