/* =====================================================================
   RBA Group — design system (Stripe × A24)
   Tokens, typography, layout primitives, components. Plain CSS that
   complements the utility classes loaded from Tailwind's CDN.
   ===================================================================== */

:root {
  /* Light mode (Stripe-derived) */
  --bg-base: #ffffff;
  --bg-alt: #f6f9fc;
  --bg-surface: #ebeef3;
  --text-strong: #0a2540;
  --text-muted: #425466;
  --border: #e3e8ee;
  --border-strong: #cdd5df;

  /* Accents */
  --cta: #635bff;
  --cta-hover: #5048e5;
  --cream: #f4ede4;
  --pop-red: #d9351c;

  /* Dark mode (A24-derived) */
  --ink-base: #000000;
  --ink-alt: #0a0a0a;

  /* Typography */
  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1180px;
  --gutter: 24px;

  /* Spacing scale (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-12: 48px;
  --s-16: 64px;
  --s-24: 96px;
  --s-36: 144px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-pill: 999px;

  /* Shadows (popovers only — system is fundamentally flat) */
  --shadow-pop: 0 4px 12px rgba(10, 37, 64, 0.08);
  --shadow-pop-dark: 0 12px 32px rgba(0, 0, 0, 0.7);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-strong);
  background: var(--bg-base);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--s-24); }
.section-sm { padding-block: var(--s-16); }
.section--alt { background: var(--bg-alt); }
.stack > * + * { margin-block-start: var(--s-6); }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.75rem, 6vw, 6rem); line-height: 1.02; letter-spacing: -0.025em; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 1.85rem); line-height: 1.15; letter-spacing: -0.015em; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cta);
}
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pop { color: var(--pop-red); } /* film red — single use per viewport */

/* ---------- Hero plate (A24-style full-bleed black) ---------- */
.hero {
  position: relative;
  background: var(--ink-base);
  color: #fff;
  overflow: hidden;
}
.hero__grain::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 3px 3px;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(64px, 12vh, 160px); }
.hero .display { font-size: clamp(2.75rem, 9vw, 7rem); }
.hero .lead { color: rgba(255,255,255,0.72); }
.hero__accent { color: var(--cream); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cta); color: #fff; }
.btn--primary:hover { background: var(--cta-hover); }
.btn--secondary { background: #fff; color: var(--text-strong); border-color: var(--border-strong); }
.btn--secondary:hover { border-color: var(--text-strong); }
.btn--ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.32); }
.btn--ghost-dark:hover { border-color: #fff; }
.btn--lg { padding: 14px 22px; font-size: 16px; }
/* Download affordance: a small download glyph before the label. Rendered
   via a pseudo-element so it survives i18n text replacement. */
.btn--download::before {
  content: "";
  width: 18px; height: 18px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v12m0 0 4-4m-4 4-4-4M5 21h14'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v12m0 0 4-4m-4 4-4-4M5 21h14'/></svg>") center / contain no-repeat;
}

/* ---------- Card ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-6);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--border-strong); }
.card--flat { box-shadow: none; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; margin: 0 0 8px; }
.card__link {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  text-decoration: none;
}
.card__link:hover { color: var(--cta); }
.card__block { display: block; }
.card__cat {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cta);
  margin-bottom: 12px;
}

/* ---------- Inputs ---------- */
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font: inherit;
  color: var(--text-strong);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--cta);
  box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.25);
}
.textarea { min-height: 132px; resize: vertical; }
.field-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text-strong); }
.search { position: relative; }
.search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search .input { padding-left: 42px; font-size: 17px; padding-block: 14px; }

/* ---------- Tag / chip ---------- */
.tag {
  display: inline-block;
  font-size: 12px; font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-surface);
  color: var(--text-strong);
  border: 1px solid transparent;
}
.tag--cta { background: rgba(99,91,255,0.10); color: var(--cta); }
.tag--outline { background: transparent; border-color: var(--border-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--text-strong); }
.brand__logo { height: 34px; width: auto; display: block; }
@media (max-width: 560px) { .brand__logo { height: 28px; } }
/* Footer variant: logo.png is dark navy, invert to white on the black footer */
.brand--footer .brand__logo { filter: brightness(0) invert(1); height: 36px; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--cta), #1f1b4d);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav__link { font-size: 14.5px; font-weight: 500; color: var(--text-muted); transition: color .15s ease; }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--text-strong); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--text-strong); }

/* ---------- Lang switcher ---------- */
.lang { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 2px; }
.lang button {
  border: 0; background: transparent; color: var(--text-muted);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  padding: 5px 9px; border-radius: var(--r-pill);
  transition: background-color .15s ease, color .15s ease;
}
.lang button[aria-pressed="true"] { background: var(--text-strong); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-base); color: rgba(255,255,255,0.72); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-block: 72px 40px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-block: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* ---------- Misc utility ---------- */
/* Minimal flexbox/grid utilities (replaces the Tailwind CDN we no longer ship).
   These are the only layout primitives the markup relies on. */
