/* ============================================================================
   TortFlow — Marketing site design tokens
   Faithful translation of the tortflow-cdp design system (src/plugins/vuetify.js
   + src/assets/main.css) into a standalone stylesheet. Same brand green, same
   Apple-grey neutrals, same soft diffuse shadows, same Fraunces wordmark face —
   so the site and the product read as one brand. Marketing-only additions: a
   fluid type scale, section rhythm, and the aurora/grain atmosphere.
   ============================================================================ */

/* ---- Wordmark face: Fraunces Variable (self-hosted, same files as the CDP) --- */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/fraunces-latin-standard-normal.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: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/fraunces-latin-ext-standard-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/fraunces-latin-standard-italic.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;
}

:root {
  /* ---- Type families (mirror the CDP: SF body, Fraunces display) ---- */
  --tf-font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
    'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
  --tf-font-display: 'Fraunces Variable', 'Fraunces', Georgia, 'Times New Roman', serif;
  --tf-font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;

  /* ---- Brand palette (grounded in vuetify.js light theme) ---- */
  --tf-green: #059669;        /* primary / brand — agent green */
  --tf-green-600: #047857;    /* hover */
  --tf-green-700: #036249;
  --tf-green-300: #6ee7b7;
  --tf-indigo: #5856D6;       /* secondary — the wordmark/brand-icon violet */
  --tf-human: #F59E0B;        /* embedded-human accent */
  /* AA-safe "ink" variants for small text on light surfaces (graphics stay vivid) */
  --tf-green-ink: #047857;
  --tf-indigo-ink: #4f46e5;
  --tf-human-ink: #b45309;
  --tf-orange: #FF9500;       /* accent / warning */
  --tf-red: #FF3B30;
  --tf-teal: #5AC8FA;

  /* ---- Neutrals / surfaces (Apple-grey scale, light) ---- */
  --tf-canvas: #f4f3f1;       /* warm page canvas (CDP --bg-warm) */
  --tf-canvas-2: #edece9;     /* slightly deeper band */
  --tf-band: var(--tf-canvas-2); /* alternating section band tone */
  --tf-surface: #ffffff;      /* cards */
  --tf-surface-2: #fbfbfd;
  --tf-ink: #1d1d1f;          /* primary text */
  --tf-ink-2: #56565b;        /* secondary text (a touch darker than app for contrast) */
  --tf-ink-3: #6e6e73;        /* tertiary text */
  --tf-ink-4: #aeaeb2;        /* quaternary / hints */
  --tf-hairline: rgba(0, 0, 0, 0.08);
  --tf-hairline-2: rgba(0, 0, 0, 0.06);
  --tf-field-border: rgba(0, 0, 0, 0.16);
  --tf-hover: rgba(0, 0, 0, 0.04);

  /* ---- Green tints for washes / glows ---- */
  --tf-green-wash: rgba(5, 150, 105, 0.10);
  --tf-green-wash-2: rgba(5, 150, 105, 0.06);
  --tf-green-glow: rgba(5, 150, 105, 0.28);
  --tf-on-brand: #ffffff;

  /* ---- Shadows (soft + diffuse, from CDP shared.css) ---- */
  --tf-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --tf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --tf-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --tf-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --tf-shadow-pop: 0 8px 30px rgba(0, 0, 0, 0.16);
  --tf-shadow-xl: 0 24px 70px rgba(0, 0, 0, 0.16);
  --tf-shadow-brand: 0 18px 50px -12px rgba(5, 150, 105, 0.35);

  /* ---- Radii (from CDP) ---- */
  --tf-r-xs: 7px;
  --tf-r-sm: 10px;
  --tf-r-md: 14px;
  --tf-r-lg: 18px;
  --tf-r-xl: 24px;
  --tf-r-2xl: 32px;
  --tf-r-pill: 999px;

  /* ---- Motion ---- */
  --tf-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --tf-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tf-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tf-transition: all 0.3s var(--tf-ease);

  /* ---- Layout rhythm ---- */
  --tf-container: 1200px;
  --tf-container-wide: 1360px;
  --tf-gutter: clamp(1.25rem, 5vw, 3rem);
  --tf-section-y: clamp(5rem, 11vw, 9rem);

  /* ---- Fluid type scale ---- */
  --tf-fs-eyebrow: 0.8125rem;
  --tf-fs-display: clamp(2.4rem, 7.6vw, 6rem);
  --tf-fs-h1: clamp(2.25rem, 5vw, 3.75rem);
  --tf-fs-h2: clamp(1.9rem, 3.8vw, 3rem);
  --tf-fs-h3: clamp(1.3rem, 2.2vw, 1.7rem);
  --tf-fs-lead: clamp(1.125rem, 1.7vw, 1.4rem);
  --tf-fs-body: 1.0625rem;
  --tf-fs-small: 0.9375rem;

  color-scheme: light;
}

