/* Epiphany Money homepage. Colors and type follow the app (src/ui/tokens.ts in the app folder). */

@font-face {
  font-family: "Lexend";
  src: url("fonts/lexend.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #e2f1f0;
  --card: #f8fcfb;
  --raised: #ffffff;
  --sunken: #d3e7e5;
  --ink: #213d53;
  --ink-muted: #46606f;
  --ink-subtle: #4f6676;
  --gold: #ecc65e;
  --gold-hover: #e4b947;
  --gold-text: #7a5a00;
  --gold-tint: #f4e9c4;
  --on-gold: #213d53;
  --pink: #f0b2b6;
  --slate: #6f8a98;
  --warning: #a63d45;
  --warning-tint: #f5e6e7;
  --border: #213d5333;
  --border-strong: #66808f;
  --focus-ring: #213d53;
  --focus-halo: #ecc65e;
  --hatch: #213d5359;
  --shadow: 0 1px 2px #213d531a, 0 12px 32px -12px #213d5340;
  --color-gold: var(--gold);
  --wide: 1280px;
  --gutter: 24px;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1a24;
    --card: #142533;
    --raised: #1a2f41;
    --sunken: #09131b;
    --ink: #e2f1f0;
    --ink-muted: #a8bfc3;
    --ink-subtle: #88a2ac;
    --gold: #f2cf6b;
    --gold-hover: #f6da88;
    --gold-text: #f2cf6b;
    --gold-tint: #3b3824;
    --on-gold: #0d1a24;
    --pink: #f4b9bd;
    --slate: #7f99a4;
    --warning: #ff9096;
    --warning-tint: #353441;
    --border: #2a4459;
    --border-strong: #618197;
    --focus-ring: #f2cf6b;
    --focus-halo: #f2cf6b00;
    --hatch: #0d1a2466;
    --shadow: 0 1px 2px #0000004d, 0 12px 32px -12px #00000080;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus-halo);
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--raised);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---- Header ---- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 10px;
}

.brand img {
  width: 40px;
  height: 40px;
  flex: none;
}

.wordmark {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.wordmark span {
  color: var(--gold);
  -webkit-text-stroke: 0.035em var(--ink);
  paint-order: stroke fill;
}

@media (prefers-color-scheme: dark) {
  .wordmark span {
    -webkit-text-stroke: 0;
  }
}

.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top nav a:not(.btn) {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-muted);
}

.top nav a:not(.btn):hover {
  color: var(--ink);
  background: var(--sunken);
}

/* ---- Buttons and the waitlist form ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--gold);
  color: var(--on-gold);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  background: var(--gold-hover);
}

.btn-small {
  min-height: 38px;
  padding: 0 14px;
  margin-left: 8px;
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .btn {
    border-color: var(--gold);
  }
}

.waitlist {
  display: flex;
  gap: 8px;
  max-width: 460px;
}

.waitlist input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--raised);
  color: var(--ink);
  font: inherit;
}

.waitlist input[type="email"]::placeholder {
  color: var(--ink-subtle);
}

.waitlist .hp {
  position: absolute;
  left: -9999px;
}

.fine {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-subtle);
}

.fine.done {
  color: var(--ink);
  font-weight: 600;
}

.fine.problem {
  color: var(--warning);
  font-weight: 600;
}

/* ---- Hero ---- */

.hero {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  gap: 56px;
  padding-top: 32px;
  padding-bottom: 44px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-tint);
  font-size: 13px;
  font-weight: 600;
}

.chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1.5px var(--ink);
}

