/* Nomlift site styles: tokens, base, nav, buttons, footer, legal pages. Every page loads this.
   Built on FinWallet's site system (same fonts, structure and motion rules), in Nomlift's palette. */

/* Self-hosted fonts (OFL), Latin + Latin Extended only. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/assets/fonts/bricolage-latin-ext-fdb6b0.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/assets/fonts/bricolage-latin-40c2cb.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plexmono-latin-ext-1969f6.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plexmono-latin-e2661b.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plexmono-latin-ext-93cfae.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plexmono-latin-0bc96c.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/instrument-latin-ext-40fe78.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/instrument-latin-f587e7.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Paprika on warm greys. Text on --brand is --btn-ink (dark), never white: white on paprika is 3:1. */
:root {
  --font-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-label: 'IBM Plex Mono', ui-monospace, monospace;

  --paper: #f5f3ef;
  --surface: #ffffff;
  --fill: #ebe7e1;
  --ink: #1b1612;
  --ink-2: #3f3832;
  --ink-3: #5c544d;
  --rule: #dcd5cc;
  --brand: #ff5b2e;
  --brand-ink: #b23a12;
  --brand-wash: #ffe7dd;
  --btn-ink: #1b1612;
  --leaf: #1d7a4a;
  --leaf-wash: #e2f3e8;
  --protein: #b42340;
  --carbs: #9a6200;
  --fat: #1f5fbf;
  --label: #fffdf9;
  --label-ink: #1b1612;
  --glow: rgba(255, 91, 46, .11);
  --shadow-label: 0 24px 50px -22px rgba(27, 22, 18, .38);
  --lift: 0 1px 2px rgba(27, 22, 18, .04), 0 14px 32px -14px rgba(27, 22, 18, .26);
  --r-card: 20px;
  --r-inner: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --measure: 62ch;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #14110e;
  --surface: #1e1a16;
  --fill: #2a241f;
  --ink: #f4eee8;
  --ink-2: #d2c8be;
  --ink-3: #ada298;
  --rule: #352e28;
  --brand: #ff6a40;
  --brand-ink: #ff9a78;
  --brand-wash: #3b1c11;
  --btn-ink: #1b1612;
  --leaf: #5fd497;
  --leaf-wash: #12301f;
  --protein: #ff8aa0;
  --carbs: #ffc35a;
  --fat: #8cb8ff;
  --label: #221d19;
  --label-ink: #f4eee8;
  --glow: rgba(255, 106, 64, .12);
  --shadow-label: 0 28px 56px -22px rgba(0, 0, 0, .85);
  --lift: 0 14px 32px -14px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: hidden makes <body> a scroll container and breaks the sticky nav. */
  overflow-x: clip;
}
@supports not (overflow: clip) { body { overflow-x: hidden; } }

