/* Giant Engines — Engine Room design system v2 (palette sampled from the real logo) */

:root {
  --canvas: #16181c;
  --surface: #1f2228;
  --raised: #282c34;
  --hairline: #343943;
  --ink: #f4f2ee;          /* warm white from logo highlight */
  --body: #b9bec8;
  --muted: #8a919e;
  --safety: #f68628;       /* exact logo orange */
  --safety-hover: #ff9a42;
  --safety-ink: #1a0f04;
  --steel: #4f4f4f;        /* logo letter gray */
  --danger: #d64545;
  --ok: #3fae5a;
  --whatsapp: #25d366;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --shell: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.15; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

/* Per-language body fonts */
html.lang-ar body, html.lang-ur body { font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; line-height: 1.8; }
html.lang-hi body { font-family: "IBM Plex Sans Devanagari", "IBM Plex Sans", system-ui, sans-serif; line-height: 1.75; }
html.lang-bn body { font-family: "Noto Sans Bengali", "IBM Plex Sans", system-ui, sans-serif; line-height: 1.75; }
html.lang-zh body { font-family: "Noto Sans SC", "IBM Plex Sans", system-ui, sans-serif; line-height: 1.7; }

/* Display type: uppercase+tracking for Latin-script languages only */
.display {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.12;
  text-wrap: balance;
}
html.lang-ar .display, html.lang-ur .display { font-family: "IBM Plex Sans Arabic", sans-serif; line-height: 1.3; }
html.lang-hi .display { font-family: "IBM Plex Sans Devanagari", sans-serif; line-height: 1.3; }
html.lang-bn .display { font-family: "Noto Sans Bengali", sans-serif; line-height: 1.3; }
html.lang-zh .display { font-family: "Noto Sans SC", sans-serif; line-height: 1.3; }
html.lang-en .display, html.lang-fil .display, html.lang-sw .display {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
}
.display-xl { font-size: clamp(2.2rem, 6vw, 4.2rem); }
.display-lg { font-size: clamp(1.8rem, 4.5vw, 3rem); }
.display-md { font-size: clamp(1.4rem, 3vw, 2rem); }

.label-caps { font-weight: 700; font-size: 0.8125rem; }
html.lang-en .label-caps, html.lang-fil .label-caps, html.lang-sw .label-caps {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .shell { padding-inline: 32px; } }

.ltr-data { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- Signature elements ---------- */
.hazard-stripe {
  height: 6px;
  background: repeating-linear-gradient(45deg, var(--safety) 0 14px, var(--canvas) 14px 28px);
  background-size: 40px 100%;
}
html.js .hazard-live { animation: hazard-drift 1.2s linear infinite paused; }
html.js .anim-on .hazard-live, html.js .hazard-live.anim-on { animation-play-state: running; }
@keyframes hazard-drift { to { background-position: 40px 0; } }

.eng-grid {
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}

.corner-tick { position: relative; }
.corner-tick::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  width: 12px; height: 12px;
  border-block-end: 2px solid var(--safety);
  border-inline-end: 2px solid var(--safety);
  opacity: 0;
  transition: opacity 150ms var(--ease);
}
.corner-tick:hover::after, .corner-tick:focus-within::after { opacity: 1; }

.eyebrow { color: var(--safety); display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--safety); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; }
@media (min-width: 768px) { .header-row { min-height: 72px; gap: 16px; } }
.brand-logo { width: 86px; height: auto; border-radius: 6px; flex-shrink: 0; }
@media (min-width: 768px) { .brand-logo { width: 120px; } }
@media (max-width: 480px) {
  .lang-btn { padding: 0 10px; height: 40px; }
  .lang-btn > span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
  .nav-burger { width: 40px; height: 40px; }
}
.main-nav { display: none; gap: 22px; }
@media (min-width: 1100px) { .main-nav { display: flex; } }
.nav-link { color: var(--body); padding-block: 6px; border-bottom: 2px solid transparent; transition: color 150ms var(--ease); }
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); border-color: var(--safety); }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* Single language button + full menu */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 12px;
  border: 1px solid var(--hairline);
  font-size: 0.85rem; font-weight: 600;
  color: var(--body);
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
  white-space: nowrap;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--safety); color: var(--ink); }
.lang-globe { width: 17px; height: 17px; color: var(--safety); flex-shrink: 0; }
.lang-caret { width: 12px; height: 12px; opacity: 0.7; }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60;
  min-width: 190px; max-height: 70vh; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--safety);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  padding: 6px;
  display: grid; gap: 2px;
}
.lang-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; font-size: 0.9rem; color: var(--body);
  transition: background 120ms var(--ease), color 120ms var(--ease);
}
.lang-menu-item > span:first-child { text-align: start; flex: 1; }
.lang-check { margin-inline-start: auto; }
.lang-menu-item:hover { background: var(--raised); color: var(--ink); }
.lang-menu-item.is-current { color: var(--safety); font-weight: 700; }
.lang-check { color: var(--safety); }