h1 {
  margin-top: 18px;
  font-size: clamp(30px, 3.3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

.lede {
  margin-top: 16px;
  margin-bottom: 28px;
  max-width: 460px;
  font-size: 17px;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.shots {
  position: relative;
  padding-left: 48px;
  padding-bottom: 32px;
}

.shots .desktop {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.shots .phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26%;
  border: 7px solid var(--ink);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}

@media (prefers-color-scheme: dark) {
  .shots .phone {
    border-color: #2a4459;
  }
}

/* ---- Sections ---- */

section {
  padding-top: 28px;
  padding-bottom: 28px;
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.head p,
.head a {
  font-size: 14px;
  color: var(--ink-muted);
}

.head a {
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-radius: 6px;
}

.head a:hover {
  text-decoration: underline;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px #213d530f;
}

/* ---- What it notices: sentence cards with small pictures ---- */

.finds {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.find {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.leak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warning-tint);
  color: var(--warning);
  letter-spacing: 0.02em;
  text-transform: none;
}

.leak svg {
  width: 12px;
  height: 12px;
}

.find p {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  text-wrap: pretty;
}

.find figure {
  margin-top: auto;
}

.hatch-pink,
.hatch-gold,
.hatch-slate {
  background-image: repeating-linear-gradient(-45deg, transparent 0 3px, var(--hatch) 3px 4px);
}

.hatch-pink {
  background-color: var(--pink);
}

.hatch-gold {
  background-color: var(--gold);
}

.hatch-slate {
  background-color: var(--sunken);
}

.bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.bars > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bars .area {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 84px;
  border-bottom: 1.5px solid var(--ink-muted);
}

.bars i {
  display: block;
  width: 44px;
  border: 1.5px solid var(--ink);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.bars b,
.pills b,
.flow b,
.goal b,
.sum b {
  font-size: 13px;
  font-weight: 600;
}

.bars b {
  margin-top: 6px;
}

.bars span,
.flow span,
.goal span,
.sum span {
  font-size: 12px;
  color: var(--ink-muted);
}

.sum div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-block: 3px;
}

.sum div:last-child {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1.5px solid var(--ink-muted);
}

.sum div:last-child span {
  font-weight: 600;
  color: var(--ink);
}

.pills .row {
  display: flex;
  gap: 4px;
  height: 26px;
}

.pills i {
  flex: 0 1 11px;
  min-width: 0;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}

.pills b {
  display: block;
  margin-top: 8px;
}

.flow .row,
.goal .track {
  display: flex;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}

.flow .row i + i {
  border-left: 1.5px solid var(--ink);
}

.flow .keys {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.flow .keys div:last-child:not(:first-child) {
  text-align: right;
}

.flow .keys div,
.goal .keys {
  display: flex;
  flex-direction: column;
}

.goal .keys {
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 8px;
}

.goal .track {
  background: var(--sunken);
  border-radius: 999px;
}

.goal .track i {
  border-right: 1.5px solid var(--ink);
  border-radius: 999px;
}

.note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-subtle);
}

/* ---- Screens: three tiles with screenshots ---- */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tile {
  overflow: hidden;
}

.tile img {
  width: 100%;
  aspect-ratio: 1150 / 700;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.tile div {
  padding: 16px 20px 20px;
}

.tile h3 {
  font-size: 16px;
  font-weight: 700;
}

.tile p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ---- Promises ---- */

.promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.promise {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.promise h3 {
  font-size: 16px;
  font-weight: 700;
}

.promise p {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ---- Blog ---- */

.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.post {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  overflow: hidden;
  text-decoration: none;
}

.post:hover h3 {
  text-decoration: underline;
}

.post img,
.post .no-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-right: 1px solid var(--border);
  background: var(--sunken);
}

.post div {
  padding: 14px 16px;
}

.post .label {
  margin-bottom: 4px;
}

.post h3 {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  text-wrap: balance;
}

.post time {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-subtle);
}

/* ---- Last call ---- */

.last {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 40px;
  padding: 32px 40px;
}

.last p {
  margin-top: 6px;
  margin-bottom: 20px;
  color: var(--ink-muted);
}

/* ---- Footer ---- */

footer {
  padding-top: 32px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

footer nav {
  display: flex;
  gap: 20px;
}

footer a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}

footer a:hover {
  text-decoration: underline;
}

/* ---- Narrower screens ---- */

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 24px;
  }

  .finds,
  .tiles,
  .posts {
    grid-template-columns: repeat(2, 1fr);
  }

  .promises {
    grid-template-columns: 1fr;
  }

  .last {
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 28px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .top nav .btn,
  .top nav .extra {
    display: none;
  }

  .hero {
    padding-bottom: 40px;
  }

  .waitlist {
    flex-direction: column;
  }

  .shots {
    padding-left: 28px;
    padding-bottom: 24px;
  }

  .shots .phone {
    width: 30%;
    border-width: 5px;
    border-radius: 18px;
  }

  section {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .finds,
  .tiles,
  .posts {
    grid-template-columns: 1fr;
  }

  .head {
    flex-direction: column;
    gap: 4px;
  }

  .last {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .last svg {
    max-width: 200px;
    margin: 0 auto;
  }
}

/* ---- Colors for the drawings (class names come from the app's illustrations) ---- */

.block {
  display: block;
}

.w-full {
  width: 100%;
}

.h-auto {
  height: auto;
}

.overflow-visible {
  overflow: visible;
}

.stroke-ink {
  stroke: var(--ink);
}

.stroke-gold {
  stroke: var(--gold);
}

.stroke-slate {
  stroke: var(--slate);
}

.stroke-paper {
  stroke: var(--paper);
}

.fill-card {
  fill: var(--card);
}

.fill-gold {
  fill: var(--gold);
}

.fill-gold-tint {
  fill: var(--gold-tint);
}

.fill-ink {
  fill: var(--ink);
}

.fill-ink\/10 {
  fill: color-mix(in srgb, var(--ink) 10%, transparent);
}

.fill-paper {
  fill: var(--paper);
}

.fill-pink {
  fill: var(--pink);
}

.fill-sunken {
  fill: var(--sunken);
}

.opacity-30 {
  opacity: 0.3;
}

.opacity-100 {
  opacity: 1;
}

.\[stop-opacity\:0\] {
  stop-opacity: 0;
}

.\[stop-opacity\:0\.55\] {
  stop-opacity: 0.55;
}

.\[stop-opacity\:0\.6\] {
  stop-opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
  .dark\:fill-ink {
    fill: var(--ink);
  }

  .dark\:fill-raised {
    fill: var(--raised);
  }

  .dark\:stroke-ink {
    stroke: var(--ink);
  }

  .dark\:stroke-paper {
    stroke: var(--paper);
  }

  .dark\:opacity-20 {
    opacity: 0.2;
  }

  .dark\:\[stop-opacity\:0\.32\] {
    stop-opacity: 0.32;
  }

  .dark\:\[stop-opacity\:0\.35\] {
    stop-opacity: 0.35;
  }
}