img, svg { display: block; }
img { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn svg { flex: none; }
.btn-primary { background: var(--brand); color: var(--btn-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn-quiet { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-quiet:hover { border-color: var(--ink-3); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn:active { transform: scale(.97); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.25rem/1 var(--font-display); letter-spacing: -0.03em; }
.brand svg { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; gap: 24px; margin-right: auto; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .9875rem; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn, .menu-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }
.menu-btn { display: none; }
.menu-btn .close { display: none; }
.menu-btn[aria-expanded="true"] .open { display: none; }
.menu-btn[aria-expanded="true"] .close { display: block; }
.mobile-nav { border-top: 1px solid var(--rule); background: var(--paper); }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 8px; }
.mobile-nav li a {
  display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--rule);
  text-decoration: none; font: 600 1.125rem var(--font-display); color: var(--ink);
}
.mobile-nav .btn { width: 100%; }
.mobile-nav-cta { padding-top: 16px; padding-bottom: 20px; }

@media (min-width: 861px) {
  .nav { background: color-mix(in srgb, var(--paper) 78%, transparent); backdrop-filter: saturate(1.6) blur(16px); }
  .mobile-nav { display: none; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .wrap { justify-content: space-between; }
  .menu-btn { display: grid; }
  .nav-actions .btn-sm { display: none; }
}

/* ---------- Generic section ---------- */
.section { padding: clamp(56px, 7vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 42rem; margin-bottom: clamp(32px, 5vw, 56px); }
.eyebrow { display: inline-block; font: 500 .8125rem/1 var(--font-label); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 14px; }
.section-head p { color: var(--ink-2); font-size: 1.125rem; margin-top: 16px; max-width: var(--measure); }
.section-head p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font: 600 .75rem/1.5 var(--font-body); color: var(--brand-ink); background: var(--brand-wash); border-radius: 6px; padding: 1px 8px; margin-left: 6px; vertical-align: 3px; letter-spacing: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--rule); padding: 56px 0 40px; font-size: .9375rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-title { font: 600 .9375rem var(--font-body); color: var(--ink); margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-about p { max-width: 32ch; margin-top: 12px; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: .875rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .9375rem;
  transition: opacity .2s ease, transform .2s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }

/* ---------- Cursor spotlight on cards (mouse only) ---------- */
.glow { position: relative; transition: box-shadow .35s var(--ease); }
@media (prefers-reduced-motion: no-preference) { .glow { transition: transform .35s var(--ease), box-shadow .35s var(--ease); } }
@media (hover: hover) and (pointer: fine) {
  .glow::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 65%);
    opacity: 0; transition: opacity .3s var(--ease);
  }
  .glow:hover::after { opacity: 1; }
  .glow:hover { box-shadow: var(--lift); }
  .motion .glow:hover { transform: translateY(-3px); }
}

/* ---------- Legal pages ---------- */
.legal-page { padding: clamp(32px, 5vw, 64px) 0 clamp(72px, 9vw, 112px); }
.legal-card { max-width: 46rem; margin: 0 auto; }
.legal-card h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 10px; }
.legal-updated { display: block; color: var(--ink-3); font-size: .9375rem; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
.legal-highlight { background: var(--brand-wash); border-radius: var(--r-inner); padding: 20px 24px; margin-bottom: 32px; line-height: 1.65; }
.legal-card h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.65rem); margin: 2em 0 .6em; }
.legal-card p, .legal-card ul { margin: 0 0 1.1em; color: var(--ink-2); }
.legal-card ul { padding-left: 1.2em; }
.legal-card li { margin-bottom: .7em; }
.legal-card strong { color: var(--ink); font-weight: 600; }
.legal-card a { color: var(--brand-ink); text-underline-offset: 3px; }
.legal-card code { font-family: var(--font-label); font-size: .875em; background: var(--fill); border-radius: 6px; padding: 1px 6px; }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 0 1.2em; background: var(--surface); border-radius: var(--r-inner); padding: 4px 18px; }
.legal-card table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 520px; }
.legal-card th, .legal-card td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.legal-card thead th { font: 700 .9375rem/1.3 var(--font-display); color: var(--ink); }
.legal-card tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Account deletion ---------- */
.delete-form-card {
  max-width: 38rem; margin: 0 auto; background: var(--surface);
  border-radius: 24px; padding: clamp(22px, 5vw, 40px);
}
.delete-form-card h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 8px; }
.delete-form-card .lede { color: var(--ink-2); }
.step-indicator { display: flex; align-items: center; justify-content: center; margin: 24px 0; }
.step-dot { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; font-weight: 600; font-size: .9375rem; color: var(--ink-3); background: var(--fill); }
.step-dot.active { background: var(--brand); color: var(--btn-ink); }
.step-line { width: 56px; height: 2px; background: var(--rule); }
.step-line.active { background: var(--brand); }
.data-summary-list { list-style: none; margin: 0 0 20px; padding: 0; }
.data-summary-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: .9375rem; color: var(--ink-2); }
.data-summary-list svg { flex: none; color: var(--brand-ink); margin-top: 3px; }
.form-step[hidden] { display: none; }
.form-step h2 { font-size: 1.25rem; margin: 8px 0 14px; }
.form-group { margin-bottom: 16px; }
.form-group > label { display: block; font-weight: 600; margin-bottom: 8px; font-size: .9375rem; }
.form-control {
  width: 100%; min-height: 50px; border: 0; border-radius: 12px; padding: 0 14px;
  font: inherit; background: var(--fill); color: var(--ink);
}
.form-control:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 45%, transparent); }
.otp-input { text-align: center; font-family: var(--font-label); font-size: 1.5rem; letter-spacing: .3em; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; margin: 4px 0 16px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand-ink); flex: none; }
.form-step .btn { width: 100%; }
.btn-danger { background: #a3162a; color: #fff; }
.btn-danger:hover { background: #86101f; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.form-status { min-height: 1.6em; margin: 16px 0 0; font-weight: 600; font-size: .9375rem; color: var(--ink-2); }
.form-status.bad { color: #b3192e; }
[data-theme="dark"] .form-status.bad { color: #ff8a96; }
.form-foot { margin-top: 20px; font-size: .9375rem; color: var(--ink-3); }
.form-foot a { color: var(--brand-ink); }
@media (max-width: 600px) { .delete-form-card { background: transparent; padding: 0; border-radius: 0; } }

/* ---------- 404 ---------- */
.not-found { padding: clamp(64px, 12vw, 140px) 0; }
.not-found h1 { font-size: clamp(2.4rem, 1.5rem + 4vw, 4rem); font-weight: 800; letter-spacing: -0.035em; max-width: 12em; }
.not-found p { color: var(--ink-2); font-size: 1.15rem; max-width: 34em; margin: 18px 0 28px; }
.not-found .actions { display: flex; flex-wrap: wrap; gap: 12px; }
