/* ============================================================
   Simpli-FI Money — brand site
   Concept: "instruments of value" — the guilloché engraving of
   banknotes, certificates and ledgers, applied to serious
   financial software. Brass & ledger, not fintech navy-and-gold.
   ============================================================ */

@font-face {
  font-family: "Caslon Display";
  src: url("fonts/caslon-display-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Franklin";
  src: url("fonts/libre-franklin-latin.woff2") format("woff2");
  font-weight: 100 900; /* variable */
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens: light (default) ---------- */
:root {
  --bg:        oklch(0.992 0 0);
  --surface:   oklch(0.963 0.003 65);
  --surface-2: oklch(0.945 0.004 65);
  --ink:       oklch(0.205 0.012 55);
  --muted:     oklch(0.435 0.013 55);
  --faint:     oklch(0.505 0.012 55);
  --line:      oklch(0.205 0.012 55 / 0.14);
  --line-soft: oklch(0.205 0.012 55 / 0.08);

  --brass:     oklch(0.585 0.135 55);   /* primary brand */
  --brass-ink: oklch(0.485 0.128 52);   /* brass dark enough for small marks/links on light */
  --brass-btn: oklch(0.455 0.13 52);    /* filled button — dark enough to hold white text */
  --brass-btn-hover: oklch(0.40 0.125 50);
  --ledger:    oklch(0.415 0.078 155);  /* accent — deep ledger green */
  --on-brass:  oklch(0.995 0 0);

  --guilloche: oklch(0.585 0.135 55 / 0.55);

  --font-display: "Caslon Display", "Hoefler Text", Georgia, serif;
  --font-sans: "Franklin", ui-sans-serif, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0:  1.0625rem;
  --step-1:  clamp(1.2rem, 1.13rem + 0.34vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.36rem + 0.7vw, 1.95rem);
  --step-3:  clamp(1.95rem, 1.7rem + 1.25vw, 2.9rem);
  --hero:    clamp(2.9rem, 1.9rem + 4.6vw, 5.4rem);

  --measure: 64ch;
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 2.75rem);
  --shell: 74rem;

  --z-base: 0; --z-guilloche: 1; --z-content: 2; --z-header: 50;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
  :root:not([data-theme="light"]) {
    --bg:        oklch(0.163 0.008 60);
    --surface:   oklch(0.203 0.010 60);
    --surface-2: oklch(0.228 0.011 60);
    --ink:       oklch(0.935 0.006 70);
    --muted:     oklch(0.705 0.013 65);
    --faint:     oklch(0.60 0.012 65);
    --line:      oklch(0.94 0.006 70 / 0.14);
    --line-soft: oklch(0.94 0.006 70 / 0.07);

    --brass:     oklch(0.72 0.132 60);
    --brass-ink: oklch(0.75 0.13 60);
    --brass-btn: oklch(0.72 0.132 60);
    --brass-btn-hover: oklch(0.79 0.13 60);
    --ledger:    oklch(0.68 0.10 156);
    --on-brass:  oklch(0.16 0.01 60);
    --guilloche: oklch(0.72 0.132 60 / 0.42);
  }
}

/* explicit toggle wins in both directions */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        oklch(0.163 0.008 60);
  --surface:   oklch(0.203 0.010 60);
  --surface-2: oklch(0.228 0.011 60);
  --ink:       oklch(0.935 0.006 70);
  --muted:     oklch(0.705 0.013 65);
  --faint:     oklch(0.60 0.012 65);
  --line:      oklch(0.94 0.006 70 / 0.14);
  --line-soft: oklch(0.94 0.006 70 / 0.07);
  --brass:     oklch(0.72 0.132 60);
  --brass-ink: oklch(0.75 0.13 60);
  --brass-btn: oklch(0.72 0.132 60);
  --brass-btn-hover: oklch(0.79 0.13 60);
  --ledger:    oklch(0.68 0.10 156);
  --on-brass:  oklch(0.16 0.01 60);
  --guilloche: oklch(0.72 0.132 60 / 0.42);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg:        oklch(0.992 0 0);
  --surface:   oklch(0.963 0.003 65);
  --surface-2: oklch(0.945 0.004 65);
  --ink:       oklch(0.205 0.012 55);
  --muted:     oklch(0.435 0.013 55);
  --faint:     oklch(0.505 0.012 55);
  --line:      oklch(0.205 0.012 55 / 0.14);
  --line-soft: oklch(0.205 0.012 55 / 0.08);
  --brass:     oklch(0.585 0.135 55);
  --brass-ink: oklch(0.485 0.128 52);
  --brass-btn: oklch(0.455 0.13 52);
  --brass-btn-hover: oklch(0.40 0.125 50);
  --ledger:    oklch(0.415 0.078 155);
  --on-brass:  oklch(0.995 0 0);
  --guilloche: oklch(0.585 0.135 55 / 0.55);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: oklch(0.585 0.135 55 / 0.22); }
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--bg);
  color: var(--ink);
  transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* numbers line up */
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- layout primitives ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.06rem;
}
.brand__mark { width: 26px; height: 26px; flex: none; color: var(--brass); }
.brand__name .amp { color: var(--brass-ink); }
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.4rem + 1.6vw, 2rem);
}
.nav__links {
  display: flex;
  gap: clamp(1rem, 0.4rem + 1.6vw, 2rem);
}
.nav__link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: color 0.2s var(--ease);
}
.nav__link:hover { color: var(--ink); }
@media (max-width: 44rem) { .nav__links { display: none; } }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line); transform: rotate(12deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-sun { }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 2rem + 9vw, 9rem) clamp(3.5rem, 2rem + 6vw, 6.5rem);
}
.hero__grid {
  position: relative;
  z-index: var(--z-content);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: clamp(1.1rem, 0.8rem + 1vw, 1.6rem);
}
.hero__eyebrow::before {
  content: "";
  width: 1.6rem; height: 1px; background: var(--brass);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--hero);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  color: var(--brass-ink);
}
.hero__lede {
  margin-top: clamp(1.5rem, 1rem + 1.4vw, 2.1rem);
  max-width: 46ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.hero__detail {
  margin-top: clamp(0.9rem, 0.6rem + 0.8vw, 1.35rem);
  max-width: 46ch;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--faint);
  text-wrap: pretty;
}
.hero__cta {
  margin-top: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}
