/* Doxa site: the app's bento palette on paper, one family (Onest), one load moment in the hero. */
:root {
  --paper: #f1f1ee;
  --paper-hi: #fbfbf9;
  --ink: #111114;
  --ink-muted: #5d5d66;
  --rule: rgba(17, 17, 20, 0.12);
  --blue: #2f5bea;
  --blue-hi: #4c7bff;
  --blue-deep: #2448c9;
  --mint: #5fd4bf;
  --orange: #ff7a45;
  --lavender: #d5e2ff;
  --measure: 34rem;
  --gutter: clamp(16px, 5vw, 56px);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  font-feature-settings: 'ss01';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue-hi); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.wordmark { font-weight: 800; font-size: 0.95rem; letter-spacing: 0.42em; text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-size: 0.95rem; }
.bar nav a:not(.button) { text-decoration: none; color: var(--ink-muted); }
.bar nav a:not(.button):hover { color: var(--ink); }
@media (max-width: 560px) { .bar .hide-sm { display: none; } }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper-hi); font-weight: 600; text-decoration: none;
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--blue); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.link { font-weight: 600; text-underline-offset: 4px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
  padding: clamp(24px, 6vw, 72px) 0 clamp(56px, 9vw, 120px);
}
.hero h1 {
  margin: 0; font-weight: 800; font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 0.98; letter-spacing: -0.045em; max-width: 15ch;
}
.lede { margin: 28px 0 0; max-width: var(--measure); font-size: 1.15rem; color: var(--ink-muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 36px; }
.fine { margin: 18px 0 0; font-size: 0.875rem; color: var(--ink-muted); }

/* Hero stage: a statement with a card laid over it */
.stage { position: relative; padding: 0 0 clamp(150px, 17vw, 190px); }

.statement {
  position: relative; background: var(--paper-hi); border-radius: 6px;
  padding: 26px 26px 34px; transform: rotate(-2.2deg);
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -28px rgba(17, 17, 20, 0.35);
  font-variant-numeric: tabular-nums;
}
/* torn bottom edge */
.statement::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background: linear-gradient(-45deg, transparent 6px, var(--paper-hi) 0) 0 0 / 14px 10px repeat-x,
              linear-gradient(45deg, transparent 6px, var(--paper-hi) 0) 0 0 / 14px 10px repeat-x;
}
.statement header { display: flex; justify-content: space-between; gap: 12px; font-size: 0.8rem; color: var(--ink-muted); padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.statement header strong { color: var(--ink); font-weight: 700; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto auto; align-items: center;
  gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--rule); font-size: 0.86rem;
}
.rows time { color: var(--ink-muted); white-space: nowrap; }
.rows .m { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.rows .amt { text-align: right; min-width: 5.2em; }
.tag { font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--ink); }
.t-food { background: var(--mint); }
.t-travel { background: var(--orange); }
.t-shop { background: var(--lavender); }

.card {
  position: absolute; right: -2%; bottom: 0; width: min(78%, 360px); aspect-ratio: 1.586;
  border-radius: 20px; padding: 20px 22px; color: #fff;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(150deg, var(--blue-hi), var(--blue) 55%, var(--blue-deep));
  box-shadow: 0 30px 60px -24px rgba(36, 72, 201, 0.65);
  transform: rotate(3.5deg);
  display: flex; flex-direction: column; justify-content: space-between;
}
.card .top { display: flex; justify-content: space-between; align-items: flex-start; }
.card .mark { font-weight: 800; font-size: 0.72rem; letter-spacing: 0.4em; }
.chip { width: 36px; height: 27px; border-radius: 6px; background: linear-gradient(135deg, #f6e7b4, #c9ad62); }
.card .label { font-size: 0.8rem; opacity: 0.85; margin: 0 0 8px; }
.card .headline { font-weight: 700; font-size: 1.05rem; line-height: 1.25; margin: 0 0 12px; }
.spend { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.18); }
.spend span { display: block; height: 100%; }
.spend .s-food { background: var(--mint); width: 18%; }
.spend .s-travel { background: var(--orange); width: 70%; }
.spend .s-shop { background: var(--lavender); width: 12%; }

/* The one orchestrated moment: lines get tagged, then the card's bar fills. */
@media (prefers-reduced-motion: no-preference) {
  .rows .tag { animation: tag-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  .rows li:nth-child(1) .tag { animation-delay: 0.5s; }
  .rows li:nth-child(2) .tag { animation-delay: 0.75s; }
  .rows li:nth-child(3) .tag { animation-delay: 1s; }
  .rows li:nth-child(4) .tag { animation-delay: 1.25s; }
  .rows li:nth-child(5) .tag { animation-delay: 1.5s; }
  .rows li:nth-child(6) .tag { animation-delay: 1.75s; }
  .card { animation: card-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both; }
  .spend span { animation: grow 0.9s cubic-bezier(0.3, 0.8, 0.2, 1) 2.1s both; transform-origin: left; }
  .spend .s-travel { animation-delay: 2.3s; }
  .spend .s-shop { animation-delay: 2.5s; }
}
@keyframes tag-in { from { opacity: 0; transform: scale(0.6); } }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) rotate(9deg); } }
@keyframes grow { from { transform: scaleX(0); } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .stage { max-width: 520px; }
}
@media (max-width: 420px) {
  .statement { padding: 20px 14px 28px; }
  .rows li { gap: 7px; font-size: 0.8rem; }
  .rows .amt { min-width: 0; }
}

/* Sections */
section { padding: clamp(56px, 9vw, 112px) 0; }
h2 { margin: 0; font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.05; letter-spacing: -0.035em; max-width: 18ch; }

.benefits { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.benefits li { border-top: 2px solid var(--ink); padding-top: 18px; }
.benefits h3 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.benefits p { margin: 0; color: var(--ink-muted); max-width: 30ch; }
@media (max-width: 760px) { .benefits { grid-template-columns: 1fr; } }

.closing { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.closing p { margin: 16px 0 0; color: var(--ink-muted); max-width: var(--measure); }

footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: 0.9rem; color: var(--ink-muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Privacy policy */
.doc { max-width: 42rem; padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.doc h1 { margin: 0; font-weight: 800; font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.04em; }
.doc .updated { margin: 16px 0 0; color: var(--ink-muted); }
.doc h2 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 48px 0 12px; max-width: none; }
.doc h3 { font-size: 1.05rem; margin: 26px 0 6px; }
.doc p, .doc li { color: #2b2b31; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.doc th { font-weight: 600; }
@media (max-width: 560px) {
  .doc table, .doc tbody, .doc tr, .doc td, .doc th { display: block; }
  .doc thead { display: none; }
  .doc tr { padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .doc td { border: 0; padding: 2px 0; }
  .doc td:first-child { font-weight: 600; }
}
