/* ============================================================
   RAJKOT MACHINE WORKS — Design System
   Modern engineering / industrial heritage
   ============================================================ */

/* Fonts loaded via <link rel="preconnect"> + <link rel="stylesheet"> in each page <head> for faster, non-blocking load. */

:root {
  /* --- Neutrals (steel-tinged, warm paper) --- */
  --ink:        oklch(0.22 0.014 250);   /* near-black steel charcoal */
  --ink-soft:   oklch(0.34 0.012 250);
  --steel:      oklch(0.52 0.012 250);   /* mid grey text */
  --steel-2:    oklch(0.66 0.010 250);
  --line:       oklch(0.88 0.006 250);   /* hairline borders */
  --line-soft:  oklch(0.93 0.005 250);
  --paper:      oklch(0.975 0.004 85);   /* warm off-white */
  --paper-2:    oklch(0.945 0.005 85);   /* slightly deeper panel */
  --white:      oklch(0.995 0.002 85);

  /* --- Accent: molten / safety orange --- */
  --flame:      oklch(0.66 0.19 47);     /* primary accent */
  --flame-deep: oklch(0.57 0.17 45);
  --flame-tint: oklch(0.95 0.04 60);

  /* --- Type --- */
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* --- Rhythm --- */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --shadow: 0 1px 2px oklch(0.22 0.014 250 / 0.06), 0 8px 28px oklch(0.22 0.014 250 / 0.07);
  --shadow-lg: 0 2px 4px oklch(0.22 0.014 250 / 0.08), 0 24px 60px oklch(0.22 0.014 250 / 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* --- Layout helpers --- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* --- Type scale --- */
.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  text-wrap: balance;
}
.h1 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; font-size: clamp(2.1rem, 4.6vw, 3.6rem); text-wrap: balance; }
.h2 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -0.018em; font-size: clamp(1.7rem, 3.2vw, 2.6rem); text-wrap: balance; }
.h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--ink-soft); line-height: 1.5; text-wrap: pretty; }
.muted { color: var(--steel); }

/* --- Eyebrow: blueprint-style mono label with index --- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--flame-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--flame);
  display: inline-block;
}
.eyebrow--plain::before { display: none; }
.eyebrow--light { color: var(--flame); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.95em 1.5em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  line-height: 1;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--flame); color: var(--white); }
.btn--primary:hover { background: var(--flame-deep); transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--ink-soft); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--white); transform: translateY(-2px); }
.btn--arrow:hover svg { transform: translateX(3px); }
.btn--arrow svg { transition: transform 0.2s ease; }

/* --- Header / nav --- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.975 0.004 85 / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 42px; height: 42px;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  flex: none;
  position: relative;
  overflow: hidden;
}
.brand__mark::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 4px; background: var(--flame);
}
.brand > span { display: flex; flex-direction: column; }
.brand__name { display: block; white-space: nowrap; font-family: var(--display); font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; line-height: 1.05; }
.brand__sub { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 13px;
  position: relative;
  transition: color 0.18s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--flame-deep); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px; background: var(--flame);
}
.head-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* --- Footer (light, matches header; logo shows in full colour) --- */
.site-foot { background: var(--paper); color: var(--ink-soft); padding-block: clamp(56px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.site-foot a { color: var(--steel); transition: color 0.18s ease; }
.site-foot a:hover { color: var(--ink); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.foot-col h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel); margin-bottom: 16px; font-weight: 500; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 0.95rem; }
.foot-col .muted { color: var(--steel); }
/* dark bottom bar — full width */
.foot-bar { background: var(--ink); margin-top: clamp(40px, 5vw, 56px); }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 22px 104px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--steel-2); text-transform: uppercase; }
.foot-bottom a { color: var(--steel-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: oklch(0.5 0.012 250 / 0.6); }
.foot-bottom a:hover { color: var(--flame); text-decoration-color: var(--flame); }

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--steel-2); }

