/* EvenBook site. Plain CSS, no framework (README R3d). Colours are the app's; type is the app's (Manrope, Bricolage for figures). */

@font-face { font-family: Manrope; src: url(fonts/Manrope_400Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(fonts/Manrope_600SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url(fonts/Manrope_700Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Bricolage; src: url(fonts/BricolageGrotesque_600SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Bricolage; src: url(fonts/BricolageGrotesque_800ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
  /* Brand hexes are exact; everything derived is OKLCH so equal lightness looks equal. Rules are alpha so they blend. */
  --cream: #F9F7F1;
  --paper: oklch(1 0 0);
  --ink: #141A1F;
  --ink-2: oklch(0.47 0.02 250);
  --rule: oklch(0.25 0.02 250 / 0.12);
  --green: #1E724A;
  --sprout: #6FA88A;
  --red: oklch(0.52 0.17 28);
  --on-green: oklch(1 0 0);
  --bezel: #141A1F;
  --shadow: oklch(0.2 0.02 250 / 0.45);
  /* Signal colour: the only thing it ever means is "tap this" (buttons and links). Never decoration. */
  --signal: oklch(0.27 0.045 160);
  --on-signal: #F9F7F1;
  --stage: #1E724A;
  --backword: oklch(0.9 0.05 155);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Depth in the dark comes from lighter surfaces, not shadows. */
    --cream: oklch(0.17 0.012 160);
    --paper: oklch(0.22 0.014 160);
    --ink: oklch(0.95 0.008 150);
    --ink-2: oklch(0.74 0.015 155);
    --rule: oklch(1 0 0 / 0.12);
    --green: oklch(0.75 0.14 158);
    --sprout: #6FA88A;
    --red: oklch(0.72 0.16 28);
    --on-green: oklch(0.17 0.012 160);
    --bezel: oklch(0.32 0.014 160);
    --shadow: oklch(0 0 0 / 0.5);
    --signal: oklch(0.88 0.07 155);
    --on-signal: oklch(0.17 0.012 160);
    --stage: oklch(0.34 0.07 158);
    --backword: oklch(0.5 0.08 158);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--signal); text-decoration-color: color-mix(in oklch, var(--signal) 50%, transparent); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; } /* beats display: flex on the forms */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type scale: headlines and every figure in Bricolage, like the app's numbers. */
h1, h2, h3, .figure { font-family: Bricolage, Manrope, sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.6rem, 9vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
.lede { font-size: 1.25rem; color: var(--ink-2); max-width: 34ch; }

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
section { padding-block: clamp(4rem, 10vw, 7rem); }
section > .wrap > h2 { max-width: 18ch; margin-bottom: 2rem; }

/* Header */
.site-header { padding-block: 1.25rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 2rem; width: auto; }
.site-header { position: relative; z-index: 3; background: var(--stage); }
.site-header .logo img { filter: brightness(0) invert(0.96); }

/* Buttons and the waitlist form */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.5rem;
  border: 0; border-radius: 999px; background: var(--signal); color: var(--on-signal);
  font: 700 1rem Manrope, sans-serif; text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.15); }
.button.small { min-height: 2.75rem; padding: 0 1.1rem; font-size: 0.9375rem; }
.waitlist { display: flex; flex-wrap: wrap; gap: 0.625rem; max-width: 30rem; }
.waitlist input {
  flex: 1 1 14rem; min-height: 3.25rem; padding: 0 1.25rem; border: 1.5px solid var(--rule); border-radius: 999px;
  background: var(--paper); color: var(--ink); font: 400 1rem Manrope, sans-serif;
}
.waitlist input:focus-visible { outline-offset: 1px; border-color: var(--green); }
.waitlist .button { flex: 0 0 auto; }
/* Turnstile only appears when it needs a click; then it sits under the form instead of breaking the pill. */
.waitlist { position: relative; }
.cf-turnstile { position: absolute; top: calc(100% + 0.75rem); left: 50%; transform: translateX(-50%); z-index: 3; }
.form-note { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--ink-2); }
.form-status { margin-top: 0.75rem; font-weight: 600; }
.form-status[data-kind="error"] { color: var(--red); }

/* Phone frame, drawn in CSS around a plain screenshot. */
.phone {
  --r: 2.6rem; --pad: 0.55rem;
  width: min(100%, 18rem); aspect-ratio: 1206 / 2622; padding: var(--pad); border-radius: var(--r);
  background: var(--bezel); box-shadow: 0 1.5rem 3rem -1.5rem var(--shadow);
}
/* Nested radius: the screen's corner is the frame's minus the padding. */
.phone > img, .phone > video { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r) - var(--pad)); }

