@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/fonts/be-vietnam-pro-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/fonts/be-vietnam-pro-bold.woff") format("woff");
  font-weight: 600 700;
  font-display: swap;
}

/* MoneyForkcast public site. Colours follow the app's theme tokens (app/lib/app/theme.dart). */
:root {
  color-scheme: light dark;
  --bg: #f6f8f6;
  --raised: #ffffff;
  --line: #d6dfda;
  --ink: #16201c;
  --muted: #56645e;
  --brand: #0f6b55;
  --on-brand: #ffffff;
  --brand-tint: #dcefe7;
  --mark-bg: #fbf1dc;
  --mark-ink: #4a3000;
  --mark-line: #835500;
  --focus: #1d5ea6;
  /* The film keeps the app's light palette in both schemes (theme.dart: surface, ink, brand, go, goIf). */
  --film-art: #ffffff;
  --film-muted: #56645e;
  --bezel: #16201c;
  --brand-hover: #0b5a47;
  --film-ink: #16201c;
  --film-brand: #0f6b55;
  --safe: #1d5ea6;
  --safe-bg: #e3edf8;
  --risk: #835500;
  --risk-bg: #fbf1dc;
  --radius: 14px;
  --measure: 42rem;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1412;
    --raised: #151d1a;
    --line: #26322d;
    --ink: #e3ebe7;
    --muted: #a3b2ab;
    --brand: #3fbf96;
    --on-brand: #0e1412;
    --brand-tint: #16302a;
    --mark-bg: #3a2c0c;
    --mark-ink: #fbe7b8;
    --mark-line: #d9a640;
    --focus: #8fb8ea;
    --bezel: #050807;
    --brand-hover: #5fd3ad;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px 14px;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: calc(var(--measure) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--raised);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
}

.brand .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

nav a:hover {
  background: var(--brand-tint);
}

nav a[aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

nav .lang a {
  border: 1px solid var(--line);
}

main {
  padding: 32px 0 48px;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.625rem;
  line-height: 1.25;
  margin: 48px 0 10px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 28px 0 6px;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

li {
  margin-bottom: 6px;
}

.lead {
  font-size: 1.1875rem;
  color: var(--muted);
}

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

.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.points {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.points li {
  background: var(--brand-tint);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0;
}

.points strong {
  display: block;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--raised);
  text-decoration: none;
}

.links a.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 0.9688rem;
}

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

th {
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

mark {
  background: var(--mark-bg);
  color: var(--mark-ink);
  border: 1px dashed var(--mark-line);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.9375rem;
}

footer.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

footer.site a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--muted);
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  nav a {
    padding: 0 8px;
  }
}

/* ---------- Home ---------- */
.home h1 {
  grid-area: h1;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.home main {
  padding: 28px 0 0;
}

.home .wrap {
  max-width: calc(62rem + 32px);
}

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

/* Phone: the question, the film, the action, then the line. Wide: the film beside the words. */
.hero {
  display: grid;
  grid-template-areas: "h1" "screen" "act" "lead";
  gap: 24px;
  justify-items: center;
  text-align: center;
  padding-bottom: 40px;
}

.screen {
  grid-area: screen;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.lead {
  grid-area: lead;
  margin: 0;
  max-width: 32rem;
  text-wrap: pretty;
}

.act {
  grid-area: act;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.act .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 320px);
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 1.0625rem;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 10px 24px -14px rgba(15, 107, 85, 0.7);
  transition: background-color 160ms ease-out, transform 160ms ease-out, box-shadow 160ms ease-out;
}

.act .primary svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.act .primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 14px 28px -14px rgba(15, 107, 85, 0.8);
}

.act .primary:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px -12px rgba(15, 107, 85, 0.7);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}

@media (min-width: 820px) {
  .hero {
    grid-template-columns: auto 1fr;
    grid-template-areas: "screen h1" "screen lead" "screen act";
    grid-template-rows: 1fr auto 1fr;
    column-gap: 64px;
    row-gap: 20px;
    justify-items: start;
    text-align: left;
    padding-top: 12px;
    padding-bottom: 56px;
  }

  .home h1 {
    align-self: end;
  }

  .lead {
    font-size: 1.1875rem;
  }

  .act {
    align-self: start;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px 22px;
  }

  .act .primary {
    width: auto;
  }
}

/* What it does: three lines, each with its drawing. */
.why {
  padding-top: 40px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
}

