:root {
  --ink: #181715;
  --ink-soft: #646058;
  --ink-faint: #9B958B;
  --canvas: #FAF8F4;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-alt: #F2EFE9;
  --surface-dark: #101214;
  --rule: #E4DEC9;
  --rule-strong: #CEC6AE;
  --rule-subtle: rgba(255, 255, 255, 0.14);
  --overlay: rgba(16, 18, 20, 0.56);
  --overlay-blur: blur(6px);

  /* Silverhythm (default house palette) */
  --brand: #173F54;
  --brand-deep: #0D2634;
  --brand-light: #245B77;
  --brand-accent: #D6DADF;
  --brand-pop: #2D6E91;
  --brand-gold: #B89342;
  --brand-hero: linear-gradient(140deg, #0D2634 0%, #173F54 100%);
  --brand-gradient-text: linear-gradient(135deg, #E2E6EA, #FFFFFF 55%, #B8C2C9);
  --brand-rgb: 23, 63, 84;
  --nav-solid: #0E232E;

  /* Fluid editorial type scale */
  --fs-xs: clamp(0.68rem, 0.64rem + 0.2vw, 0.75rem);
  --fs-sm: clamp(0.81rem, 0.78rem + 0.18vw, 0.88rem);
  --fs-base: clamp(0.92rem, 0.88rem + 0.2vw, 1rem);
  --fs-lg: clamp(1.12rem, 1.02rem + 0.45vw, 1.32rem);
  --fs-xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.05rem);
  --fs-2xl: clamp(2rem, 1.55rem + 2.2vw, 3.05rem);
  --fs-3xl: clamp(2.55rem, 1.85rem + 3.4vw, 4.35rem);

  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
  --ff-display: 'Cormorant Garamond', Georgia, serif;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 88px;

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-xl: 14px;
  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(24, 23, 21, 0.04);
  --sh-md: 0 8px 24px -6px rgba(24, 23, 21, 0.08);
  --sh-lg: 0 20px 44px -12px rgba(24, 23, 21, 0.12);
  --sh-xl: 0 28px 64px -16px rgba(16, 18, 20, 0.24);
  --sh-card: 0 2px 10px -2px rgba(24, 23, 21, 0.05);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 180ms;
  --dur: 300ms;
  --dur-slow: 520ms;

  --header-h: 56px;
  --brand-bar-h: 38px;
  --bottom-nav-h: 58px;
  --top-offset: calc(var(--header-h) + var(--brand-bar-h));
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --max-w: 1380px;

  --bg: var(--canvas);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --border: var(--rule);
  --accent: var(--brand);
  --accent-rgb: var(--brand-rgb);
  --serif: var(--ff-display);
  --sans: var(--ff-body);
}

@media (min-width: 768px) {
  :root {
    --header-h: 68px;
    --brand-bar-h: 0px;
    --top-offset: 68px;
  }
}

/* Editorial house palettes */
body[data-brand="silverythm"] {
  --brand: #173F54;
  --brand-deep: #0D2634;
  --brand-light: #245B77;
  --brand-accent: #D6DADF;
  --brand-pop: #2D6E91;
  --brand-rgb: 23, 63, 84;
  --nav-solid: #0E232E;
  --canvas: #FAF8F4;
  --surface: #FFFFFF;
  --surface-alt: #F2EFE9;
  --surface-dark: #101214;
  --ink: #181715;
  --ink-soft: #646058;
  --rule: #E4DEC9;
}

body[data-brand="devaramane"] {
  --brand: #8A6212;
  --brand-deep: #523907;
  --brand-light: #AE7F1E;
  --brand-accent: #F4EAD3;
  --brand-pop: #8A6212;
  --brand-rgb: 138, 98, 18;
  --nav-solid: #3D2B07;
  --canvas: #FAF5EC;
  --surface: #FFFFFF;
  --surface-alt: #F4ECDD;
  --surface-dark: #1A1308;
  --ink: #1E170D;
  --ink-soft: #6E614E;
  --rule: rgba(138, 98, 18, 0.22);
}

body[data-brand="udugore"] {
  --brand: #132252;
  --brand-deep: #091130;
  --brand-light: #21377B;
  --brand-accent: #C7A455;
  --brand-pop: #B08D3B;
  --brand-rgb: 19, 34, 82;
  --nav-solid: #0D1636;
  --canvas: #F6F7FA;
  --surface: #FFFFFF;
  --surface-alt: #ECEFF6;
  --surface-dark: #090E1C;
  --ink: #111524;
  --ink-soft: #5D6477;
  --rule: rgba(19, 34, 82, 0.14);
}

/* Dark atelier theme override for pages supporting light/dark switch */
body.theme-dark[data-brand="silverythm"] {
  --canvas: #0E1114;
  --surface: #151A1F;
  --surface-raised: #151A1F;
  --surface-alt: #1C2229;
  --ink: #F2EDE4;
  --ink-soft: rgba(242, 237, 228, 0.6);
  --rule: rgba(214, 218, 223, 0.14);
  --accent: #E2E5E8;
}

body.theme-dark[data-brand="devaramane"] {
  --canvas: #141009;
  --surface: #1D170E;
  --surface-raised: #1D170E;
  --surface-alt: #261E12;
  --ink: #F7EFE2;
  --ink-soft: rgba(247, 239, 226, 0.6);
  --rule: rgba(198, 160, 74, 0.22);
}

body.theme-dark[data-brand="udugore"] {
  --canvas: #0A0E1B;
  --surface: #11172B;
  --surface-raised: #11172B;
  --surface-alt: #17203A;
  --ink: #F3EFE8;
  --ink-soft: rgba(243, 239, 232, 0.6);
  --rule: rgba(199, 164, 85, 0.22);
}
