/* ==========================================================================
   Colour. One file, two themes, chosen by the visitor.

   The light theme ("Vietnam Red / Gold") is the default and lives on :root.
   The dark theme ("Dark Moto") lives on :root[data-theme="dark"] and is turned
   on by the moon button in the header, which writes the choice to
   localStorage. A tiny inline script in <head> sets the attribute before the
   first paint, so a returning dark-theme visitor never sees a white flash.

   First visit with no stored choice: that same script reads the operating
   system's own light/dark setting. A phone in night mode therefore opens dark
   without the visitor touching anything, and the button is there to disagree.

   Every contrast ratio below is checked against WCAG AA — 4.5:1 for text,
   3:1 for large text and UI. Changing a value means re-checking it.
   ========================================================================== */

/* ---------- Theme A — Vietnam Red / Gold (light, default) ---------- */
:root {
  --color-scheme:  light;
  --theme-color:   #FFFFFF;
  --bg:            #FFFFFF;
  --surface:       #FBF7F2;
  --surface-2:     #F3EDE6;
  --surface-3:     #E9E0D6;
  --card:          #FFFFFF;

  --text:          #1A1512;
  --head:          #120E0C;
  --muted:         #5B534B;   /* 7.3:1 on white */

  --line:          rgba(26,21,18,.13);
  --line-strong:   rgba(26,21,18,.30);

  --cta:           #C1121F;   /* white text 6.1:1 */
  --cta-hover:     #9C0E19;
  --cta-text:      #FFFFFF;
  --cta-glow:      rgba(193,18,31,.26);

  --accent:          #F2B705; /* gold */
  --accent-contrast: #1A1512; /* on gold: 10.4:1 */
  --accent-soft:     rgba(242,183,5,.15);
  --accent-line:     rgba(242,183,5,.45);
  --accent-ink:      #8A6400; /* 5.3:1 on white */

  --ink:        #16100D;
  --ink-text:   rgba(255,255,255,.82);
  --ink-head:   #FFFFFF;
  --ink-muted:  rgba(255,255,255,.74);
  --ink-line:   rgba(255,255,255,.20);
  --ink-chip:   rgba(255,255,255,.09);
  --ink-hover:  rgba(255,255,255,.11);

  --hero-scrim: linear-gradient(100deg, rgba(14,9,7,.92) 0%, rgba(14,9,7,.78) 42%, rgba(14,9,7,.42) 100%);

  --header-bg:    rgba(255,255,255,.93);
  --callbar-bg:   #16100D;
  --callbar-text: #FFFFFF;
  --callbar-line: rgba(255,255,255,.17);

  --wa:        #107C68;  /* white text 4.9:1 — brand green #25D366 fails on white text */
  --wa-hover:  #0C6153;
  --wa-text:   #FFFFFF;

  --ok:    #1F7A3D;
  --warn:  #A8500B;
  --focus: #0B57D0;

  --logo-filter: none;

  --shadow-lg: 0 18px 46px rgba(22,16,13,.15);
}

/* ---------- Theme B — Dark Moto ---------- */
:root[data-theme="dark"] {
  --color-scheme:  dark;
  --theme-color:   #0C0C0E;
  --bg:            #0C0C0E;
  --surface:       #121318;
  --surface-2:     #1A1C22;
  --surface-3:     #24262E;
  --card:          #121318;

  --text:          #E9E9E5;
  --head:          #FFFFFF;
  --muted:         #A6AAB4;   /* 8.0:1 on --bg */

  --line:          rgba(255,255,255,.13);
  --line-strong:   rgba(255,255,255,.28);

  --cta:           #E8FF3C;   /* dark text 16.8:1 */
  --cta-hover:     #D2E827;
  --cta-text:      #0C0C0E;
  --cta-glow:      rgba(232,255,60,.20);

  --accent:          #FF5A1F;
  --accent-contrast: #0C0C0E; /* on orange: 6.4:1 */
  --accent-soft:     rgba(255,90,31,.16);
  --accent-line:     rgba(255,90,31,.42);
  --accent-ink:      #FF8A5B; /* 7.1:1 on --bg */

  --ink:        #08090B;
  --ink-text:   rgba(255,255,255,.82);
  --ink-head:   #FFFFFF;
  --ink-muted:  rgba(255,255,255,.74);
  --ink-line:   rgba(255,255,255,.18);
  --ink-chip:   rgba(255,255,255,.08);
  --ink-hover:  rgba(255,255,255,.10);

  --hero-scrim: linear-gradient(100deg, rgba(5,5,7,.94) 0%, rgba(5,5,7,.82) 42%, rgba(5,5,7,.46) 100%);

  --header-bg:    rgba(12,12,14,.92);
  --callbar-bg:   #121318;
  --callbar-text: #FFFFFF;
  --callbar-line: rgba(255,255,255,.14);

  --wa:        #1FA37F;
  --wa-hover:  #1A8B6C;
  --wa-text:   #06130F;

  --ok:    #7BD88F;
  --warn:  #FFB454;
  --focus: #8AB4FF;

  --logo-filter: invert(1);

  --shadow-lg: 0 18px 46px rgba(0,0,0,.62);
}