.why ul {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.why li {
  display: grid;
  align-content: start;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  margin: 0;
}

.why img {
  width: 96px;
  height: 80px;
}

.why h2 {
  margin: 0 0 2px;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.why p {
  margin: 0;
  text-wrap: pretty;
  color: var(--muted);
}

@media (min-width: 820px) {
  .why ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .why li {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* The film: three scenes drawn in the page (art/scripts/site-film.mjs writes the markup), one 22 s loop that repeats
   for ever, with a pause beside it. It keeps the app's light palette in dark mode, like the art; the bezel stays dark.
   With less motion asked for it rests on its last frame: waiting a year, Safe. */
.phone {
  position: relative;
  width: min(280px, 60vw);
  aspect-ratio: 9 / 16;
  border: 10px solid var(--bezel);
  border-radius: 40px;
  overflow: hidden;
  background: var(--film-art);
  color: var(--film-ink);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(22, 32, 28, 0.35);
  container-type: inline-size;
}

.film,
.scene {
  position: absolute;
  inset: 0;
}

.scene {
  opacity: 0;
}

.s-answer {
  opacity: 1;
}

.scene .art {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
}

.cap {
  position: absolute;
  left: 7cqw;
  right: 7cqw;
  top: 46%;
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 7.4cqw;
  line-height: 1.25;
  color: var(--film-ink);
  text-wrap: balance;
}

.s-answer .cap {
  top: 71%;
}

.sign {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2cqw;
  font-weight: 700;
  font-size: 5cqw;
  color: var(--film-ink);
}

.sign img {
  width: 9cqw;
  height: 9cqw;
}

.c-now,
.l-weather,
.r-clouds,
.r-weather,
.o-now,
.pill.risk,
.chart .now,
.chart .low {
  opacity: 0;
}

.film .card {
  position: absolute;
  left: 7cqw;
  right: 7cqw;
  top: 36%;
  margin: 0;
  padding: 3.5cqw 4cqw 2cqw;
  background: var(--film-art);
  border: 0.8cqw solid var(--film-brand);
  border-radius: 6cqw;
}

.card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
}

.opt,
.pills {
  position: relative;
  display: inline-grid;
}

.opt > span,
.pills > span {
  grid-area: 1 / 1;
}

.opt {
  font-weight: 700;
  font-size: 5.4cqw;
  color: var(--film-ink);
  white-space: nowrap;
}

.pills {
  justify-items: end;
}

.film .pill {
  display: inline-flex;
  align-items: center;
  gap: 1.2cqw;
  padding: 1cqw 3cqw 1cqw 2.4cqw;
  border-radius: 999px;
  font-weight: 700;
  font-size: 6cqw;
  white-space: nowrap;
}

.film .pill svg {
  width: 5.6cqw;
  height: 5.6cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.film .pill.safe {
  color: var(--safe);
  background: var(--safe-bg);
}

.film .pill.risk {
  color: var(--risk);
  background: var(--risk-bg);
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 2cqw;
}

.chart .band {
  fill: var(--safe-bg);
}

.chart .fund {
  stroke: var(--safe);
  stroke-width: 2.5;
  stroke-dasharray: 8 7;
}

.chart polyline {
  fill: none;
  stroke: var(--film-brand);
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.chart .low {
  fill: var(--risk);
}

.chart text {
  font-family: var(--font);
  font-size: 36px;
  font-weight: 600;
  fill: var(--film-muted);
}

/* Pivots, in each drawing's own units. */
.film g {
  transform-box: view-box;
}

.s-ask .l-vane {
  transform-origin: 258px 83.18px;
}

.s-job .l-vane,
.s-answer .l-vane {
  transform-origin: 302px 83.55px;
}

.l-lamp {
  transform-origin: 124px 0;
}

.l-umbrella {
  transform-origin: 98px 110px;
}

.g-sun {
  transform-origin: 303px 60px;
}

/* The pause: a checkbox and its label, no script. Visually the label is the control. */
.pause {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pause-label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.pause:focus-visible ~ .pause-label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.when-paused,
.pause:checked ~ .pause-label .when-playing {
  display: none;
}

.pause:checked ~ .pause-label .when-paused {
  display: inline;
}

.pause:checked ~ .phone,
.pause:checked ~ .phone * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .pause,
  .pause-label {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .scene,
  .cap,
  .film .card,
  .o-now,
  .o-later,
  .film .pill,
  .chart polyline,
  .chart .low,
  .chart .band,
  .chart .fund,
  .r-clouds,
  .r-weather,
  .g-sun,
  .g-clouds,
  .s-job .l-umbrella {
    animation-duration: 22s;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }

  .s-ask { animation-name: show-ask; }
  .s-job { animation-name: show-job; }
  .s-answer { animation-name: show-answer; }
  .s-job .cap { animation-name: cap-job; }
  .c-now { animation-name: cap-now; }
  .c-later { animation-name: cap-later; }
  .film .card { animation-name: card; }
  .o-now,
  .pill.risk { animation-name: before-switch; }
  .o-later { animation-name: after-switch; }
  .pill.safe { animation-name: pop-safe; }
  .chart .now { animation-name: line-now; }
  .chart .low { animation-name: low; }
  .chart .later { animation-name: line-later; }
  .chart .band { animation-name: band; }
  .chart .fund { animation-name: fund; }
  .r-clouds { animation-name: clouds-part; }
  .r-weather { animation-name: before-switch; }
  .g-sun { animation-name: sun-rise; }
  .g-clouds { animation-name: clouds-come; }
  .s-job .l-umbrella { animation-name: umbrella; }
  .s-job .l-weather { animation: storm 1.6s steps(1) infinite; }

  /* Small loops of their own: the wind, the lamp, breathing. */
  .l-vane { animation: sway 3.2s ease-in-out infinite alternate; }
  .l-lamp { animation: lamp 2.8s ease-in-out infinite alternate; }
  .l-clouds { animation: drift 5s ease-in-out infinite alternate; }
  .l-person-1 { animation: breathe 2.2s ease-in-out infinite alternate; }
  .l-person-2 { animation: breathe 2.2s ease-in-out 0.4s infinite alternate; }
  .l-person-3 { animation: breathe 2.2s ease-in-out 0.8s infinite alternate; }
  .l-papers { animation: breathe 2.6s ease-in-out infinite alternate; }
}

/* The loop, 22 s: the question 0–3.8 s, the job 3.6–8 s, the answer 7.6–22 s with Risk for 5 s and Safe for 9 s
   (the switch at 13 s, 59%), then Safe crossfades straight into the question: no empty frame. */
@keyframes show-ask { 0%, 16.4% { opacity: 1; } 18.2%, 97.3% { opacity: 0; } 100% { opacity: 1; } }
@keyframes show-job { 0%, 16.4% { opacity: 0; } 18.2%, 34.5% { opacity: 1; } 36.4%, 100% { opacity: 0; } }
@keyframes show-answer { 0%, 34.5% { opacity: 0; } 36.4%, 97.3% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cap-job { 0%, 19% { opacity: 0; transform: translateY(3cqw); } 21.5%, 100% { opacity: 1; transform: none; } }
@keyframes cap-now { 0%, 37.5% { opacity: 0; transform: translateY(3cqw); } 40%, 57.3% { opacity: 1; transform: none; } 59.1%, 100% { opacity: 0; } }
@keyframes cap-later { 0%, 60.5% { opacity: 0; transform: translateY(3cqw); } 63.6%, 100% { opacity: 1; transform: none; } }
@keyframes card { 0%, 36.4% { opacity: 0; transform: translateY(6cqw); border-color: #d6dfda; } 39%, 59.1% { opacity: 1; transform: none; border-color: #d6dfda; } 61.4%, 100% { opacity: 1; transform: none; border-color: var(--film-brand); } }
@keyframes before-switch { 0%, 59.1% { opacity: 1; } 61.8%, 100% { opacity: 0; } }
@keyframes after-switch { 0%, 59.1% { opacity: 0; } 61.8%, 100% { opacity: 1; } }
@keyframes pop-safe { 0%, 60% { opacity: 0; transform: scale(0.6); } 63% { opacity: 1; transform: scale(1.1); } 65%, 100% { opacity: 1; transform: none; } }
@keyframes line-now { 0%, 39% { opacity: 1; stroke-dashoffset: 1; } 47.7%, 59.1% { opacity: 1; stroke-dashoffset: 0; } 61.4%, 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes low { 0%, 41% { opacity: 0; transform: scale(0); } 43%, 59.1% { opacity: 1; transform: none; } 61.4%, 100% { opacity: 0; } }
@keyframes line-later { 0%, 61.4% { stroke-dashoffset: 1; } 72.7%, 100% { stroke-dashoffset: 0; } }
@keyframes band { 0%, 59.1% { fill: var(--risk-bg); } 61.8%, 100% { fill: var(--safe-bg); } }
@keyframes fund { 0%, 59.1% { stroke: var(--risk); } 61.8%, 100% { stroke: var(--safe); } }
@keyframes clouds-part { 0%, 59.1% { opacity: 1; transform: none; } 65%, 100% { opacity: 0; transform: translateX(70px); } }
@keyframes sun-rise { 0%, 59.1% { opacity: 0; transform: translateY(14px) scale(0.8); } 68%, 100% { opacity: 1; transform: none; } }
@keyframes clouds-come { 0%, 59.1% { opacity: 0; transform: translateX(-60px); } 70%, 100% { opacity: 1; transform: none; } }
@keyframes umbrella { 0%, 20.5% { opacity: 0; transform: scaleX(0.05); } 25%, 100% { opacity: 1; transform: none; } }
@keyframes storm { 0% { opacity: 0.9; } 70% { opacity: 0.25; } 80% { opacity: 1; } }
@keyframes sway { from { transform: rotate(-7deg); } to { transform: rotate(5deg); } }
@keyframes lamp { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes drift { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
@keyframes breathe { from { transform: none; } to { transform: translateY(-1.5px); } }

@media print {
  header.site nav,
  .skip {
    display: none;
  }
}
