/* ============================================================
   BALAJI METAL INDUSTRIES — Design System (Phase 1)
   Tokens · Reset · Base · Utilities
   ============================================================ */

:root {
  /* ---- Brand palette ---- */
  --navy-950: #0a1120;
  --navy-900: #0e1829;
  --navy-800: #14243c;
  --navy-700: #1d3350;
  --steel-600: #3d4c63;
  --steel-500: #55677f;
  --steel-300: #9aa7ba;
  --steel-200: #c3ccd8;
  --paper: #f6f7f9;
  --white: #ffffff;
  --off-white: #f2f4f7;

  /* ---- Accent: industrial orange / warm amber ---- */
  --accent: #f2661a;
  --accent-strong: #d9530c;
  --accent-soft: rgba(242, 102, 26, 0.12);
  --amber: #f5a623;

  /* ---- Text ---- */
  --text-on-dark: #f4f6f9;
  --text-muted-dark: #9aa7ba;
  --text-on-light: #101c2e;
  --text-muted-light: #55677f;

  /* ---- Lines ---- */
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: #dde3ec;

  /* ---- Type ---- */
  --font-display: "Archivo", "Inter", system-ui, -apple-system, "Segoe UI",
    Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-body: 1.65;

  /* ---- Spacing / layout ---- */
  --container: 1200px;
  --container-wide: 1360px;
  --gutter: 24px;
  --section-y: clamp(64px, 8vw, 112px);
  --radius: 4px; /* technical, minimal rounding per brief */
  --radius-sm: 2px;

  /* ---- Motion (fast, premium, reduced-motion safe) ---- */
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
  --dur-1: 160ms;
  --dur-2: 280ms;
  --dur-3: 480ms;

  /* ---- Shadows ---- */
  --shadow-1: 0 1px 2px rgba(10, 17, 32, 0.18);
  --shadow-2: 0 12px 32px rgba(10, 17, 32, 0.28);
}

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

* {
  margin: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--leading-body);
  color: var(--text-on-light);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

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

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

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

/* ---- Selection ---- */
::selection {
  background: var(--accent);
  color: #fff;
}

/* ---- Layout helpers ---- */
.container {
  width: min(var(--container), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.container--wide {
  width: min(var(--container-wide), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.section--dark {
  background: var(--navy-950);
  color: var(--text-on-dark);
}

.section--paper {
  background: var(--paper);
}

/* ---- Eyebrow → heading → paragraph → CTA hierarchy ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
  flex: none;
}

.h-display,
.h-section {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(2.4rem, 5.2vw + 1rem, 4.6rem);
  text-transform: uppercase;
}

.h-section {
  font-size: clamp(1.7rem, 2.6vw + 1rem, 2.75rem);
  text-transform: uppercase;
}

.lead {
  font-size: clamp(1rem, 0.4vw + 0.95rem, 1.125rem);
  max-width: 62ch;
}

.muted {
  color: var(--text-muted-light);
}

.section--dark .muted {
  color: var(--text-muted-dark);
}

/* ---- Skip link (a11y) ---- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: top var(--dur-1) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---- Reveal on scroll (progressive enhancement) ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--dur-3) var(--ease),
    transform var(--dur-3) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Visually hidden ---- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* No-JS safety net: content must never stay hidden */
@media (scripting: none) {
  .reveal,
  .img-reveal {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}