/* --- Image slot styling --- */
image-slot {
  display: block !important;
  height: auto !important;
  min-width: 0;
  --is-bg: var(--paper-2);
  background:
    repeating-linear-gradient(135deg, oklch(0.88 0.006 250) 0 1px, transparent 1px 11px),
    var(--paper-2);
  border: 1px solid var(--line);
  color: var(--steel);
  font-family: var(--mono) !important;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.slot-dark image-slot,
image-slot.on-dark {
  background:
    repeating-linear-gradient(135deg, oklch(0.32 0.012 250) 0 1px, transparent 1px 11px),
    oklch(0.27 0.013 250);
  border-color: oklch(0.36 0.012 250);
  color: var(--steel-2);
}

/* --- Blueprint grid background --- */
.blueprint {
  background-image:
    linear-gradient(oklch(0.5 0.01 250 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.5 0.01 250 / 0.06) 1px, transparent 1px);
  background-size: 30px 30px;
}
.blueprint-dark {
  background-image:
    linear-gradient(oklch(0.7 0.02 250 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.7 0.02 250 / 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* --- Tag / chip --- */
.chip {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.45em 0.8em; border: 1px solid var(--line); color: var(--ink-soft);
  background: var(--white);
}
.chip--flame { color: var(--flame-deep); border-color: oklch(0.66 0.19 47 / 0.4); background: var(--flame-tint); }

/* --- Spec list --- */
.spec { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.spec dt { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--steel); }
.spec dd { font-weight: 600; text-align: right; }

/* --- About heritage stats --- */
/* --- Industrial capability ticker --- */
.tick-band { background: var(--ink); border-block: 1px solid var(--ink); overflow: hidden; padding-block: 16px; }
.tick-track { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; animation: tickScroll 32s linear infinite; will-change: transform; }
.tick-band:hover .tick-track { animation-play-state: paused; }
.tick-track span { font-family: var(--mono); font-size: 0.86rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper); padding: 0 26px; }
.tick-track span::before { content: "◆"; color: var(--flame); margin-right: 26px; font-size: 0.7em; vertical-align: middle; }
@keyframes tickScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tick-track { animation: none; } }

/* --- Section heading block --- */
.sec-head { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.sec-head--center { margin-inline: auto; text-align: center; align-items: center; }

/* --- Inner page hero --- */
.page-hero { border-bottom: 1px solid var(--line); padding-block: clamp(40px, 6vw, 78px) clamp(36px, 5vw, 60px); }
.page-hero__inner { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; max-width: 900px; }
.crumbs { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); display: flex; gap: 8px; align-items: center; }
.crumbs a:hover { color: var(--flame-deep); }
.crumbs span { color: var(--line); }
.page-hero .lead { max-width: 720px; }

/* --- Prose --- */
.prose p { margin-bottom: 1.1em; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }

/* --- Generic responsive 2-col split --- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--media-first .split__media { order: -1; }
.stack { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split__media { order: -1; } }

/* --- Dark section --- */
.on-dark { background: var(--ink); color: var(--paper); }
.on-dark .lead { color: var(--steel-2); }
.on-dark .muted { color: var(--steel-2); }

/* --- WhatsApp float --- */
.wa-float {
  position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px);
  z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: #1faf54;
  color: #fff;
  padding: 13px 18px 13px 15px;
  border-radius: 999px;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.03em;
  box-shadow: 0 8px 30px oklch(0.5 0.13 150 / 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wa-float:hover { transform: translateY(-2px) scale(1.02); color: #fff; }
.wa-float svg { width: 22px; height: 22px; flex: none; }
.wa-float__txt { display: inline; }

/* --- Reveal: kept as a harmless hook; content is always visible.
   (Entrance animations are intentionally avoided — backgrounded preview
   tabs throttle CSS animation/transition and would strand content hidden.) --- */
.reveal { opacity: 1; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav, .head-cta .btn { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
    background: var(--ink); color: var(--paper); border: none; padding: 11px 15px; cursor: pointer;
  }
  .wa-float__txt { display: none; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* --- Mobile nav drawer --- */
.mnav { position: fixed; inset: 0; z-index: 100; display: none; }
.mnav.open { display: block; }
.mnav__scrim { position: absolute; inset: 0; background: oklch(0.22 0.014 250 / 0.5); backdrop-filter: blur(2px); }
.mnav__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(82vw, 360px); background: var(--paper); padding: 24px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-lg); }
.mnav__panel a { font-family: var(--display); font-weight: 700; font-size: 1.4rem; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.mnav__close { align-self: flex-end; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink); margin-bottom: 8px; }

/* ============================================================
   EDITORIAL / STUDIO LAYER  (re-art-direction)
   ============================================================ */

/* ---- AUTO SLIDESHOW ---- */
.slideshow { position: absolute; inset: 0; overflow: hidden; }
.slideshow .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; will-change: opacity; }
.slideshow .slide.is-active { opacity: 1; }
.ss-dots { position: absolute; left: 16px; bottom: 14px; z-index: 4; display: flex; gap: 7px; }
.ss-dots button { width: 22px; height: 3px; border: none; padding: 0; background: oklch(0.97 0.004 85 / 0.45); cursor: pointer; transition: background 0.2s ease; }
.ss-dots button.is-on { background: var(--flame); width: 30px; }

/* re-added heritage stats */
.heritage-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: oklch(0.4 0.012 250 / 0.5); border: 1px solid oklch(0.4 0.012 250 / 0.5); }
.heritage-stats > div { background: var(--ink); padding: 28px 24px; }
.heritage-stats dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-2); margin-bottom: 10px; }
.heritage-stats dd { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.02em; color: var(--paper); }
@media (max-width: 720px) { .heritage-stats { grid-template-columns: 1fr 1fr; } }

