/* style.css — Statement Bonds Design Tokens & Components */

/* ===== FONTS ===== */
/* Oswald for display (closest web-safe to Kallisto) */
/* EB Garamond for callouts/subheadings */
/* Montserrat for body/nav/buttons */

:root {
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-callout: 'EB Garamond', Georgia, serif;
  --font-body: 'Montserrat', 'Helvetica Neue', sans-serif;
}

/* ===== TYPE SCALE ===== */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* ===== SPACING (4px base) ===== */
:root {
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ===== RADIUS ===== */
:root {
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

/* ===== TRANSITIONS ===== */
:root {
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== CONTENT WIDTHS ===== */
:root {
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ===== LIGHT MODE (DEFAULT) ===== */
:root, [data-theme="light"] {
  /* Brand colors */
  --brand-black: #000000;
  --brand-dark-brown: #503528;
  --brand-copper: #af7b57;
  --brand-cream: #f0e5d9;
  --brand-deep-teal: #014650;
  --brand-medium-teal: #4b848e;
  --brand-light-teal: #afdee0;

  /* Surfaces */
  --color-bg:             #ffffff;
  --color-surface:        #f9f7f4;
  --color-surface-2:      #f0e5d9;  /* cream */
  --color-surface-offset: #eae0d4;
  --color-surface-offset-2: #e2d6c8;
  --color-surface-dynamic: #d9cdbf;
  --color-divider:        #d4c9bb;
  --color-border:         oklch(0.65 0.02 70 / 0.2);

  /* Text */
  --color-text:           #1a1a1a;
  --color-text-muted:     #5a5550;
  --color-text-faint:     #9a958e;
  --color-text-inverse:   #f0e5d9;

  /* Primary Accent — Deep Teal */
  --color-primary:        #014650;
  --color-primary-hover:  #013840;
  --color-primary-active: #012a30;
  --color-primary-highlight: #d8eced;

  /* Copper accent */
  --color-accent-warm:    #af7b57;
  --color-accent-warm-hover: #9a6a48;

  /* Semantic */
  --color-success:        #2a7a3a;
  --color-success-highlight: #d4e8d6;
  --color-error:          #b5292a;
  --color-error-highlight: #f5d5d5;
  --color-warning:        #a06515;
  --color-warning-highlight: #f0e0c5;

  /* Shadows (warm-tinted) */
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 70 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.25 0.02 70 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.25 0.02 70 / 0.12);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:             #012a30;
  --color-surface:        #013840;
  --color-surface-2:      #014650;
  --color-surface-offset: #015560;
  --color-surface-offset-2: #026470;
  --color-surface-dynamic: #2a5f66;
  --color-divider:        oklch(0.45 0.04 192 / 0.3);
  --color-border:         oklch(0.5 0.04 192 / 0.25);

  --color-text:           #f0e5d9;
  --color-text-muted:     #afc5c8;
  --color-text-faint:     #6a9098;
  --color-text-inverse:   #014650;

  --color-primary:        #afdee0;
  --color-primary-hover:  #c5e8ea;
  --color-primary-active: #daf2f3;
  --color-primary-highlight: #024858;

  --color-accent-warm:    #d4a07a;
  --color-accent-warm-hover: #c48f68;

  --color-success:        #5cb56d;
  --color-success-highlight: #1a3a22;
  --color-error:          #e06060;
  --color-error-highlight: #3a1a1a;
  --color-warning:        #d4a060;
  --color-warning-highlight: #3a2a15;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #012a30;
    --color-surface:        #013840;
    --color-surface-2:      #014650;
    --color-surface-offset: #015560;
    --color-surface-offset-2: #026470;
    --color-surface-dynamic: #2a5f66;
    --color-divider:        oklch(0.45 0.04 192 / 0.3);
    --color-border:         oklch(0.5 0.04 192 / 0.25);

    --color-text:           #f0e5d9;
    --color-text-muted:     #afc5c8;
    --color-text-faint:     #6a9098;
    --color-text-inverse:   #014650;

    --color-primary:        #afdee0;
    --color-primary-hover:  #c5e8ea;
    --color-primary-active: #daf2f3;
    --color-primary-highlight: #024858;

    --color-accent-warm:    #d4a07a;
    --color-accent-warm-hover: #c48f68;

    --color-success:        #5cb56d;
    --color-success-highlight: #1a3a22;
    --color-error:          #e06060;
    --color-error-highlight: #3a1a1a;
    --color-warning:        #d4a060;
    --color-warning-highlight: #3a2a15;

    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
  }
}
