/* =========================================================
   tokens.css — Design tokens & theme
   Values extracted 1:1 from production mrpropertysiam.com
   ========================================================= */

:root {
  /* ─── Brand palette (exact match to live site) ─── */
  --brand-gold:            #B9A27F;   /* primary gold — buttons, accents, logo (matches prod Horizons) */
  --brand-gold-dark:       #A68F6C;   /* hover state (matches prod Horizons) */
  --brand-gold-soft:       #C7B08F;   /* softer gold for decorative accents */
  --brand-gold-light:      #EFE1CE;   /* tinted bg + dark-mode heading color */
  --brand-gold-text:       #997B4D;   /* accessible gold text on light bg */

  --brand-blue:            #4A5F81;   /* medium navy */
  --brand-blue-dark:       #354766;   /* nav bar / card bg */
  --brand-blue-very-dark:  #202C40;   /* footer gradient bottom */

  --brand-cream:           #FCFAF7;   /* cream on dark backgrounds */

  /* ─── Neutrals (derived from HSL on live site) ─── */
  --color-bg-light:        #FBFAF8;   /* page bg, light mode */
  --color-fg-light:        #282F3D;   /* text, light mode */
  --color-muted-light:     #616D83;
  --color-border-light:    #E0E3EA;

  --color-bg-dark:         #181C24;   /* page bg, dark mode */
  --color-fg-dark:         #F5F6F8;   /* text, dark mode */
  --color-muted-dark:      #98A1B3;
  --color-border-dark:     #374052;

  --color-white:           #FFFFFF;

  /* ─── Aliases used around the codebase (back-compat) ─── */
  --color-cream:           var(--brand-cream);
  --color-cream-2:         #F7F3EC;
  --color-warm-tan:        #EFE1CE;
  --color-navy:            var(--color-fg-light);
  --color-navy-deep:       var(--brand-blue-dark);
  --color-navy-dark:       var(--color-bg-dark);
  --color-navy-darker:     #0F131A;
  --color-gold:            var(--brand-gold);
  --color-gold-deep:       var(--brand-gold-dark);
  --color-gold-soft:       var(--brand-gold-light);
  --color-teal:            #5B8DA3;
  --color-muted:           var(--color-muted-light);
  --color-border:          var(--color-border-light);

  /* ─── Semantic tokens — light mode default ─── */
  --bg:               var(--color-bg-light);
  --bg-alt:            #F4F0E8;
  --bg-elev:           var(--color-white);
  --bg-inverse:        var(--brand-blue-dark);
  --text:              var(--color-fg-light);
  --text-muted:        var(--color-muted-light);
  --text-inverse:      var(--brand-cream);
  --heading:           var(--color-fg-light);
  --accent:            var(--brand-gold);
  --accent-strong:     var(--brand-gold-dark);
  --accent-text:       var(--brand-gold-text);   /* gold-toned TEXT that stays readable */
  --border:            var(--color-border-light);

  --shadow-sm: 0 1px 2px rgba(40, 47, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(40, 47, 61, 0.08);
  --shadow-lg: 0 20px 50px rgba(40, 47, 61, 0.15);
  --shadow-card: 0 2px 8px rgba(40, 47, 61, 0.06), 0 0 0 1px rgba(40, 47, 61, 0.04);

  /* ─── Typography (exact match to live site) ─── */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-button: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ─── Motion tokens (Horizons-match) ─── */
  --ease-out-soft:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:       0.2s;
  --dur-base:       0.3s;
  --dur-slow:       0.8s;
  --shadow-xl:      0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.10);
  --shadow-cta:     0 24px 40px -12px rgba(26, 32, 44, 0.25);

  --text-xs:     0.75rem;
  --text-sm:     0.875rem;
  --text-base:   1rem;
  --text-lg:     1.125rem;
  --text-xl:     1.25rem;
  --text-2xl:    1.5rem;
  --text-3xl:    2rem;
  --text-4xl:    2.5rem;
  --text-hero:    clamp(2.75rem, 6.5vw, 5.25rem);
  --text-display: clamp(2.25rem, 4.8vw, 3.75rem);
  --text-section: clamp(1.875rem, 3.4vw, 2.75rem);

  /* ─── Spacing (8pt grid) ─── */
  --space-0:  0;
  --space-1:  0.5rem;
  --space-2:  1rem;
  --space-3:  1.5rem;
  --space-4:  2rem;
  --space-5:  2.5rem;
  --space-6:  3rem;
  --space-8:  4rem;
  --space-10: 5rem;
  --space-12: 6rem;
  --space-16: 8rem;
  --space-20: 10rem;

  /* ─── Layout ─── */
  --max-content: 1280px;
  --max-narrow:  960px;
  --max-text:    720px;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 999px;

  /* ─── Motion ─── */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    150ms;
  --dur-base:    250ms;
  --dur-slow:    400ms;

  /* ─── Nav ─── */
  --nav-h:        92px;
  --nav-h-mobile: 76px;

  /* ─── Footer gradient (live site) ─── */
  --footer-gradient: linear-gradient(180deg, var(--brand-blue-dark) 0%, var(--brand-blue-very-dark) 100%);
}

/* ═══════════════════════════════════════════════════════
   Dark theme — matches live site .dark class
   Page bg: #181C24  |  Text: #F5F6F8  |  Headings: #EFE1CE
   ═══════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg:           var(--color-bg-dark);
  --bg-alt:       #1F242E;
  --bg-elev:      #242A36;
  --bg-inverse:   #0E1118;
  --text:         var(--color-fg-dark);
  --text-muted:   var(--color-muted-dark);
  --text-inverse: var(--color-fg-light);
  --heading:      var(--brand-gold-light);     /* warm cream headings in dark mode */
  --accent:       var(--brand-gold);
  --accent-strong:var(--brand-gold-dark);
  --accent-text:  var(--brand-gold);            /* gold stays full brightness in dark mode */
  --border:       var(--color-border-dark);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(245, 246, 248, 0.06);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