/* Full-bleed escape from .wrap */
.bleed { width: 100%; }

/* Mono annotation / engineering caption */
.annot { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); }
.annot--light { color: var(--steel-2); }
.annot--flame { color: var(--flame); }

/* Oversized editorial index numeral */
.bignum { font-family: var(--display); font-weight: 800; line-height: 0.8; letter-spacing: -0.04em; font-size: clamp(3.2rem, 9vw, 8rem); }
.bignum--outline { color: transparent; -webkit-text-stroke: 1.5px var(--steel-2); }

/* Corner registration ticks on a framed block */
.ticked { position: relative; }
.ticked::before, .ticked::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; }
.ticked::before { top: 0; left: 0; border-top: 2px solid var(--flame); border-left: 2px solid var(--flame); }
.ticked::after { bottom: 0; right: 0; border-bottom: 2px solid var(--flame); border-right: 2px solid var(--flame); }

/* ---- BEFORE / AFTER SLIDER ---- */
.ba { position: relative; overflow: hidden; user-select: none; touch-action: pan-y; background: var(--ink); cursor: ew-resize; --p: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba__before { z-index: 2; clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.ba__tag { position: absolute; bottom: 14px; z-index: 4; font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 11px; color: var(--paper); background: oklch(0.22 0.014 250 / 0.78); backdrop-filter: blur(3px); }
.ba__tag--before { left: 14px; z-index: 3; }
.ba__tag--after { right: 14px; }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; background: var(--flame); z-index: 5; transform: translateX(-1px); pointer-events: none; }
.ba__knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: var(--flame); display: grid; place-items: center; box-shadow: 0 4px 18px oklch(0.22 0.014 250 / 0.45); }
.ba__knob svg { width: 22px; height: 22px; color: var(--white); }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 6; }

/* ---- SPINNING FLYWHEEL MOTIF ---- */
.flywheel { display: inline-block; animation: spin 9s linear infinite; transform-origin: 50% 50%; }
.flywheel--fast { animation-duration: 4.5s; }
.flywheel--rev { animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .flywheel { animation: none; } }

/* ---- Editorial machine row ---- */
.mrow { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0; align-items: stretch; border-top: 1px solid var(--line); }
.mrow__media { position: relative; min-height: 420px; background: var(--paper-2); overflow: hidden; }
.mrow__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mrow__body { padding: clamp(28px, 4vw, 60px); display: flex; flex-direction: column; gap: 18px; justify-content: center; align-items: flex-start; }
.mrow--flip .mrow__media { order: 2; }
.mrow__idx { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--flame-deep); }
@media (max-width: 820px) {
  .mrow, .mrow--flip { grid-template-columns: 1fr; }
  .mrow--flip .mrow__media { order: 0; }
  .mrow__media { min-height: 300px; }
}

/* ---- Brand logo ---- */
.brand__logo { height: 42px; width: auto; display: block; }
.brand__logo--foot { height: 50px; margin-bottom: 18px; }
@media (max-width: 560px) { .brand__logo { height: 34px; } }

/* ---- Footer map (light footer) ---- */
.foot-map { margin-top: 44px; display: grid; grid-template-columns: 0.85fr 1.15fr; border: 1px solid var(--line); }
.foot-map__info { padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; justify-content: center; background: var(--paper-2); transition: background 0.2s ease; }
.foot-map__info:hover { background: var(--white); }
.foot-map__info strong { color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.foot-map__open { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--flame-deep); display: inline-flex; align-items: center; gap: 6px; }
.foot-map__frame { position: relative; min-height: 230px; background: var(--paper-2); }
.foot-map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(0.3) contrast(1.03); }
@media (max-width: 700px) { .foot-map { grid-template-columns: 1fr; } .foot-map__frame { min-height: 200px; } }

