/* ==========================================================================
   tokens.css — the single source of truth for the visual language.
   Change a value here and it propagates across the whole site.
   ========================================================================== */

:root {
  /* --- Core palette -------------------------------------------------------
     Two grounded materials in rhythm: wet soil (the dark bands) and sun-dried
     rice husk (the daylight bands). Nothing here is neutral-black — the dark
     is warm loam, so the page reads as earth at dusk, not empty space. */
  --c-night:      #1a140d;   /* wet loam — deep, warm brown-black           */
  --c-night-2:    #241c12;   /* raised soil surface                         */
  --c-night-3:    #33291b;   /* furrows, hairlines, inset panels            */
  --c-deep:       #22405a;   /* Planet Niaga water-blue, from the identity  */

  --c-husk:       #f0e7d2;   /* rice husk / kraft paper — the daylight bands */
  --c-husk-2:     #e6d9bd;   /* husk, one step down                         */

  /* Company accents — each drawn from the thing it does */
  --c-capital:    #3d7ea6;   /* Planet Niaga JV — irrigation / pond water   */
  --c-land:       #4f8a3a;   /* SoFarm — living leaf green                  */
  --c-table:      #2f8f7d;   /* Dè Tillapia — fresh tilapia-water teal      */
  --c-table-alt:  #6aa84f;   /* Dè Tillapia — secondary, garden green       */
  --c-kunyit:     #d99527;   /* warm accent: turmeric, harvest, low sun, CTA */

  /* --- Text ------------------------------------------------------------- */
  --t-night:      #f3ecdd;
  --t-night-dim:  rgba(243, 236, 221, 0.66);
  --t-night-faint:rgba(243, 236, 221, 0.36);
  --t-husk:       #2b2114;
  --t-husk-dim:   rgba(43, 33, 20, 0.70);
  --t-husk-faint: rgba(43, 33, 20, 0.42);

  /* --- Lines ------------------------------------------------------------ */
  --line-night:   rgba(243, 236, 221, 0.15);
  --line-husk:    rgba(43, 33, 20, 0.18);

  /* Per-section aliases. Sections override these; components read them, so
     one component stylesheet works on both soil and husk. */
  --fg:           var(--t-night);
  --fg-dim:       var(--t-night-dim);
  --fg-faint:     var(--t-night-faint);
  --bg:           var(--c-night);
  --line:         var(--line-night);
  --accent:       var(--c-land);

  /* --- Type ------------------------------------------------------------- */
  --f-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --f-body:    'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono:    'DM Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  /* Fluid scale — min at 360px viewport, max at 1440px */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --fs-lg:   clamp(1.125rem, 1.05rem + 0.35vw, 1.35rem);
  --fs-xl:   clamp(1.4rem, 1.2rem + 0.9vw, 2rem);
  --fs-2xl:  clamp(1.9rem, 1.5rem + 1.9vw, 3.2rem);
  --fs-3xl:  clamp(2.6rem, 1.8rem + 3.6vw, 5rem);
  --fs-4xl:  clamp(3.2rem, 1.9rem + 6vw, 8rem);

  --lh-tight: 0.98;
  --lh-snug:  1.16;
  --lh-body:  1.62;
  --ls-mono:  0.16em;

  /* --- Space ------------------------------------------------------------ */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-5:  1.5rem;
  --s-6:  2rem;
  --s-7:  3rem;
  --s-8:  4rem;
  --s-9:  6rem;
  --s-10: 8rem;

  --gutter:     clamp(1.25rem, 4vw, 3.5rem);
  --shell:      1320px;
  --shell-text: 68ch;
  --section-y:  clamp(4.5rem, 10vw, 9.5rem);

  /* --- Radius & depth --------------------------------------------------- */
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 26px;
  --r-pill: 999px;

  --shadow-soft: 0 24px 60px -30px rgba(0, 0, 0, 0.75);
  --shadow-lift: 0 40px 90px -40px rgba(0, 0, 0, 0.85);

  /* --- Motion ------------------------------------------------------------
     Two curves only: `ease-out-soft` for entrances, `ease-spring` for
     interface feedback. Consistency here is what makes motion feel authored. */
  --e-out:    cubic-bezier(0.22, 0.68, 0.28, 1);
  --e-spring: cubic-bezier(0.34, 1.32, 0.5, 1);
  --d-fast:   180ms;
  --d-mid:    420ms;
  --d-slow:   900ms;

  --nav-h: 76px;
}

/* Sections opt into a colour context by setting these three aliases. */
.ctx-night {
  --fg: var(--t-night);
  --fg-dim: var(--t-night-dim);
  --fg-faint: var(--t-night-faint);
  --bg: var(--c-night);
  --line: var(--line-night);
}

.ctx-husk {
  --fg: var(--t-husk);
  --fg-dim: var(--t-husk-dim);
  --fg-faint: var(--t-husk-faint);
  --bg: var(--c-husk);
  --line: var(--line-husk);
}