/* ============================================================================
   Dark theme — a full flip (per CDP's dark values in vuetify.js + main.css).
   Applies when the OS prefers dark AND the user hasn't forced light, or when the
   toggle stamps [data-theme="dark"] on <html>. The toggle wins in both directions.
   ============================================================================ */
:root[data-theme='dark'] {
  --tf-green: #10B981;
  --tf-green-600: #34d399;
  --tf-green-700: #059669;
  --tf-indigo: #7d7bef;
  --tf-human: #fbbf24;
  --tf-green-ink: #10B981;
  --tf-indigo-ink: #818cf8;
  --tf-human-ink: #fbbf24;

  --tf-canvas: #161618;
  --tf-canvas-2: #202023;
  --tf-surface: #2c2c2e;
  --tf-surface-2: #242427;
  --tf-band: var(--tf-surface-2);
  --tf-ink: #ebebef;
  --tf-ink-2: #b8b8bf;
  --tf-ink-3: #98989d;
  --tf-ink-4: #636366;
  --tf-hairline: rgba(255, 255, 255, 0.10);
  --tf-hairline-2: rgba(255, 255, 255, 0.06);
  --tf-field-border: rgba(255, 255, 255, 0.22);
  --tf-hover: rgba(255, 255, 255, 0.06);

  --tf-green-wash: rgba(16, 185, 129, 0.14);
  --tf-green-wash-2: rgba(16, 185, 129, 0.08);
  --tf-green-glow: rgba(16, 185, 129, 0.34);

  --tf-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --tf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --tf-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --tf-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  --tf-shadow-pop: 0 10px 34px rgba(0, 0, 0, 0.6);
  --tf-shadow-xl: 0 26px 70px rgba(0, 0, 0, 0.62);
  --tf-shadow-brand: 0 18px 55px -12px rgba(16, 185, 129, 0.45);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --tf-green: #10B981;
    --tf-green-600: #34d399;
    --tf-green-700: #059669;
    --tf-indigo: #7d7bef;
    --tf-human: #fbbf24;
    --tf-green-ink: #10B981;
    --tf-indigo-ink: #818cf8;
    --tf-human-ink: #fbbf24;

    --tf-canvas: #161618;
    --tf-canvas-2: #202023;
    --tf-surface: #2c2c2e;
    --tf-surface-2: #242427;
    --tf-ink: #ebebef;
    --tf-ink-2: #b8b8bf;
    --tf-ink-3: #98989d;
    --tf-ink-4: #636366;
    --tf-hairline: rgba(255, 255, 255, 0.10);
    --tf-hairline-2: rgba(255, 255, 255, 0.06);
    --tf-field-border: rgba(255, 255, 255, 0.22);
    --tf-hover: rgba(255, 255, 255, 0.06);

    --tf-green-wash: rgba(16, 185, 129, 0.14);
    --tf-green-wash-2: rgba(16, 185, 129, 0.08);
    --tf-green-glow: rgba(16, 185, 129, 0.34);

    --tf-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --tf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --tf-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --tf-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
    --tf-shadow-pop: 0 10px 34px rgba(0, 0, 0, 0.6);
    --tf-shadow-xl: 0 26px 70px rgba(0, 0, 0, 0.62);
    --tf-shadow-brand: 0 18px 55px -12px rgba(16, 185, 129, 0.45);

    color-scheme: dark;
  }
}
