/* ============================================================
   TORQUE LUBRICANTS — main stylesheet
   Tokens and rules per DESIGN_SYSTEM.md
   ============================================================ */

:root {
  --primary: #F36C1A;
  --primary-dk: #D55A0E;
  --secondary: #003268;
  --background: #003268;
  --surface: #0B3E70;
  --paper: #F5F6F7;
  --surface-lt: #FFFFFF;
  --text: #EDEFF2;
  --text-dk: #003268;
  --muted: #A9BBD1;
  --muted-dk: #4C6483;
  --border: #1B4A78;
  --border-lt: #E2E5E9;
  --wa: #25D366;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dk);
  background: var(--background);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 70ch; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 18px; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }

section { padding: clamp(56px, 9vw, 112px) 0; }

.dark { background: var(--background); color: var(--text); }
.dark-2 { background: var(--secondary); color: var(--text); }
.light { background: var(--paper); color: var(--text-dk); }
.light-2 { background: var(--surface-lt); color: var(--text-dk); }
.light-2 .muted { color: var(--muted-dk); }
.dark .muted, .dark-2 .muted { color: var(--muted); }
.light .muted { color: var(--muted-dk); }

.eyebrow {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.95rem; color: var(--primary); margin-bottom: 10px;
}
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 28px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none;
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  border-radius: 2px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--primary-dk); border-color: var(--primary-dk); transform: translateY(-1px); }
.btn-outline { background: transparent; color: inherit; border-color: currentColor; }
.btn-outline:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-wa { background: var(--wa); border-color: var(--wa); }
.btn-wa:hover { background: #1eb857; border-color: #1eb857; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 50, 104, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.header-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}
.logo { flex-shrink: 0; }
.logo img { height: 26px; width: auto; flex-shrink: 0; }
.main-nav { display: none; }
.nav-toggle {
  background: none; border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 2px; cursor: pointer; line-height: 0;
}
@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .main-nav { display: flex; align-items: center; gap: 4px; }
  .main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
  .main-nav a {
    display: block; padding: 10px 13px; text-decoration: none;
    font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--text);
  }
  .main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--primary); }
  .has-sub { position: relative; }
  .has-sub > .sub {
    display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
    background: var(--surface); border: 1px solid var(--border);
    list-style: none; margin: 0; padding: 8px 0;
  }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
  .sub a { font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; text-transform: none; letter-spacing: 0; }
  .header-cta { margin-left: 8px; min-height: 42px; padding: 8px 20px; }
}

/* Mobile drawer */
.drawer {
  display: none; position: fixed; inset: 68px 0 0 0; z-index: 99;
  background: var(--background); color: var(--text);
  overflow-y: auto; padding: 24px 20px 120px;
}
.drawer.open { display: block; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer > ul > li { border-bottom: 1px solid var(--border); }
.drawer a, .drawer .acc-btn {
  display: block; width: 100%; text-align: left; padding: 16px 4px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.drawer .sub { display: none; padding: 0 0 12px 16px; }
.drawer .sub.open { display: block; }
.drawer .sub a { font-family: var(--font-body); font-size: 1rem; font-weight: 500; text-transform: none; letter-spacing: 0; padding: 10px 4px; color: var(--muted); }
.drawer .btn { margin-top: 20px; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(243, 108, 26, 0.16), transparent 60%),
    linear-gradient(160deg, #001c3d 0%, var(--background) 65%);
  color: var(--text);
  padding: clamp(72px, 11vw, 150px) 0;
  border-bottom: 1px solid var(--border);
}
.hero.hero-photo {
  background:
    linear-gradient(100deg, var(--background) 0%, rgba(0,50,104,0.78) 32%, rgba(0,50,104,0.15) 60%, rgba(0,50,104,0.05) 100%),
    url("/assets/img/backgrounds/hero-4.jpg") center right / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.022) 0 2px, transparent 2px 90px);
}
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.hero-points li { display: flex; gap: 8px; align-items: center; }
.hero-points svg { color: var(--primary); flex: none; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-tight { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.cat-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 3px;
  padding: 26px 24px; text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.cat-card .icon { color: var(--primary); }
.cat-card h3 { margin: 0; }
.cat-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.cat-card .count { margin-top: auto; padding-top: 10px; font-size: 0.85rem; color: var(--primary); font-weight: 600; }

.prod-card {
  display: flex; flex-direction: column;
  background: var(--surface-lt); border: 1px solid var(--border-lt); border-radius: 3px;
  text-decoration: none; color: var(--text-dk); overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.prod-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 24, 29, 0.08); }
.prod-card .imgwrap { position: relative; aspect-ratio: 4 / 5; background: var(--paper); }
.prod-card .imgwrap img { width: 100%; height: 100%; object-fit: contain; }
.prod-card .badge { position: absolute; top: 12px; left: 12px; }
.prod-card .body { display: flex; flex-direction: column; gap: 4px; padding: 18px; flex: 1; }
.prod-card h3 { margin: 0; font-size: 1.3rem; }
.prod-card .meta { font-size: 0.85rem; color: var(--muted-dk); }
.prod-card .view { margin-top: auto; padding-top: 12px; color: var(--primary-dk); font-weight: 600; font-size: 0.9rem; }

.badge {
  display: inline-block; padding: 4px 10px;
  background: var(--primary); color: #fff; border-radius: 2px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-outline { background: transparent; color: var(--primary-dk); border: 1px solid var(--primary); }

/* ---------- Why Torque / feature list ---------- */
.feat { display: flex; flex-direction: column; gap: 10px; }
.feat .icon { color: var(--primary); }
.feat h3 { margin: 0; }
.feat p { margin: 0; font-size: 0.92rem; }

/* ---------- App cards ---------- */
.app-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 200px; padding: 22px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(180deg, #0d4372 0%, var(--surface) 100%);
  border: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.app-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.app-card .icon { position: absolute; top: 20px; left: 20px; color: var(--primary); opacity: 0.9; }
.app-card h3 { margin: 0 0 4px; }
.app-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* ---------- Spec table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-lt); border-radius: 3px; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 420px; background: var(--surface-lt); }
.spec-table th, .spec-table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--border-lt); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  width: 38%; font-family: var(--font-body); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-dk);
}
.spec-table td { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Product page ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }

.prod-hero { display: grid; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (min-width: 900px) { .prod-hero { grid-template-columns: minmax(280px, 420px) 1fr; } }
.prod-hero .imgpanel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 3px;
  padding: 28px; display: flex; align-items: center; justify-content: center;
}
.prod-hero .imgpanel img { max-height: 420px; object-fit: contain; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }

.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list svg { color: var(--primary); flex: none; margin-top: 4px; }

.two-col { display: grid; gap: clamp(28px, 5vw, 64px); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- CTA bands ---------- */
.cta-band {
  background: linear-gradient(120deg, rgba(243, 108, 26, 0.14), transparent 55%), var(--secondary);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  color: var(--text);
}
.cta-band .in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; max-width: 560px; }
.form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; color: var(--text-dk);
  background: var(--surface-lt); border: 1px solid var(--border-lt); border-radius: 2px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.form .hint { font-size: 0.82rem; color: var(--muted-dk); margin-top: 5px; }
.form-note { font-size: 0.85rem; color: var(--muted-dk); max-width: 56ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(28px, 5vw, 64px); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-item .icon { color: var(--primary); flex: none; margin-top: 3px; }
.contact-item h3 { margin: 0 0 2px; font-size: 1.05rem; }
.contact-item p, .contact-item a { margin: 0; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--border-lt); border-radius: 3px; background: var(--surface-lt); }
.faq details { border-bottom: 1px solid var(--border-lt); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 20px 18px; color: var(--muted-dk); }

/* ---------- Footer ---------- */
.site-footer { background: var(--secondary); color: var(--text); border-top: 1px solid var(--border); padding: clamp(48px, 7vw, 80px) 0 0; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding-bottom: 48px; }
.site-footer h3 { font-size: 1.05rem; color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--primary); }
.site-footer .about p { color: var(--muted); font-size: 0.92rem; }
.site-footer .logo img { height: 24px; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 0;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 0.83rem; color: var(--muted);
}
.socials { display: flex; gap: 14px; }
.socials a { color: var(--muted); line-height: 0; }
.socials a:hover { color: var(--primary); }

/* ---------- Floating contact ---------- */
.float-cta {
  position: fixed; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.float-cta:hover { transform: scale(1.06); }
.float-wa { background: var(--wa); }
.float-call { background: var(--primary); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: linear-gradient(160deg, #001c3d 0%, var(--background) 70%);
  color: var(--text); padding: clamp(48px, 7vw, 88px) 0;
  border-bottom: 1px solid var(--border);
}
.page-hero p { color: var(--muted); max-width: 60ch; margin-bottom: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s, transform 0.5s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .prod-card, .cat-card, .app-card { transition: none; }
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.notice {
  border: 1px dashed var(--border-lt); border-radius: 3px; background: var(--surface-lt);
  padding: 14px 18px; font-size: 0.88rem; color: var(--muted-dk);
}