.nav-burger { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--hairline); color: var(--ink); }
.nav-burger svg { width: 20px; height: 20px; }
@media (min-width: 1100px) { .nav-burger { display: none; } }
.mobile-nav { border-top: 1px solid var(--hairline); background: var(--canvas); padding: 16px 20px 24px; }
.mobile-nav-link { display: block; padding: 14px 0; border-bottom: 1px solid var(--hairline); color: var(--body); }
.mobile-nav-link:hover { color: var(--ink); }
.mobile-nav-ctas { display: flex; gap: 10px; margin-top: 16px; }
.mobile-nav-ctas .btn { flex: 1; min-height: 46px; padding-inline: 12px; font-size: 0.75rem; }
/* !important: must beat .btn's display rule regardless of source order */
.hide-sm { display: none !important; } @media (min-width: 640px) { .hide-sm { display: inline-flex !important; } }
.hide-md { display: none !important; } @media (min-width: 768px) { .hide-md { display: inline-flex !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
  text-align: center;
}
.btn-primary { background: var(--safety); color: var(--safety-ink); }
.btn-primary:hover { background: var(--safety-hover); }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { border-color: var(--safety); color: var(--safety); }
.btn-emergency { background: var(--danger); color: var(--ink); }
.btn-emergency:hover { background: #e35555; }
.btn-wa { border: 1px solid var(--whatsapp); color: var(--whatsapp); }
.btn-wa:hover { background: color-mix(in srgb, var(--whatsapp) 10%, transparent); }

/* ---------- Sections / hero ---------- */
.section { padding-block: 64px; }
@media (min-width: 768px) { .section { padding-block: 96px; } }
.section-surface { background: var(--surface); }
.section-tight { padding-block: 40px; }

.hero { position: relative; border-bottom: 1px solid var(--hairline); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.42) saturate(0.85);   /* consistent dark grade */
}
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--canvas) 4%, transparent 55%); }
.hero-inner { position: relative; padding-block: 88px; max-width: 720px; }
@media (min-width: 768px) { .hero-inner { padding-block: 128px; } }
.hero-sub { font-size: 1.125rem; max-width: 560px; margin-top: 22px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Signature: live schematic laid over the hero photograph.
   Mobile: in-flow under the hero content (zero collision risk).
   Desktop: floats in the free space beside the text column. */
.hero-schematic {
  position: relative;
  margin: 36px auto 0;
  width: min(88vw, 420px);
  opacity: 0.3;
  pointer-events: none;
}
.hero-schematic .schematic { color: color-mix(in srgb, var(--ink) 72%, transparent); }
@media (min-width: 1100px) {
  .hero-schematic {
    position: absolute;
    top: 50%;
    transform: translateY(-54%);
    inset-inline-end: 4vw;
    width: min(38vw, 560px);
    margin: 0;
    opacity: 0.34;
  }
}
@media (max-width: 1099px) {
  .hero-schematic { display: block; }
  .hero .shell + .hero-schematic { padding-inline: 20px; }
}

/* Photo cards & grades */
.photo-frame { position: relative; overflow: hidden; background: var(--surface); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.72) saturate(0.9); transition: transform 400ms var(--ease); }
.photo-frame:hover img { transform: scale(1.04); }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; } @media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-4 { grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline); }
@media (min-width: 900px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--surface); padding: 26px; display: flex; flex-direction: column; }
.card:hover { background: var(--raised); }
.card h3, .card h2 { font-size: 1.15rem; margin-top: 4px; }
.card .card-body { flex: 1; font-size: 0.925rem; margin-top: 10px; }
.card-link-row { margin-top: 18px; color: var(--safety); display: inline-flex; align-items: center; gap: 6px; }
.card-photo { aspect-ratio: 16 / 9; margin: -26px -26px 18px; }
html[dir="rtl"] .chev { transform: scaleX(-1); }

.spec-cell { background: var(--surface); padding: 24px; }
.spec-value {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700; font-size: 1.7rem; color: var(--safety);
  font-variant-numeric: tabular-nums;
}
.spec-label { margin-top: 8px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }

.num-badge {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700; font-size: 1.5rem; color: var(--safety);
  font-variant-numeric: tabular-nums;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 400; color: var(--body); }