/* Hero, in three planes. Back: the brand word. Middle: the phone, crossing from the green stage onto the cream.
   Front: the form bar, floating over the phone's cut-off bottom. */
.hero { padding: 0 0 clamp(3rem, 8vw, 5rem); }
.stage {
  --phone-w: clamp(15rem, 62vw, 21rem);
  /* The word fits the width; the phone starts low enough that the whole name reads, then covers only its feet. */
  --word: clamp(4rem, 20.5vw, 24rem);
  --word-top: clamp(3.5rem, 8vw, 5.5rem);
  --phone-top: calc(var(--word-top) + var(--word) * 0.62);
  position: relative; isolation: isolate; overflow: hidden; text-align: center;
  padding-top: clamp(1rem, 3vw, 2rem);
  /* Green behind the top of the phone, cream behind the rest: the phone crosses the line. */
  background: linear-gradient(var(--stage) 0 58%, var(--cream) 58%);
  height: calc(var(--phone-top) + var(--phone-w) * 1.6);
}
.stage h1 { position: relative; z-index: 2; color: #F9F7F1; font-size: clamp(1.35rem, 4.2vw, 2.25rem); font-weight: 800; max-width: none; padding-inline: 1.25rem; }
.backword {
  position: absolute; z-index: 0; inset-inline: 0; top: var(--word-top);
  font: 800 var(--word)/0.8 Bricolage, sans-serif; letter-spacing: -0.055em; white-space: nowrap;
  color: var(--backword); user-select: none;
}
@media (min-width: 52rem) { .stage { --phone-top: calc(var(--word-top) + var(--word) * 0.3); } } /* wide: same overlap on the letters' feet */
.hero-phone { position: absolute; z-index: 1; left: 50%; top: var(--phone-top); transform: translateX(-50%) rotate(-4deg); }
.hero-phone .phone { width: var(--phone-w); box-shadow: 0 2.5rem 4rem -1.5rem var(--shadow); }
.front { position: relative; z-index: 2; margin-top: -2.4rem; text-align: center; } /* the bar straddles the cut, so the phone never shows its bottom */
.front .lede { margin: 1.5rem auto 0; max-width: 30ch; }
.front .form-note { margin-inline: auto; }
.front .form-status { text-align: center; }
/* The bar: field and button as one pill, on top of everything. */
.waitlist.bar {
  margin-inline: auto; max-width: 32rem; padding: 0.4rem; gap: 0.4rem; flex-wrap: nowrap; border-radius: 999px;
  background: var(--paper); box-shadow: 0 1rem 2.5rem -0.75rem var(--shadow), 0 0 0 1px var(--rule);
}
.waitlist.bar input { border: 0; min-width: 0; padding-inline: 1rem; background: transparent; }
@media (max-width: 26rem) {
  .waitlist.bar { flex-direction: column; border-radius: 1.75rem; }
  .waitlist.bar .button { width: 100%; }
}
@media (prefers-color-scheme: dark) { .waitlist.bar { background: oklch(0.27 0.014 160); } }

/* Supported banks: a strip that keeps moving. Two copies of the list scroll as one loop; hover or focus pauses it. */
.banks { padding-block: 0 clamp(3rem, 8vw, 4.5rem); }
.banks-title { text-align: center; color: var(--ink-2); font-weight: 600; margin-bottom: 1.25rem; padding-inline: 1.25rem; }
.marquee { display: flex; overflow: hidden; mask: linear-gradient(90deg, transparent, black 15% 85%, transparent); }
.marquee:hover .track, .marquee:focus-within .track { animation-play-state: paused; }
.track { display: flex; flex: none; gap: 2.5rem; margin: 0; padding: 0 1.25rem; list-style: none; animation: marquee 45s linear infinite; }
.track li { display: flex; align-items: center; gap: 0.75rem; flex: none; font-weight: 700; white-space: nowrap; }
.track img, .track .mono { width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none; }
.track .mono { display: grid; place-items: center; background: var(--c); color: #fff; font: 800 0.95rem Bricolage, sans-serif; letter-spacing: -0.02em; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 1rem; }
  .track[aria-hidden] { display: none; }
  .marquee { mask: none; }
}

/* The problem, as an accountant's tally: scattered accounts above, one total under a double rule. */
.problem { background: var(--paper); }
.problem .wrap { display: grid; gap: 3rem; }
.problem p { max-width: 38ch; font-size: 1.125rem; margin-top: 1.5rem; }
.founder blockquote { margin-top: 2rem; }
#join { scroll-margin-top: 2rem; }
.tally { margin: 0; padding: 0; list-style: none; font-family: Bricolage, sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; max-width: 26rem; width: 100%; }
.tally li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.55rem; border-bottom: 1px solid var(--rule); }
.tally .where { font-family: Manrope, sans-serif; font-weight: 400; color: var(--ink-2); }
.tally .owed { color: var(--red); }
.tally .total { margin-top: 0.75rem; padding-block: 0.75rem 0.5rem; border-bottom: 0; border-top: 0; font-size: 1.75rem; font-weight: 800; }
.tally .total .where { font-family: Bricolage, sans-serif; font-weight: 600; color: var(--ink); align-self: center; font-size: 1.125rem; }
/* The bookkeeper's marks: a single rule above the total, a double rule under it. */
.tally li:nth-last-child(2) { border-bottom: 0; }
.tally .total { border-top: 1.5px solid var(--ink); border-bottom: 7px double var(--green); }
@media (min-width: 52rem) {
  .problem .wrap { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* What it does: a plain list, not a grid of identical cards. */
.does dl { display: grid; gap: 1.75rem 3rem; margin: 0; }
.does dt { font-family: Bricolage, sans-serif; font-weight: 600; font-size: 1.25rem; margin-bottom: 0.35rem; }
.does dd { margin: 0; color: var(--ink-2); max-width: 36ch; }
@media (min-width: 44rem) { .does dl { grid-template-columns: 1fr 1fr; } }

/* Why it's different */
.different { background: var(--green); color: var(--on-green); }
.different h2 { color: inherit; }
.different .points { display: grid; gap: 2rem 3rem; }
.different h3 { margin-bottom: 0.5rem; }
.different .lead-point { grid-column: 1 / -1; padding-bottom: 2rem; border-bottom: 7px double currentColor; }
.different .lead-point h3 { font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 800; }
.different .lead-point p { font-size: 1.125rem; max-width: 52ch; }
.different p { opacity: 0.9; max-width: 38ch; }
@media (min-width: 44rem) { .different .points { grid-template-columns: 1fr 1fr; } }
@media (prefers-color-scheme: dark) { .different { background: var(--paper); color: var(--ink); } .different h3 { color: var(--green); } }

/* Demos: a row of phones that scrolls sideways on a phone and fits on a desktop. */
.demos .row { mask: linear-gradient(90deg, black 85%, transparent); display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.5rem 1.25rem 1.5rem; margin-inline: -1.25rem; scrollbar-width: none; }
.demos .row::-webkit-scrollbar { display: none; }
.demos figure { flex: 0 0 15rem; margin: 0; scroll-snap-align: center; }
.demos figure .phone { width: 100%; }
.demos figcaption { margin-top: 1rem; font-weight: 600; text-align: center; }
.demos .small { margin-top: 0.5rem; font-size: 0.875rem; color: var(--ink-2); }
.demos .tour { display: grid; gap: 2rem; align-items: center; margin-top: 4rem; }
.demos .tour .phone { justify-self: center; }
.demos .tour p { max-width: 30ch; font-size: 1.125rem; }
@media (min-width: 52rem) {
  .demos .tour { grid-template-columns: 1fr 1fr; }
  .demos .row { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; mask: none; padding-inline: 0; margin-inline: 0; }
  .demos figure { flex: none; }
}

/* Security */
.security { background: var(--paper); }
.security ul { display: grid; gap: 1.5rem 3rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.security li { max-width: 38ch; color: var(--ink-2); }
.security strong { display: block; color: var(--ink); font-weight: 700; margin-bottom: 0.25rem; }
.security .links { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; font-weight: 600; }
@media (min-width: 44rem) { .security ul { grid-template-columns: 1fr 1fr; } }

/* Founder's note */
.founder blockquote { margin: 0; max-width: 40rem; }
.founder blockquote p { font-size: 1.25rem; line-height: 1.6; }
.founder blockquote p + p { margin-top: 1.25rem; }
.founder .sign { margin-block: 1.5rem 2rem; font-weight: 700; }

/* FAQ: the browser's own open and close. */
.faq details { border-bottom: 1px solid var(--rule); max-width: 44rem; }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.125rem; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: Bricolage, sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.25rem; color: var(--ink-2); max-width: 60ch; }

/* Final call */
.final { text-align: left; }
.final h2 { margin-bottom: 1.5rem; }

/* Footer */
.site-footer { padding-block: 3rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: inherit; }

/* The plain /security page */
.doc { padding-block: 2rem 5rem; }
.doc h1 { font-size: clamp(2.2rem, 7vw, 3.5rem); max-width: 14ch; margin-bottom: 2rem; }
.doc ul { margin: 0 0 2rem; padding: 0; list-style: none; display: grid; gap: 1.25rem; max-width: 40rem; }
.doc li { color: var(--ink-2); }
.doc li strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .hero-phone { transform: translateX(-50%); }
}
