/* ==========================================================================
   Tours Bénies — Design Tokens
   --------------------------------------------------------------------------
   Evolution of the House CDB brand guide toward the gold + blush direction
   the client described. Same DNA, re-weighted:

     Brand guide            This system
     ------------------     -----------------------------------------------
     #1e3522 forest         KEPT as the structural anchor (logo, footer,
                            dark sections). Demoted from dominant to spine.
     #98765a bronze         EVOLVED to true antique gold (#B4894F) with a
                            metallic gradient for display moments.
     #eba188 blush          PROMOTED from accent to a full surface family.
     #c3b7a1 sand           SOFTENED for large fields; original kept as rule.
     #3b363a charcoal       KEPT verbatim as body ink.
     #ffffff white          REPLACED as page surface by warm cream (#FBF8F4).
   ========================================================================== */

:root {

  /* --- Forest: the anchor ------------------------------------------------ */
  --tb-forest-900: #12200F;   /* deepest — footer floor                      */
  --tb-forest-700: #1E3522;   /* BRAND GUIDE EXACT — logo, dark sections     */
  --tb-forest-500: #35513A;   /* hover / raised state on dark                */
  --tb-forest-100: #D7DFD6;   /* forest tint for hairlines on light          */

  /* --- Gold: the evolved bronze ------------------------------------------ */
  --tb-gold-900:   #6B4F27;   /* darkest — small gold text on a blush fill  */
  --tb-gold-700:   #8C6A3A;   /* deep — gold text on cream needs this weight */
  --tb-gold-500:   #B4894F;   /* PRIMARY GOLD — accents, rules, icons        */
  --tb-gold-300:   #D4B98A;   /* light gold — dividers, on-dark text         */
  --tb-gold-100:   #F1E6D2;   /* gold wash — section tint                    */

  /* Metallic gold. Display type and CTA rings only — never body copy.       */
  --tb-gold-metal: linear-gradient(
      100deg,
      #8C6A3A 0%,
      #D4B98A 28%,
      #F2E2C0 46%,
      #C0975A 62%,
      #8C6A3A 100%);

  /* --- Blush: promoted to a surface family ------------------------------- */
  --tb-blush-500:  #EBA188;   /* BRAND GUIDE EXACT — the blush itself        */
  --tb-blush-300:  #F3C7B5;   /* soft blush — chips, hovers                  */
  --tb-blush-100:  #F8E4DB;   /* blush tint — card fields                    */
  --tb-blush-50:   #FDF4F0;   /* blush wash — full section backgrounds       */

  /* --- Neutrals ---------------------------------------------------------- */
  --tb-ink:        #3B363A;   /* BRAND GUIDE EXACT — body copy               */
  --tb-ink-soft:   #6B6469;   /* secondary copy, captions                    */
  --tb-ink-faint:  #9A9297;   /* placeholder, disabled                       */
  --tb-sand:       #C3B7A1;   /* BRAND GUIDE EXACT — hairlines               */
  --tb-sand-soft:  #E8E0D4;   /* large neutral fields                        */
  --tb-cream:      #FBF8F4;   /* PAGE SURFACE — warmer than white            */
  --tb-white:      #FFFFFF;   /* cards lifted off the cream                  */

  /* --- Semantic ---------------------------------------------------------- */
  --tb-surface:        var(--tb-cream);
  --tb-surface-raised: var(--tb-white);
  --tb-surface-dark:   var(--tb-forest-700);
  --tb-rule:           rgba(195, 183, 161, .55);  /* sand @ 55%              */
  --tb-rule-dark:      rgba(212, 185, 138, .28);  /* gold-300 on forest      */

  /* ======================================================================
     TYPOGRAPHY
     ----------------------------------------------------------------------
     Brand guide lists AVENIR / PLAYFAIR DISPLAY / VERDANA.

     - Playfair Display  → kept verbatim. Free, self-hosted, and exactly the
                           premium editorial serif this brand needs.
     - Avenir            → commercial (Linotype), not web-licensable here.
                           Substituted with Nunito Sans, the closest free
                           humanist-geometric match: same generous x-height
                           and open apertures.
     - Verdana           → DELIBERATELY DROPPED. It is a 1996 screen font
                           designed for 640×480 CRTs; at any size it reads
                           as a system default and undercuts the premium
                           positioning the rest of the brand is buying.
                           Three families was also one too many. Flagged for
                           client sign-off.
     ====================================================================== */

  --tb-font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --tb-font-body:    "Nunito Sans", -apple-system, BlinkMacSystemFont,
                     "Segoe UI", Helvetica, Arial, sans-serif;

  /* The logo wordmark sets the letter-spacing language: wide, quiet, sure.  */
  --tb-track-wordmark: .22em;
  --tb-track-eyebrow:  .18em;
  --tb-track-display:  -.015em;

  /* Fluid display scale — clamps so nothing collapses on a 360px phone.     */
  /* 6vw put the headline at 99px on a 1280 viewport — five wrapped lines in
     a 632px column. Reined in so it lands around 67px there. */
  --tb-size-hero:  clamp(2.5rem, 1.5rem + 3.4vw, 4.5rem);
  --tb-size-h1:    clamp(2.25rem, 1.3rem + 4.2vw, 4.25rem);
  --tb-size-h2:    clamp(1.75rem, 1.2rem + 2.6vw, 3rem);
  --tb-size-h3:    clamp(1.35rem, 1.1rem + 1.2vw, 1.875rem);
  --tb-size-lead:  clamp(1.0625rem, 1rem + .4vw, 1.3125rem);
  --tb-size-body:  1.0625rem;
  --tb-size-small: .9375rem;
  --tb-size-micro: .75rem;

  --tb-leading-display: 1.06;
  --tb-leading-head:    1.14;
  --tb-leading-body:    1.68;

  /* ======================================================================
     SPACE — 8px base, doubling. Section rhythm is deliberately generous;
     white space is most of what reads as "premium" here.
     ====================================================================== */
  --tb-space-1:  .5rem;
  --tb-space-2:  1rem;
  --tb-space-3:  1.5rem;
  --tb-space-4:  2rem;
  --tb-space-5:  3rem;
  --tb-space-6:  4rem;
  --tb-space-7:  6rem;
  --tb-space-8:  8rem;
  --tb-section:  clamp(4.5rem, 3rem + 7vw, 9rem);
  --tb-gutter:   clamp(1.25rem, .5rem + 3vw, 3rem);
  --tb-measure:  68ch;          /* max line length for body copy            */
  --tb-max:      1320px;        /* outer container                          */
  --tb-max-text: 780px;         /* centred editorial column                 */

  /* ======================================================================
     FORM — the brand mark is an arch. Radii echo it: soft, never pill.
     ====================================================================== */
  --tb-radius-sm:  4px;
  --tb-radius-md:  10px;
  --tb-radius-lg:  18px;
  --tb-radius-arch: 999px 999px 10px 10px;  /* the Eiffel arch silhouette   */

  --tb-shadow-sm: 0 1px 2px rgba(30, 53, 34, .05),
                  0 2px 8px rgba(30, 53, 34, .04);
  --tb-shadow-md: 0 2px 6px rgba(30, 53, 34, .06),
                  0 12px 32px rgba(30, 53, 34, .07);
  --tb-shadow-lg: 0 4px 12px rgba(30, 53, 34, .07),
                  0 28px 64px rgba(30, 53, 34, .10);

  /* ======================================================================
     MOTION — calibrated against thebloombarr.com
     ----------------------------------------------------------------------
     Measured on the live reference: 0.3s dominates (51 of 59 transitions),
     with 0.4s / 0.5s for larger moves, and plain `ease` throughout. The
     durations are matched exactly so hovers feel identical; the curve is
     upgraded from `ease` to expo-out, which settles rather than drifts.

     The reference ships NO page-transition system (no Barba/Swup/GSAP —
     Swiper is its only JS library). See REFERENCE-thebloombarr.md.
     ====================================================================== */
  --tb-ease:       cubic-bezier(.22, 1, .36, 1);      /* expo-out           */
  --tb-ease-inout: cubic-bezier(.65, 0, .35, 1);
  --tb-dur-fast:   300ms;   /* reference-matched hover                      */
  --tb-dur-base:   400ms;
  --tb-dur-slow:   500ms;
  --tb-dur-page:   520ms;   /* View Transitions cross-fade                  */
  --tb-dur-gate:   900ms;   /* entry gate dissolve                          */
  --tb-stagger:    70ms;    /* per-child reveal offset                      */

  --tb-header-h:   84px;
  --tb-z-nav:      100;
  --tb-z-overlay:  200;
  --tb-z-curtain:  300;
}

/* ==========================================================================
   DARK THEME
   --------------------------------------------------------------------------
   The reference site opens on a "choose your experience" light/dark gate, so
   a genuine dark mode is a requirement, not a nicety. Rather than invent a
   neutral dark, this one is built from her own forest — the brand's darkest
   value becomes the surface, and gold/blush do the lifting.

   Applied by [data-theme="dark"] on <html>, set by the gate or the nav
   toggle and persisted to localStorage.
   ========================================================================== */
[data-theme="dark"] {
  --tb-surface:        #101B12;
  --tb-surface-raised: #17281A;
  --tb-surface-dark:   #0B130C;

  --tb-ink:        #EDE7DF;
  --tb-ink-soft:   #B3AAA0;
  --tb-ink-faint:  #7C736C;

  --tb-rule:       rgba(212, 185, 138, .20);
  --tb-rule-dark:  rgba(212, 185, 138, .26);

  /* Gold must brighten on dark or it muddies into the forest. The 900 step
     inverts outright — it is "furthest from the surface", not "darkest". */
  --tb-gold-900:   #EFDDBB;
  --tb-gold-700:   #D4B98A;
  --tb-gold-500:   #C6A468;
  --tb-gold-300:   #E4D0AA;
  --tb-gold-100:   #2A2216;

  --tb-blush-500:  #EBA188;
  --tb-blush-300:  #C98872;
  --tb-blush-100:  #2E1F1A;
  --tb-blush-50:   #17110E;

  --tb-forest-700: #17281A;
  --tb-forest-100: #2C4030;
  --tb-sand:       #4A443C;
  --tb-sand-soft:  #1C2A1E;
  --tb-cream:      #EDE7DF;

  --tb-shadow-sm: 0 1px 2px rgba(0,0,0,.30), 0 2px 8px rgba(0,0,0,.24);
  --tb-shadow-md: 0 2px 6px rgba(0,0,0,.34), 0 12px 32px rgba(0,0,0,.30);
  --tb-shadow-lg: 0 4px 12px rgba(0,0,0,.38), 0 28px 64px rgba(0,0,0,.40);
}

/* Headings sit on dark surfaces in this theme, so they must not stay forest. */
[data-theme="dark"] :is(h1, h2, h3, .tb-display) { color: var(--tb-cream); }

/* No prefers-color-scheme rule on purpose: the site opens light for every
   visitor, and goes dark only when someone picks it with the header toggle. */

/* Motion is decoration here, never information. Honour the OS setting. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --tb-dur-fast: 1ms;
    --tb-dur-base: 1ms;
    --tb-dur-slow: 1ms;
    --tb-dur-page: 1ms;
    --tb-stagger:  0ms;
  }
}
