/* ==========================================================================
   AL MOIN GROUP — DESIGN TOKENS
   Single source of truth for colour, spacing, typography, motion and elevation.
   Authority: instructions/colors.md (v1.0) + instructions/layout.md (v1.0).

   RULE: no raw colour values may appear outside this file. Component styles
   reference semantic variables only. If a new colour is needed, add a token
   here first — never inline a hex value.
   ========================================================================== */

:root {
  /* ---------------------------------------------------------------------
     CORE BRAND PALETTE — colors.md §3
     --------------------------------------------------------------------- */
  --brand-obsidian: #101C19;  /* primary dark surface, hero, footer        */
  --brand-forest:   #183D30;  /* secondary dark surface, portfolio features */
  --brand-jade:     #315F4B;  /* interactive links, primary actions          */
  --brand-champagne:#B89A68;  /* restrained decorative accent ONLY           */

  /* ---------------------------------------------------------------------
     SURFACE PALETTE — colors.md §4
     --------------------------------------------------------------------- */
  --surface-white:    #FFFFFF;
  --surface-ivory:    #F5F3ED;
  --surface-sage:     #DCE5DD;
  --surface-mist:     #F0F2EE;
  --surface-elevated: #FCFCFA;

  /* ---------------------------------------------------------------------
     NEUTRAL SCALE — colors.md §5
     --------------------------------------------------------------------- */
  --neutral-950: #101C19;
  --neutral-900: #1D2723;
  --neutral-800: #303A35;
  --neutral-700: #47514B;
  --neutral-600: #5F6962;
  --neutral-500: #78817B;
  --neutral-400: #9AA29C;
  --neutral-300: #C4CBC5;
  --neutral-200: #DDE2DC;
  --neutral-100: #EEF0EB;
  --neutral-50:  #F8F9F6;
  --neutral-0:   #FFFFFF;

  /* ---------------------------------------------------------------------
     SEMANTIC COLOURS — colors.md §6
     Always paired with text or another indicator; never colour alone.
     --------------------------------------------------------------------- */
  --status-success:      #18794E;
  --status-success-bg:   #E8F5EC;
  --status-success-text: #0F5132;
  --status-warning:      #946200;
  --status-warning-bg:   #FFF4D6;
  --status-error:        #B42318;
  --status-error-bg:     #FEECEB;
  --status-error-text:   #8A1C14;
  --status-info:         #2457A7;
  --status-info-bg:      #EAF2FF;
  --status-info-text:    #1B4078;
  --status-neutral:      #59645C;
  --status-neutral-bg:   #EEF1ED;
  --status-neutral-text: #3E4640;

  /* ---------------------------------------------------------------------
     DARK SURFACES — colors.md §9
     --------------------------------------------------------------------- */
  --dark-background:        #101C19;
  --dark-surface:           #17251F;
  --dark-surface-elevated:  #1D2B24;
  --dark-surface-secondary: #23352B;
  --dark-border:            #3B4C41;
  --dark-text-primary:      #F5F3ED;
  --dark-text-secondary:    #D0D8D1;
  --dark-text-tertiary:     #B0BDB3;
  --dark-brand-accent:      #DCE5DD;

  /* ---------------------------------------------------------------------
     EXTENDED ACCENTS — colors.md §7
     Optional supporting accents. Never for primary buttons. Never all at once.
     --------------------------------------------------------------------- */
  --accent-sage:        #DCE9DF;
  --accent-sea-glass:   #D5E7DF;
  --accent-sandstone:   #E7D8BF;
  --accent-slate-blue:  #D8DDF2;
  --accent-terracotta:  #F0D8C9;
  --accent-soft-lilac:  #E9DFF1;

  /* ---------------------------------------------------------------------
     COMPONENT COLOUR ROLES — colors.md §8
     --------------------------------------------------------------------- */
  --color-bg:              var(--surface-ivory);
  --color-bg-alt:          var(--surface-mist);
  --color-surface:         var(--surface-white);
  --color-surface-raised:  var(--surface-elevated);

  --color-text:            var(--brand-obsidian);
  --color-text-secondary:  var(--neutral-600);
  --color-text-tertiary:   var(--neutral-600);
  --color-text-inverse:    var(--dark-text-primary);
  --color-text-inverse-secondary: var(--dark-text-secondary);

  --color-border:          var(--neutral-200);
  --color-border-strong:   var(--neutral-300);
  --color-divider:         var(--neutral-200);

  --color-link:            var(--brand-jade);
  --color-link-hover:      var(--brand-forest);

  --color-action:          var(--brand-jade);
  --color-action-hover:    var(--brand-forest);
  --color-action-text:     var(--surface-white);

  --color-accent:          var(--brand-champagne);
  --color-input-bg:        var(--surface-mist);
  --color-input-border:    var(--neutral-300);

  /* ---------------------------------------------------------------------
     TRANSLUCENT OVERLAYS — scrims, veils and glass surfaces.
     Declared here so component files never inline a colour value.
     --------------------------------------------------------------------- */
  --scrim-obsidian-95:  rgba(16, 28, 25, 0.95);
  --scrim-obsidian-88:  rgba(16, 28, 25, 0.88);
  --scrim-obsidian-72:  rgba(16, 28, 25, 0.72);
  --scrim-obsidian-55:  rgba(16, 28, 25, 0.55);
  --scrim-obsidian-50:  rgba(16, 28, 25, 0.50);
  --scrim-obsidian-38:  rgba(16, 28, 25, 0.38);
  --scrim-forest-40:    rgba(49, 95, 75, 0.40);
  --scrim-forest-28:    rgba(49, 95, 75, 0.28);
  --scrim-champagne-12: rgba(184, 154, 104, 0.12);
  --glass-ivory-90:     rgba(245, 243, 237, 0.90);
  --glass-ivory-97:     rgba(245, 243, 237, 0.97);
  --glass-ivory-92:     rgba(245, 243, 237, 0.92);
  --glass-forest-55:    rgba(23, 37, 31, 0.55);
  --glass-white:        rgba(255, 255, 255, 1);
  --glass-black:        rgba(0, 0, 0, 1);

  /* ---------------------------------------------------------------------
     SPACING SCALE — layout.md §3 (8-point base, 4px fine increments)
     --------------------------------------------------------------------- */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ---------------------------------------------------------------------
     LAYOUT — layout.md §4
     --------------------------------------------------------------------- */
  --container-width:   1280px;
  --container-wide:    1440px;
  --container-reading: 68ch;
  --page-gutter:       clamp(20px, 5vw, 80px);
  --section-space:     clamp(64px, 9vw, 128px);
  --section-space-sm:  clamp(48px, 6vw, 80px);
  --header-height:     84px;

  /* ---------------------------------------------------------------------
     TYPOGRAPHY — readme.md §5 + layout.md §6.1
     --------------------------------------------------------------------- */
  --font-serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --text-display:  clamp(2.75rem, 6.1vw, 5.25rem);
  --text-h1:       clamp(2.125rem, 4.4vw, 3.75rem);
  --text-h2:       clamp(1.75rem, 3.2vw, 2.75rem);
  --text-h3:       clamp(1.1875rem, 1.5vw, 1.4375rem);
  --text-h4:       clamp(1.0625rem, 1.15vw, 1.1875rem);
  --text-lead:     clamp(1.0625rem, 1.12vw, 1.1875rem);
  --text-body:     1rem;
  --text-small:    0.875rem;
  --text-caption:  0.8125rem;
  --text-label:    0.75rem;

  --leading-display: 1.02;
  --leading-snug:    1.18;
  --leading-normal:  1.55;
  --leading-relaxed: 1.75;

  --tracking-display: -0.035em;
  --tracking-tight:   -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.06em;
  --tracking-wider:   0.16em;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold:600;

  /* ---------------------------------------------------------------------
     RADII, ELEVATION, MOTION
     Premium through restraint: minimal radii, almost no shadow.
     --------------------------------------------------------------------- */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 28, 25, 0.05);
  --shadow-md: 0 10px 30px -18px rgba(16, 28, 25, 0.35);
  --shadow-none: none;

  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;

  --focus-ring: 0 0 0 2px var(--surface-ivory), 0 0 0 4px var(--brand-jade);
  --focus-ring-dark: 0 0 0 2px var(--brand-obsidian), 0 0 0 4px var(--dark-brand-accent);
}