.btn {
  --_pad: 0.85rem 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--_pad);
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.005em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--primary { background: var(--brass-btn); color: var(--on-brass); }
.btn--primary:hover { transform: translateY(-1px); background: var(--brass-btn-hover); }
.btn--ghost {
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding: 0.4rem 0.1rem;
  border-radius: 0;
}
.btn--ghost:hover { color: var(--brass-ink); }
.btn__arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.hero__plate {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  display: grid;
  gap: clamp(0.9rem, 0.6rem + 1vw, 1.3rem);
  justify-items: center;
}
.hero__canvas-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.hero__plate canvas { width: 100%; height: 100%; }
.hero__plate-cap {
  font-size: var(--step--1);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}
@media (max-width: 60rem) {
  .hero__plate { max-width: 22rem; order: -1; }
}

/* ---------- section heading ---------- */
.sec-head {
  display: grid;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 1.2rem + 2.4vw, 3.4rem);
  max-width: 52ch;
}
.sec-head__kicker {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-ink);
}
.sec-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--ink);
}
.sec-head p {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: var(--measure);
  text-wrap: pretty;
}

/* ---------- the suite: ledger ---------- */
.suite { background: var(--surface); border-block: 1px solid var(--line-soft); }
.ledger {
  border-top: 1px solid var(--line);
}
.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding-block: clamp(1.5rem, 1rem + 1.6vw, 2.3rem);
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: background 0.25s var(--ease);
}
.ledger__row:hover { background: color-mix(in oklch, var(--brass) 5%, transparent); }
@media (min-width: 52rem) {
  .ledger__row {
    grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr) minmax(9rem, auto);
    align-items: baseline;
    gap: 2.5rem;
  }
}
.ledger__name {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
}
.ledger__name .tm { color: var(--brass-ink); font-weight: 600; }
.ledger__link { text-decoration: none; color: inherit; transition: color 0.2s var(--ease); }
.ledger__link:hover { color: var(--brass-ink); }
.ledger__go { color: var(--brass-ink); opacity: 0; margin-left: 0.2rem; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); display: inline-block; }
.ledger__link:hover .ledger__go { opacity: 1; transform: translateX(2px); }
.ledger__desc {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 52ch;
  text-wrap: pretty;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--faint);
  white-space: nowrap;
}
.status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid var(--brass);
  background: color-mix(in oklch, var(--brass) 40%, transparent);
  flex: none;
}
@media (min-width: 52rem) {
  .status { justify-content: flex-end; }
}