.field .req { color: var(--safety); }
.input, textarea.input, select.input {
  width: 100%; min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink);
  padding: 12px 16px;
  transition: border-color 150ms var(--ease);
  font: inherit;
}
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { outline: none; border-color: var(--safety); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.form-error { border: 1px solid var(--danger); background: var(--surface); color: var(--danger); padding: 14px 16px; font-size: 0.9rem; margin-bottom: 16px; }
.form-success { border: 1px solid var(--ok); background: var(--surface); padding: 28px; }
.form-success strong { color: var(--ok); font-size: 1.1rem; display: block; margin-bottom: 8px; }
.radio-tile { display: flex; align-items: center; gap: 12px; border: 1px solid var(--hairline); padding: 14px 16px; cursor: pointer; transition: border-color 150ms var(--ease); }
.radio-tile:hover { border-color: var(--muted); }
.radio-tile.checked, .radio-tile:has(input:checked) { border-color: var(--safety); background: var(--surface); }
.radio-tile input { accent-color: var(--safety); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* RFQ steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 36px; }
.step { border-top: 4px solid var(--hairline); padding-top: 10px; color: var(--muted); font-size: 0.72rem; }
.step.done, .step.current { border-color: var(--safety); }
.step.current { color: var(--ink); }

/* FAQ */
.faq-item { border: 1px solid var(--hairline); background: var(--surface); margin-bottom: 10px; }
.faq-item[open] { border-color: var(--safety); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--safety); font-size: 1.2rem; transition: transform 150ms var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 20px 18px; font-size: 0.925rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 40px; }
.footer-grid { display: grid; gap: 36px; padding-block: 52px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; } }
.footer-logo { border-radius: 6px; margin-bottom: 14px; }
.footer-blurb { font-size: 0.9rem; }
.footer-cred { font-size: 0.75rem; color: var(--muted); margin-top: 12px; }
.footer-head { color: var(--ink); margin-bottom: 14px; }
.footer-list li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-list a:hover { color: var(--safety); }
.footer-muted { color: var(--muted); }
.footer-email { word-break: break-all; }
.footer-bottom { border-top: 1px solid var(--hairline); padding-block: 18px; font-size: 0.78rem; color: var(--muted); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--whatsapp); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 150ms var(--ease);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 28px; height: 28px; }

/* Mobile action bar: the core action is never more than one thumb away.
   Desktop keeps the floating WhatsApp button instead. */
.action-bar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 55;
  display: grid; grid-template-columns: 1fr 1fr 1.4fr;
  border-top: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.action-bar-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; font-size: 0.78rem; font-weight: 700;
}
.action-bar-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.action-call { color: var(--ink); }
.action-wa { color: var(--whatsapp); border-inline: 1px solid var(--hairline); }
.action-rfq { background: var(--safety); color: var(--safety-ink); }
@media (min-width: 768px) {
  .action-bar { display: none; }
}
@media (max-width: 767px) {
  body { padding-bottom: calc(57px + env(safe-area-inset-bottom, 0px)); }
  .wa-float { display: none; }
}

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 100;
  background: var(--safety); color: var(--safety-ink); padding: 12px 18px;
}
.skip-link:focus { inset-inline-start: 8px; }

/* ---------- Schematics (decorative, currentColor line art) ---------- */
.schematic { color: var(--hairline); }
.schematic .accent { stroke: var(--safety); }
html.js .anim-piston { animation: piston-stroke 1.6s ease-in-out infinite paused; }
html.js .anim-crank { animation: crank-turn 1.6s linear infinite paused; transform-box: fill-box; transform-origin: center; }
html.js .anim-on .anim-piston, html.js .anim-on .anim-crank { animation-play-state: running; }
@keyframes piston-stroke { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(26px); } }
@keyframes crank-turn { to { transform: rotate(360deg); } }

/* ---------- Motion (JS-gated: content NEVER hidden without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms var(--ease), transform 500ms var(--ease);
    transition-delay: var(--rd, 0ms);
  }
  html.js [data-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

::selection { background: var(--safety); color: var(--safety-ink); }

/* Utility */
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; }
.max-w-xl { max-width: 620px; } .max-w-2xl { max-width: 720px; }
.muted { color: var(--muted); }
.text-sm { font-size: 0.9rem; }
.center { text-align: center; }
.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 14px; }
.honest-note { display: inline-block; border: 1px solid var(--hairline); background: var(--surface); padding: 10px 16px; font-size: 0.78rem; color: var(--muted); }
.show-lg { display: none !important; }
@media (min-width: 1024px) { .show-lg { display: block !important; } }
.card-icon { width: 56px; height: 56px; margin-bottom: 14px; color: var(--muted); }
.card:hover .card-icon { color: var(--body); }
.why-engine { width: 100%; max-width: 520px; margin-inline: auto; }
