/* ===========================================================
   Triveni Power - base stylesheet
   Design tokens, reset, typography, shared utilities
   =========================================================== */

/* -------- Design tokens ------------------------------------ */
/* Brand palette - four colours total
   var(--accent)  brand orange (Triveni signature)
   #231F20  near-black ink
   #093556  deep navy (secondary / depth)
   #FFFFFF  pure white (paper)
*/
:root {
  /* LIGHT theme */
  --ink:          #231F20;
  --ink-80:       rgba(35, 31, 32, 0.80);
  --ink-60:       rgba(35, 31, 32, 0.58);
  --ink-40:       rgba(35, 31, 32, 0.42);
  --ink-12:       rgba(35, 31, 32, 0.14);
  --ink-06:       rgba(35, 31, 32, 0.07);

  --paper:        #FFFFFF;
  --paper-pure:   #FFFFFF;
  --paper-elev:   #F5F4F1;          /* derived soft surface */
  --paper-inv:    #231F20;          /* inverted surface (dark band) */

  --header-bg-scrolled: rgba(255, 255, 255, 0.92);
  --backdrop:     rgba(35, 31, 32, 0.48);

  --accent:       #F58220;          /* Triveni orange */
  --accent-ink:   #C56614;          /* darker orange for hover/text */
  --secondary:    #093556;          /* deep navy */
  --secondary-80: rgba(9, 53, 86, 0.85);

  /* Spacing - 8px scale */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  16px;
  --s-4:  24px;
  --s-5:  32px;
  --s-6:  48px;
  --s-7:  64px;
  --s-8:  96px;
  --s-9:  128px;

  /* Type */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Raleway', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* ---- 4-size type scale ----
     XS = micro-copy   · 11px (eyebrows, footer legal, utility bar)
     S  = nav, fine    · 13px
     M  = body, links  · 16px
     L  = headlines    · 24px (section + page headings; hero stays 35) */
  --fs-xs:      11px;
  --fs-s:       13px;
  --fs-m:       16px;
  --fs-l:       24px;

  /* Legacy aliases now map onto the 4-size scale. */
  --fs-eyebrow: var(--fs-xs);
  --fs-nav:     var(--fs-s);
  --fs-body:    var(--fs-m);
  --fs-lead:    var(--fs-m);
  --fs-h3:      var(--fs-l);
  --fs-h2:      var(--fs-l);
  --fs-h1:      var(--fs-l);

  --ls-eyebrow: 0.18em;
  --ls-nav:     0.02em;

  /* Layout */
  --container:  1320px;
  --gutter:     32px;

  --header-h:     76px;
  --header-h-sm:  60px;

  /* Motion */
  --ease-out:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io:    cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:   180ms;
  --dur-base:   280ms;
  --dur-slow:   520ms;
}

/* -------- Dark theme tokens -------------------------------- */
:root[data-theme="dark"] {
  --ink:          #FFFFFF;
  --ink-80:       rgba(255, 255, 255, 0.84);
  --ink-60:       rgba(255, 255, 255, 0.62);
  --ink-40:       rgba(255, 255, 255, 0.42);
  --ink-12:       rgba(255, 255, 255, 0.16);
  --ink-06:       rgba(255, 255, 255, 0.08);

  --paper:        #231F20;
  --paper-pure:   #2C2826;
  --paper-elev:   #2A2624;
  --paper-inv:    #FFFFFF;

  --header-bg-scrolled: rgba(35, 31, 32, 0.88);
  --backdrop:     rgba(0, 0, 0, 0.6);

  --accent:       #F58220;          /* brand orange (same - pops on dark) */
  --accent-ink:   #F7A25C;
  --secondary:    #1B5A90;          /* lifted navy for dark bg contrast */
  --secondary-80: rgba(27, 90, 144, 0.85);
}

/* -------- Reset -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}

img, svg { display: block; max-width: 100%; height: auto; }
/* High-quality downscaling baseline for photos. Avoids the edge 'lines'/shimmer
   seen on Windows software rendering; -webkit-optimize-contrast must NOT be used
   on photographic images. */
img { image-rendering: auto; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* -------- Shared utilities --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-nav);
  font-weight: 500;
  letter-spacing: var(--ls-nav);
  padding: 10px 18px;
  border: 1px solid var(--ink);
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--primary:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.btn--block {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* -------- Placeholder sections (temporary) ----------------- */
.section-placeholder {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-8) var(--gutter);
  text-align: center;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-elev) 100%);
  transition: background var(--dur-base) var(--ease-out);
}

.section-placeholder--alt {
  background: var(--paper-inv);
  color: var(--paper);
}

.section-placeholder__eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  font-size: var(--fs-eyebrow);
  color: var(--ink-60);
}

.section-placeholder__title {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* =========================================================
   MOBILE - section headline base size (mobile.css fine-tunes)
   ========================================================= */
@media (max-width: 767px) {
  .positioning__title,
  .stats__headline,
  .industries__title,
  .edge__title,
  .aftermarket__title,
  .engineering__title,
  .prediction__title,
  .defence__title,
  .global__title,
  .proof__title,
  .connect__title {
    font-size: 26px;
  }
}

.section-placeholder__note {
  color: var(--ink-60);
  font-size: var(--fs-nav);
}