/* ---------- principles / trust ---------- */
.principles {
  display: grid;
  gap: clamp(1.6rem, 1rem + 2vw, 2.6rem);
  counter-reset: p;
}
@media (min-width: 48rem) {
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 1rem + 3vw, 4rem); }
}
.principle { display: grid; gap: 0.7rem; align-content: start; }
.principle__no {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brass-ink);
  line-height: 1;
}
.principle h3 {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.principle p { color: var(--muted); line-height: 1.55; text-wrap: pretty; }
.principle::before { display: none; }

/* ---------- audience ---------- */
.audience { background: var(--surface); border-block: 1px solid var(--line-soft); }
.audience__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}
@media (min-width: 56rem) {
  .audience__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}
.audience__list { display: grid; gap: 0; }
.audience__item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1.05rem;
  border-top: 1px solid var(--line);
  font-size: var(--step-1);
  color: var(--ink);
  line-height: 1.4;
}
.audience__item:last-child { border-bottom: 1px solid var(--line); }
.audience__item span {
  font-family: var(--font-display);
  color: var(--brass-ink);
  font-size: 0.95rem;
  flex: none;
  width: 2.2rem;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.footer__top {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}
@media (min-width: 52rem) {
  .footer__top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
}
.footer__brand { display: grid; gap: 0.9rem; max-width: 34ch; }
.footer__brand .brand { font-size: 1.15rem; }
.footer__blurb { color: var(--muted); line-height: 1.55; font-size: 0.98rem; }
.footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2rem; }
.footer__col h4 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1rem;
}
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer__col a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.96rem;
  transition: color 0.2s var(--ease);
}
.footer__col a:hover { color: var(--brass-ink); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  padding-top: clamp(1.5rem, 1rem + 1.5vw, 2.2rem);
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 0.86rem;
  line-height: 1.5;
}
.footer__note { max-width: 62ch; }

/* ---------- motion: restrained ---------- */
.reveal { opacity: 1; }
html.ready .reveal {
  opacity: 0;
  animation: rise 0.95s var(--ease) forwards;
}
html.ready .reveal.d1 { animation-delay: 0.06s; }
html.ready .reveal.d2 { animation-delay: 0.14s; }
html.ready .reveal.d3 { animation-delay: 0.22s; }
html.ready .reveal.d4 { animation-delay: 0.3s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__plate { transition: opacity 1.2s var(--ease); }
html.ready .hero__plate { opacity: 0; animation: fadein 1.4s var(--ease) 0.15s forwards; }
@keyframes fadein { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html.ready .reveal,
  html.ready .hero__plate { opacity: 1 !important; animation: none !important; transform: none !important; }
  * { scroll-behavior: auto !important; }
  .theme-toggle:hover { transform: none; }
}

/* ============================================================
   Ambient + scroll motion  (brand direction, 2026-07-11)
   The guilloché turns slowly at rest and quickens with scroll;
   content rises in as it enters view. Everything is gated behind
   html.sfm-motion — set only when motion is welcome AND
   IntersectionObserver exists — so reduced-motion and no-JS
   visitors get the full, static site with no hidden content.
   ============================================================ */
#guilloche { transform-origin: 50% 50%; pointer-events: none; }
html.sfm-motion #guilloche { will-change: transform; }

/* single-element reveals — section headings + footer */
html.sfm-motion .suite .sec-head,
html.sfm-motion #work .sec-head,
html.sfm-motion .audience .sec-head,
html.sfm-motion .footer__top {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
html.sfm-motion .suite .sec-head.in,
html.sfm-motion #work .sec-head.in,
html.sfm-motion .audience .sec-head.in,
html.sfm-motion .footer__top.in {
  opacity: 1;
  transform: none;
}

/* staggered group reveals — ledger rows, principles, audience items */
html.sfm-motion .ledger > .ledger__row,
html.sfm-motion .principles > .principle,
html.sfm-motion .audience__list > .audience__item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.sfm-motion .ledger.in > .ledger__row,
html.sfm-motion .principles.in > .principle,
html.sfm-motion .audience__list.in > .audience__item {
  opacity: 1;
  transform: none;
}
html.sfm-motion .ledger.in > .ledger__row:nth-child(2),
html.sfm-motion .principles.in > .principle:nth-child(2),
html.sfm-motion .audience__list.in > .audience__item:nth-child(2) { transition-delay: 0.09s; }
html.sfm-motion .ledger.in > .ledger__row:nth-child(3),
html.sfm-motion .principles.in > .principle:nth-child(3),
html.sfm-motion .audience__list.in > .audience__item:nth-child(3) { transition-delay: 0.18s; }
html.sfm-motion .ledger.in > .ledger__row:nth-child(4),
html.sfm-motion .audience__list.in > .audience__item:nth-child(4) { transition-delay: 0.27s; }
