/* HostedEmail.io design tokens. Light theme only, on :root. */

:root {
  /* ---------- Primitive palette ---------- */
  --brand-50: #EEF3FA;
  --brand-100: #DCE6F4;
  --brand-200: #B7CBE8;
  --brand-300: #8FB3E8;
  --brand-400: #5F8ACB;
  --brand-500: #3567AA;
  --brand-600: #1F4E8C;
  --brand-700: #173D6E;
  --brand-800: #112D52;
  --brand-900: #0F2340;

  --accent-100: #FBE6DD;
  --accent-300: #F08A63;
  --accent-500: #D4502A;
  --accent-600: #C2461F;
  --accent-700: #9A3516;

  --neutral-0: #FFFFFF;
  --neutral-25: #FBFAF7;
  --neutral-50: #F5F3EE;
  --neutral-100: #ECE9E2;
  --neutral-200: #DCD8CF;
  --neutral-300: #C2BDB2;
  --neutral-400: #9A958A;
  --neutral-500: #75716A;
  --neutral-600: #57544E;
  --neutral-700: #3D3B37;
  --neutral-800: #282724;
  --neutral-900: #1A1917;
  --neutral-950: #141412;

  /* ---------- Semantic colour (light) ---------- */
  --color-bg: var(--neutral-25);
  --color-surface: var(--neutral-0);
  --color-surface-sunken: var(--neutral-50);
  --color-surface-inverse: var(--brand-900);
  --color-border: var(--neutral-200);
  --color-border-strong: var(--neutral-300);
  --color-text: var(--neutral-900);
  --color-text-muted: var(--neutral-600);
  --color-text-subtle: var(--neutral-500);
  --color-text-inverse: #F3F1EC;
  --color-heading: var(--brand-900);

  --color-primary: var(--brand-600);
  --color-primary-hover: var(--brand-700);
  --color-primary-active: var(--brand-800);
  --color-on-primary: #FFFFFF;
  --color-primary-soft: var(--brand-50);
  --color-primary-soft-border: var(--brand-100);

  --color-accent: var(--accent-500);
  --color-accent-text: var(--accent-600);
  --color-accent-soft: var(--accent-100);

  --color-link: var(--brand-600);
  --color-link-hover: var(--brand-800);
  --color-focus: #2F6FD0;
  --color-focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-focus);

  --color-disabled-bg: var(--neutral-100);
  --color-disabled-text: var(--neutral-500);
  --color-disabled-border: var(--neutral-200);

  --color-success: #1E7A46;
  --color-success-bg: #E6F4EC;
  --color-success-border: #B5DEC5;
  --color-warning: #8A5A00;
  --color-warning-bg: #FDF3DC;
  --color-warning-border: #EED39A;
  --color-error: #B42318;
  --color-error-bg: #FCEBE9;
  --color-error-border: #F2C2BC;
  --color-info: #1F5FA8;
  --color-info-bg: #EAF1FB;
  --color-info-border: #C3D6F0;

  --color-code-bg: var(--neutral-50);
  --color-code-text: var(--neutral-800);
  --color-placeholder-stripe: var(--neutral-100);

  /* Airmail stripe motif (used on answer box + CTA band only) */
  --stripe-a: var(--accent-500);
  --stripe-b: var(--brand-600);
  --stripe-gap: var(--color-surface);

  /* ---------- Typography ---------- */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Mobile-first sizes; desktop overrides below */
  --font-size-h1: 2.125rem;     /* 34px */
  --line-height-h1: 1.18;
  --font-size-h2: 1.625rem;     /* 26px */
  --line-height-h2: 1.23;
  --font-size-h3: 1.25rem;      /* 20px */
  --line-height-h3: 1.3;
  --font-size-h4: 1.0625rem;    /* 17px */
  --line-height-h4: 1.4;
  --font-size-body-lg: 1.125rem;/* 18px */
  --line-height-body-lg: 1.6;
  --font-size-body: 1.0625rem;  /* 17px */
  --line-height-body: 1.65;
  --font-size-small: 0.9375rem; /* 15px */
  --line-height-small: 1.55;
  --font-size-caption: 0.8125rem; /* 13px */
  --line-height-caption: 1.45;
  --font-size-mono: 0.9375rem;  /* 15px */

  --letter-spacing-display: -0.015em;
  --letter-spacing-eyebrow: 0.08em;
  --measure: 68ch;
  --measure-narrow: 52ch;

  /* ---------- Spacing (4px base) ---------- */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --space-10: 8rem;    /* 128 */

  /* ---------- Layout ---------- */
  --layout-max: 75rem;          /* 1200px content */
  --layout-max-wide: 82.5rem;   /* 1320px */
  --layout-gutter: var(--space-4);
  --grid-columns: 4;
  --grid-gap: var(--space-4);
  --section-space: var(--space-8);
  --header-height: 4rem;
  /* Breakpoints (reference only; CSS can't read vars in @media)
     sm 480px · md 768px · lg 1024px · xl 1280px */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* ---------- Radius, borders, shadows ---------- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 999px;
  --border-width: 1px;
  --border-width-strong: 2px;
  --shadow-sm: 0 1px 2px rgb(26 25 23 / 0.06);
  --shadow-md: 0 1px 2px rgb(26 25 23 / 0.05), 0 4px 12px rgb(26 25 23 / 0.06);
  --shadow-lg: 0 2px 4px rgb(26 25 23 / 0.05), 0 12px 32px rgb(26 25 23 / 0.10);

  /* ---------- Motion ---------- */
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --icon-size-sm: 16px;
  --icon-size-md: 20px;
  --icon-size-lg: 24px;
  --icon-stroke: 1.75;

  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --font-size-h1: 3rem;        /* 48px */
    --line-height-h1: 1.12;
    --font-size-h2: 2.125rem;    /* 34px */
    --line-height-h2: 1.2;
    --font-size-h3: 1.5rem;      /* 24px */
    --line-height-h3: 1.3;
    --font-size-h4: 1.1875rem;   /* 19px */
    --font-size-body-lg: 1.1875rem;
    --layout-gutter: var(--space-5);
    --grid-columns: 12;
    --grid-gap: var(--space-5);
    --section-space: var(--space-9);
  }
}
