/* ==========================================================================
   PRAKASH WIRES — base.css
   Design tokens, font-faces, reset, and small global utility classes only.
   Section-specific styling lives in its own file under /css/. Do not add
   section rules here — see header.css, hero.css, products.css, etc.
   ========================================================================== */

/* ---- Self-hosted fonts ------------------------------------------------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ------------------------------------------------------
   Palette lifted from the client's own brochure (sampled directly from the
   cover + interior spec pages), not a generic template palette:
   - Indigo  = the brochure's deep purple corporate ground
   - Ember   = the brochure's signature amber/orange section-header colour
   - Flame   = the red-orange of the "PRAKASH" wordmark, used sparingly
--------------------------------------------------------------------------- */
:root {
  /* Brand colour */
  --ink-900: #17151c;
  --ink-700: #322d3d;
  --ink-600: #4a4655;
  --steel-50: #f5f4f7;
  --steel-100: #eae8ef;
  --steel-200: #dad7e3;
  --steel-400: #a8a4b6;
  --steel-600: #6e6b7a;
  --paper: #ffffff;

  --indigo-950: #1c1230;
  --indigo-900: #241736;
  --indigo-800: #331f5c;
  --indigo-700: #4a3280;
  --indigo-600: #5c3f9c;
  --indigo-500: #7256b0;
  --indigo-200: #e2d9f3;
  --indigo-100: #efe9f9;

  --ember-700: #b96200;
  --ember-600: #e67e00;
  --ember-500: #f5a623;
  --ember-400: #f9bd52;
  --ember-300: #ffd98a;
  --ember-100: #fef2dd;

  --flame-600: #c42d10;
  --flame-500: #df3a1c;
  --flame-400: #ea5a3a;

  --success-500: #2f9e5b;

  /* Gradients (reused across hero / dark sections / buttons) */
  --grad-indigo: linear-gradient(135deg, var(--indigo-950) 0%, var(--indigo-700) 100%);
  --grad-ember: linear-gradient(120deg, var(--flame-500) 0%, var(--ember-500) 55%, var(--ember-400) 100%);

  /* Type */
  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.5rem;
  --sp-8: 3rem;
  --sp-9: 4rem;
  --sp-10: 5rem;
  --sp-12: 7rem;

  /* Layout */
  --container-w: 1240px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 2px 8px rgba(23, 21, 28, 0.08);
  --shadow-md: 0 12px 32px rgba(28, 18, 48, 0.14);
  --shadow-lg: 0 24px 64px rgba(28, 18, 48, 0.22);
  --shadow-ember: 0 10px 28px rgba(223, 58, 28, 0.35);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

svg {
  display: block;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ember-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Global utility classes ---------------------------------------------
   Kept intentionally small — layout/utility classes only, no section rules.
--------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Anchor-nav targets sit below the sticky header + utility bar */
section[id],
main [id] {
  scroll-margin-top: 128px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--flame-500);
}

.eyebrow::before {
  content: "";
  width: 1.5em;
  height: 2px;
  background: currentColor;
  display: inline-block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink-900);
  color: #fff;
  padding: 0.75em 1.25em;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Buttons — shared shape/behaviour; colour variants defined per usage */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.95em 1.7em;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color .25s var(--ease);
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--grad-ember);
  color: #2a0f04;
  box-shadow: var(--shadow-ember);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(223, 58, 28, 0.4);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-ghost-dark {
  background: transparent;
  border-color: rgba(23, 21, 28, 0.18);
  color: var(--ink-900);
}
.btn-ghost-dark:hover {
  border-color: var(--ink-900);
  background: var(--steel-50);
}

.btn-sm {
  padding: 0.65em 1.3em;
  font-size: 0.85rem;
}

.btn svg {
  width: 1.1em;
  height: 1.1em;
}

/* Reveal-on-scroll primitive used across sections (JS toggles .is-visible).
   Progressive enhancement on purpose: elements are fully visible by default
   so content can never get stuck hidden (no JS, a JS error, an observer
   that never fires). Only once `js` is confirmed on <html> — set by the
   inline snippet in <head>, before first paint — does .reveal start out
   dimmed, ready for main.js to fade it in as it scrolls into view. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
