/* style.css — Tide to Vitality Design Tokens & Components */

/* ============================================
   GOOGLE FONTS
   ============================================ */
/* Loaded in HTML: Cormorant (display) + Manrope (body) */

/* ============================================
   TYPE SCALE (Fluid)
   ============================================ */
: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 system)
     ============================================ */
  --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;

  /* ============================================
     FONT FAMILIES
     ============================================ */
  --font-display: 'Cormorant', 'Georgia', serif;
  --font-body: 'Manrope', 'Helvetica Neue', sans-serif;

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

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

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

/* ============================================
   COASTAL PALETTE — LIGHT MODE
   Warm sand, ocean teal, soft coastal blue
   ============================================ */
:root, [data-theme="light"] {
  /* --- Surfaces (Coastal Sand) --- */
  --color-bg:             #f8f6f0;
  --color-surface:        #faf9f5;
  --color-surface-2:      #fdfcfa;
  --color-surface-offset: #f3f0ea;
  --color-surface-offset-2: #edeae3;
  --color-surface-dynamic: #e6e2da;
  --color-divider:        #dcd8cf;
  --color-border:         #d4cfc5;

  /* --- Text (Warm Dark) --- */
  --color-text:           #2a2520;
  --color-text-muted:     #6e695f;
  --color-text-faint:     #b5b0a8;
  --color-text-inverse:   #faf9f5;

  /* --- Primary Accent (Ocean Teal) --- */
  --color-primary:        #1a8a8a;
  --color-primary-hover:  #14706f;
  --color-primary-active: #0e5655;
  --color-primary-highlight: #d0e8e6;

  /* --- Secondary Accent (Coastal Blue) --- */
  --color-blue:           #5ba4b5;
  --color-blue-hover:     #488a99;
  --color-blue-active:    #36707d;
  --color-blue-highlight: #d6e8ee;

  /* --- Warm Accent (Sand Gold) --- */
  --color-gold:           #c4a882;
  --color-gold-hover:     #b0946e;
  --color-gold-active:    #9a7e5a;
  --color-gold-highlight: #ede5d8;

  /* --- Semantic: Success --- */
  --color-success:        #5a9a5a;
  --color-success-hover:  #468046;
  --color-success-active: #326632;
  --color-success-highlight: #d8e8d8;

  /* --- Semantic: Warning --- */
  --color-warning:        #c4884a;
  --color-warning-hover:  #a87040;
  --color-warning-active: #8c5a36;
  --color-warning-highlight: #ede0d2;

  /* --- Semantic: Error --- */
  --color-error:          #c45a5a;
  --color-error-hover:    #a84848;
  --color-error-active:   #8c3636;
  --color-error-highlight: #edd8d8;

  /* --- 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);
}

/* ============================================
   COASTAL PALETTE — DARK MODE
   ============================================ */
[data-theme="dark"] {
  /* --- Surfaces (Deep Ocean) --- */
  --color-bg:             #161514;
  --color-surface:        #1c1b19;
  --color-surface-2:      #21201d;
  --color-surface-offset: #1e1d1a;
  --color-surface-offset-2: #242320;
  --color-surface-dynamic: #2e2d2a;
  --color-divider:        #2a2926;
  --color-border:         #3a3936;

  /* --- Text --- */
  --color-text:           #d4d0c8;
  --color-text-muted:     #8a8680;
  --color-text-faint:     #5e5b56;
  --color-text-inverse:   #1c1b19;

  /* --- Primary Accent (Ocean Teal — brighter in dark) --- */
  --color-primary:        #4fb8b8;
  --color-primary-hover:  #2ea0a0;
  --color-primary-active: #1d8585;
  --color-primary-highlight: #2a3a3a;

  /* --- Secondary Accent (Coastal Blue — Dark) --- */
  --color-blue:           #7abfcc;
  --color-blue-hover:     #5aa8b8;
  --color-blue-active:    #4090a0;
  --color-blue-highlight: #2a3a40;

  /* --- Warm Accent (Sand Gold — Dark) --- */
  --color-gold:           #d4bc98;
  --color-gold-hover:     #c4a882;
  --color-gold-active:    #b0946e;
  --color-gold-highlight: #3a3428;

  /* --- Semantic: Success (Dark) --- */
  --color-success:        #72b872;
  --color-success-hover:  #5a9a5a;
  --color-success-active: #468046;
  --color-success-highlight: #2a3a2a;

  /* --- Semantic: Warning (Dark) --- */
  --color-warning:        #d4a070;
  --color-warning-hover:  #c4884a;
  --color-warning-active: #a87040;
  --color-warning-highlight: #3a3028;

  /* --- Semantic: Error (Dark) --- */
  --color-error:          #d47878;
  --color-error-hover:    #c45a5a;
  --color-error-active:   #a84848;
  --color-error-highlight: #3a2a2a;

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

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #161514;
    --color-surface:        #1c1b19;
    --color-surface-2:      #21201d;
    --color-surface-offset: #1e1d1a;
    --color-surface-offset-2: #242320;
    --color-surface-dynamic: #2e2d2a;
    --color-divider:        #2a2926;
    --color-border:         #3a3936;
    --color-text:           #d4d0c8;
    --color-text-muted:     #8a8680;
    --color-text-faint:     #5e5b56;
    --color-text-inverse:   #1c1b19;
    --color-primary:        #4fb8b8;
    --color-primary-hover:  #2ea0a0;
    --color-primary-active: #1d8585;
    --color-primary-highlight: #2a3a3a;
    --color-blue:           #7abfcc;
    --color-blue-hover:     #5aa8b8;
    --color-blue-active:    #4090a0;
    --color-blue-highlight: #2a3a40;
    --color-gold:           #d4bc98;
    --color-gold-hover:     #c4a882;
    --color-gold-active:    #b0946e;
    --color-gold-highlight: #3a3428;
    --color-success:        #72b872;
    --color-success-hover:  #5a9a5a;
    --color-success-active: #468046;
    --color-success-highlight: #2a3a2a;
    --color-warning:        #d4a070;
    --color-warning-hover:  #c4884a;
    --color-warning-active: #a87040;
    --color-warning-highlight: #3a3028;
    --color-error:          #d47878;
    --color-error-hover:    #c45a5a;
    --color-error-active:   #a84848;
    --color-error-highlight: #3a2a2a;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}