.flex { display: flex; }
.grid { display: grid; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.kbd { font-family: var(--font-mono); font-size: 12px; padding: 2px 6px; border-radius: 4px; background: var(--bg-surface); border: 1px solid var(--border); }
[x-cloak] { display: none !important; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.stat-number { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.5rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -0.02em; }
.bullet { display: flex; gap: 12px; align-items: flex-start; }
.bullet::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-top: 9px; border-radius: 50%; background: var(--cta); }

/* ---------- Responsive nav ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav--open {
    display: flex; position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 20px; box-shadow: var(--shadow-pop);
  }
  .nav--open .nav__link { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav--open .nav__cta { margin-top: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; padding-block: 48px 32px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: var(--s-16); }
}

/* ---------- Modal (quote + oil details) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 16px;
}
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 37, 64, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal__dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  padding: clamp(20px, 4vw, 32px);
}
.modal__dialog--wide { max-width: 600px; }
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: 0; color: var(--text-muted);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.modal__close:hover { background: var(--bg-surface); color: var(--text-strong); }
.modal__field-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0;
}
.modal__chip {
  margin-top: 16px; padding: 12px 14px;
  background: rgba(99,91,255,0.06);
  border: 1px solid rgba(99,91,255,0.18);
  border-radius: var(--r-sm);
  position: relative;
}
.modal__chip-clear {
  position: absolute; top: 8px; right: 10px;
  background: none; border: 0; cursor: pointer;
  font-size: 12px; color: var(--text-muted);
  text-decoration: underline;
}
.modal__chip-clear:hover { color: var(--text-strong); }
.modal__meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 16px;
}
.modal__oem-list {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.modal__specs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.modal__actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.modal__actions .btn { flex: 1; min-width: 160px; }
@media (max-width: 560px) {
  .modal__meta-grid, .modal__specs { grid-template-columns: 1fr; gap: 12px; }
  .modal__actions { flex-direction: column; }
  .modal__actions .btn { width: 100%; }
}

/* ---------- Industries page ---------- */
/* Section 1: expandable industry cards with product solutions */
.industries-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px;
}
.industry-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease;
}
.industry-card:hover { border-color: var(--border-strong); }
.industry-card--open { border-color: var(--cta); box-shadow: 0 4px 16px rgba(99,91,255,0.10); }
.industry-card__head {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; background: none; border: 0; cursor: pointer; text-align: left;
}
.industry-card__icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px;
  background: rgba(99,91,255,0.10); color: var(--cta);
  display: grid; place-items: center;
}
.industry-card__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.industry-card__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text-strong); }
.industry-card__name-en { font-size: 12px; color: var(--text-muted); }
.industry-card__meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.industry-card__chevron { color: var(--cta); font-size: 11px; }
.industry-card__body { padding: 0 20px 20px; }
.industry-card__desc { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.industry-card__products { display: flex; flex-direction: column; gap: 8px; }

/* product solution row */
.sol {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.sol__main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.sol__name { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.sol__spec { font-size: 12px; color: var(--text-muted); }
.sol__tag {
  flex-shrink: 0; font-size: 11px; font-weight: 500; white-space: nowrap;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(99,91,255,0.10); color: var(--cta);
}

/* Section 2: top customers */
.tc { border-top: 1px solid var(--border); padding-top: 36px; }
.tc:first-child { border-top: 0; padding-top: 0; }
.tc__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.tc__icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px;
  background: rgba(99,91,255,0.10); color: var(--cta);
  display: grid; place-items: center;
}
.tc__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
}
.tc__card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 18px; transition: border-color .15s ease;
}
.tc__card:hover { border-color: var(--border-strong); }
.tc__name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.tc__desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }

/* ---------- Empty state + ask-manager form ---------- */
.empty-state {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: clamp(24px, 5vw, 56px);
}
.empty-state__head { text-align: center; max-width: 60ch; margin: 0 auto; }
.empty-state__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(99,91,255,0.10); color: var(--cta);
  display: grid; place-items: center; margin: 0 auto 20px;
}
.ask-form { max-width: 640px; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
.ask-form__row { display: flex; gap: 16px; flex-wrap: wrap; }
.ask-form__success {
  margin: 0; padding: 14px 16px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.30);
  border-radius: var(--r-sm);
  color: #15803d; font-size: 14px;
}
@media (max-width: 560px) { .ask-form__row { flex-direction: column; } }

/* ---------- Print: keep contacts legible ---------- */
@media print {
  .site-header, .site-footer, .btn { display: none !important; }
  body { color: #000; }
}
