/* =========================================================
   Istinara design tokens
   ---------------------------------------------------------
   The single source of truth for every value on the site.
   Components and sections use these variables only; a raw
   number in a stylesheet should be the exception (artwork
   positioning inside the project mockups, mainly).

   1. Colour      primitives → semantic roles (re-mapped by [data-theme="dark"])
   2. Typography  2 families, 14-step type scale, weights, leading, tracking
   3. Spacing     4px scale + section rhythm
   4. Layout      container, gutter, grid, breakpoints
   5. Shape       radii + the Istinara "notched" corner
   6. Elevation   shadows
   7. Motion      easing + durations
   8. Layers      z-index

   Fluid values are written as clamp(mobile, vw, desktop); the
   desktop value is what the Figma 1440 artboard shows.
   See styleguide.html for every token rendered.
   ========================================================= */

:root {
  /* ---------- 1. Colour: primitives (brand palette) ---------- */
  --indigo-200: #c9d0ee;
  --indigo: #354496;
  --indigo-deep: #222d6b;
  --midnight: #0a1230;
  --midnight-2: #131c42;
  --midnight-line: #26305a;
  --cyan: #6de0f3;
  --cyan-ink: #0b7285;
  --sky: #5cb9ed;
  --frost: #aeb6d3;
  --ink: #11162b;
  --graphite: #3b4258;
  --slate: #646b80;
  --slate-light: #8b93b0;                           /* slate that stays readable on midnight */
  --mist: #c7ccd8;
  --line: #e2e5ec;
  --paper: #f5f6f9;
  --white: #ffffff;

  /* ---------- 1. Colour: semantic roles (light theme) ---------- */
  --color-bg: var(--white);              /* default section background */
  --color-bg-alt: var(--paper);          /* alternate section background */
  --color-text: var(--ink);              /* headings, primary text */
  --color-text-muted: var(--graphite);   /* body copy, eyebrows */
  --color-text-subtle: var(--slate);     /* secondary descriptions, labels */
  --color-border: var(--line);           /* dividers, outlines */
  --color-primary: var(--indigo);        /* buttons, links, tags */
  --color-primary-strong: var(--indigo-deep);
  --color-on-primary: var(--white);
  --color-accent: var(--cyan);           /* dots, bullets, highlights */
  --color-accent-text: var(--cyan-ink);  /* numbers / accent text on light */
  --color-focus: var(--sky);
  --color-scrim: rgba(10, 18, 48, .35);  /* overlay behind the menu */
  --color-primary-soft: rgba(53, 68, 150, .08);

  /* ---------- 2. Typography ---------- */
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Helvetica Now Display", "Inter Tight", "Helvetica Neue", Arial, sans-serif;  /* hero headline only */

  /*               mobile   fluid     desktop (1440) */
  --fs-display-2xl: clamp(64px, 8.4vw, 120px);     /* page-opening title (About: "Our Story") */
  --fs-display-xl: clamp(40px, 4.1667vw, 60px);     /* chapter titles ("Our Services") */
  --fs-display:    clamp(32px, 3.6vw,   51.84px);   /* hero headline, service card names */
  --fs-h1:         clamp(30px, 3.2vw,   46.08px);   /* closing call to action */
  --fs-h2:         clamp(26px, 2.6vw,   37.44px);   /* section titles */
  --fs-h3:         clamp(24px, 2.3vw,   33.12px);   /* statements ("Istinara means illumination…") */
  --fs-h4:         clamp(22px, 2.1vw,   30.24px);   /* card titles */
  --fs-lead:       clamp(17px, 1.49vw,  21.45px);   /* hero intro */
  --fs-h5:         clamp(17px, 1.3vw,   18.72px);   /* list item titles */
  --fs-body-lg:    16px;
  --fs-body:       15px;
  --fs-body-sm:    14px;
  --fs-label:      13px;                            /* eyebrows, buttons, links */
  --fs-caption:    12px;
  --fs-micro:      11px;                            /* tags */

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

  --lh-display: 1;
  --lh-tight: 1.05;
  --lh-heading: 1.1;
  --lh-statement: 1.18;
  --lh-snug: 1.3;
  --lh-lead: 1.4;
  --lh-body: 1.55;

  --tracking-display: -.04em;
  --tracking-tight: -.03em;
  --tracking-heading: -.02em;
  --tracking-body: -.01em;

  /* ---------- 3. Spacing: 4px base scale ---------- */
  --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-14: 56px;
  --space-16: 64px;
  --space-18: 72px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-32: 128px;

  /* ---------- 3. Spacing: section rhythm ---------- */
  --section-y: clamp(72px, 11.11vw, 160px);         /* top/bottom padding of every section */
  --section-y-sm: clamp(40px, 3.89vw, 56px);        /* compact sections (call to action) */
  --section-head-gap: clamp(40px, 3.89vw, 56px);    /* section head → section body */
  --stack-gap: var(--space-8);                      /* eyebrow → title in a stacked head */
  --card-pad: var(--space-6);                       /* inner padding of cards */

  /* ---------- 4. Layout ---------- */
  --container: 1440px;
  --gutter: clamp(20px, 4.03vw, 58px);              /* 58px at 1440 */
  --grid-gap: var(--space-8);                       /* between the two page columns */
  --card-gap: var(--space-4);                       /* between cards */
  /* Inline edge of the container, for full-bleed elements that must line up with it.
     The % resolves against whatever element uses it (a full-width section or the viewport). */
  --edge: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  /* Breakpoints (media queries can't read variables): lg ≤ 1100px · md ≤ 991px · sm ≤ 600px */

  --nav-top: var(--space-4);
  --logo-w: 88px;
  --logo-h: 80px;
  --control-h: 54px;                                /* menu box header */
  --nav-h: 64px;                                    /* header bar on phones and tablets */

  /* ---------- 5. Shape ---------- */
  --radius-xs: 3px;                                 /* tags */
  --radius-sm: 4px;                                 /* base corner */
  --radius-md: 10px;                                /* browser windows */
  --radius-lg: 20px;                                /* media cards */
  --radius-pill: 999px;
  --notch-sm: 14px;                                 /* the raised top-right corner */
  --notch-md: 20px;
  --notch-lg: 28px;
  --shape-control: var(--radius-sm) var(--notch-sm) var(--radius-sm) var(--radius-sm);  /* buttons, menu box */
  --shape-panel:   var(--radius-sm) var(--notch-md) var(--radius-sm) var(--radius-sm);  /* menu panel, contact card */
  --shape-card:    var(--radius-sm) var(--notch-lg) var(--radius-sm) var(--radius-sm);  /* project cards */

  /* ---------- 6. Elevation ---------- */
  --shadow-float: 0 30px 60px -24px rgba(17, 22, 43, .35);     /* floating windows */
  --shadow-device: 0 30px 60px -20px rgba(0, 0, 0, .6);        /* phones */

  /* ---------- 7. Motion ---------- */
  --ease-out: cubic-bezier(.19, 1, .22, 1);         /* default: fast start, long settle */
  --ease-soft: cubic-bezier(.16, 1, .3, 1);         /* media zooms */
  --dur-fast: .3s;                                  /* colour changes */
  --dur-base: .5s;                                  /* arrows, small moves */
  --dur-fill: .6s;                                  /* button fills */
  --dur-slow: .9s;                                  /* panels, card artwork */
  --dur-slower: 1.6s;                               /* video zoom */

  /* ---------- 8. Layers ---------- */
  --z-nav: 50;
  --z-menu: 60;
  --z-skip: 100;

  /* ---------- 9. Scrollbar ---------- */
  --scrollbar-size: 8px;
  --scrollbar-thumb: rgba(53, 68, 150, .35);         /* indigo, quiet until it's needed */
  --scrollbar-thumb-hover: rgba(53, 68, 150, .7);
}

/* Dark chapters (services, call to action, footer, menu) re-map the semantic roles */
[data-theme="dark"] {
  --color-bg: var(--midnight);
  --color-bg-alt: var(--midnight-2);
  --color-text: var(--white);
  --color-text-muted: var(--frost);
  --color-text-subtle: var(--slate-light);
  --color-border: var(--midnight-line);
  --color-accent-text: var(--cyan);
  --color-focus: var(--cyan);
  --scrollbar-thumb: rgba(174, 182, 211, .3);         /* frost: the menu panel scrolls on short phones */
  --scrollbar-thumb-hover: rgba(174, 182, 211, .6);
  color: var(--color-text);
}
