/* style.css — Pirts Rīga Design System */

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

/* ===== FONT FAMILIES ===== */
:root {
  --font-display: 'Instrument Serif', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* ===== CUSTOM PALETTE: Warm Cabin with Forest Teal ===== */
:root, [data-theme="light"] {
  /* Surfaces — warm cream/off-white */
  --color-bg:               #f5f1eb;
  --color-surface:          #faf7f2;
  --color-surface-2:        #fdfbf8;
  --color-surface-offset:   #eee9e1;
  --color-surface-offset-2: #e7e1d8;
  --color-surface-dynamic:  #ddd7cd;
  --color-divider:          #d4cdc3;
  --color-border:           #c9c1b5;

  /* Text — warm dark brown-black */
  --color-text:             #2a2520;
  --color-text-muted:       #7a736a;
  --color-text-faint:       #b5ada3;
  --color-text-inverse:     #faf7f2;

  /* Primary Accent — Deep Forest Teal (matching kitchen cabinets) */
  --color-primary:          #2a6b5a;
  --color-primary-hover:    #1e5446;
  --color-primary-active:   #163d33;
  --color-primary-highlight:#d4e5df;

  /* CTA Accent — Warm Gold/Amber */
  --color-accent:           #c48a2a;
  --color-accent-hover:     #a87322;
  --color-accent-active:    #8c5e1a;
  --color-accent-highlight: #f0e4cc;

  /* Semantic */
  --color-error:            #a13544;
  --color-success:          #437a22;
  --color-warning:          #964219;

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

  /* Shadows (warm-toned) */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 60 / 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:               #1a1816;
  --color-surface:          #211f1c;
  --color-surface-2:        #282520;
  --color-surface-offset:   #1e1c19;
  --color-surface-offset-2: #252320;
  --color-surface-dynamic:  #333028;
  --color-divider:          #2e2b26;
  --color-border:           #3d3932;

  --color-text:             #d9d4cc;
  --color-text-muted:       #8a847b;
  --color-text-faint:       #5e5951;
  --color-text-inverse:     #1a1816;

  --color-primary:          #5aad93;
  --color-primary-hover:    #3d9479;
  --color-primary-active:   #2d7b63;
  --color-primary-highlight:#2a352f;

  --color-accent:           #daa44a;
  --color-accent-hover:     #c4912f;
  --color-accent-active:    #a87822;
  --color-accent-highlight: #3a3228;

  --color-error:            #dd6974;
  --color-success:          #6daa45;
  --color-warning:          #bb653b;

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #1a1816;
    --color-surface:          #211f1c;
    --color-surface-2:        #282520;
    --color-surface-offset:   #1e1c19;
    --color-surface-offset-2: #252320;
    --color-surface-dynamic:  #333028;
    --color-divider:          #2e2b26;
    --color-border:           #3d3932;

    --color-text:             #d9d4cc;
    --color-text-muted:       #8a847b;
    --color-text-faint:       #5e5951;
    --color-text-inverse:     #1a1816;

    --color-primary:          #5aad93;
    --color-primary-hover:    #3d9479;
    --color-primary-active:   #2d7b63;
    --color-primary-highlight:#2a352f;

    --color-accent:           #daa44a;
    --color-accent-hover:     #c4912f;
    --color-accent-active:    #a87822;
    --color-accent-highlight: #3a3228;

    --color-error:            #dd6974;
    --color-success:          #6daa45;
    --color-warning:          #bb653b;

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-img {
    filter: invert(1) brightness(2);
  }
}
