/* ============================================================
   TIBA OIL TOOLS — v3 "Field Report"
   Industrial editorial: flat surfaces, hairline grid, expanded
   display type, mono annotations. Palette = 5 fixed brand
   colors only (tokens.css). Red = functional marking + CTAs.
   ============================================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--brand-dark-blue); color: #fff; }
:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }

/* mono utility voice */
.kicker, .sec-index, .sec-name, .topbar, .accreds-label, figcaption,
.mv-label, .value-num, .svc-num, .prod-tag, .cert-std, .office-country,
.stat .lbl, .form-note, .footer-iso, .prod-link, .office-tel {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- PROGRESS ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 300;
  width: 100%; height: 2px; background: var(--brand-red);
  transform: scaleX(0); transform-origin: left;
}

/* ---------- TOPBAR ---------- */
.topbar { background: var(--brand-dark-blue); color: rgba(255,255,255,.85); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding-block: .45rem; gap: 1rem; }
.topbar .topbar-loc, .topbar .topbar-cert { font-size: .66rem; letter-spacing: .18em; }
.topbar .topbar-cert { color: var(--brand-light-blue); }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(27,35,71,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 72px; }
.brand img { height: 40px; width: auto; }
.nav-desktop { display: flex; height: 100%; }
.nav-desktop a {
  display: flex; align-items: center; height: 72px; padding-inline: 1.1rem;
  font-weight: 500; font-size: .92rem; color: var(--ink-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .25s, border-color .25s;
}
.nav-desktop a:hover { color: var(--brand-dark-blue); }
.nav-desktop a.active { color: var(--brand-dark-blue); border-bottom-color: var(--brand-red); }
.header-cta { display: flex; align-items: center; gap: 1rem; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  padding: .78rem 1.5rem; border-radius: var(--r);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.btn::after { content: "→"; font-family: var(--font-mono); font-weight: 400; transition: transform .25s var(--ease); }
.btn:hover::after { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--brand-red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }
.btn-line { background: transparent; color: var(--brand-dark-blue); border: 1px solid var(--line-strong); }
.btn-line:hover { border-color: var(--brand-dark-blue); background: var(--brand-dark-blue); color: #fff; }
.btn-lg { padding: 1rem 1.9rem; font-size: .98rem; }
.btn-block { width: 100%; }
.text-link { color: var(--brand-medium-blue); font-weight: 600; border-bottom: 1px solid currentColor; }
.text-link:hover { color: var(--brand-red); }

/* ---------- MOBILE NAV ---------- */
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--brand-dark-blue); transition: .3s var(--ease); }
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 26px; }
body.nav-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }
.nav-mobile {
  position: fixed; inset: 0; z-index: 95; background: var(--brand-dark-blue);
  display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 2rem var(--gutter);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease), visibility .3s;
}
body.nav-open .nav-mobile { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-mobile a {
  display: flex; align-items: baseline; gap: 1rem;
  color: #fff; font-size: 1.7rem; font-weight: 600;
  padding: .9rem 0; border-bottom: 1px solid var(--line-inverse);
}
.nav-mobile a span { font-family: var(--font-mono); font-size: .75rem; color: var(--brand-light-blue); }
.nav-mobile .nav-mobile-cta { color: var(--brand-red); border-bottom: none; margin-top: 1rem; }

/* ---------- HERO ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 5rem); align-items: end;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
}
.kicker { color: var(--brand-red); margin-bottom: 1.6rem; display: block; }
.hero h1 {
  font-weight: 800; font-stretch: 115%;
  font-size: clamp(3rem, 8.2vw, 6.4rem);
  line-height: .96; letter-spacing: -0.025em;
  color: var(--brand-dark-blue);
  text-transform: uppercase;
}
.hero h1 span { display: block; }
.hero h1 i { font-style: normal; color: var(--brand-red); }
.hero-lead { max-width: 46ch; color: var(--ink-muted); font-size: 1.08rem; margin-top: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.4rem; }

.hero-media { display: flex; flex-direction: column; }
.hero-img { position: relative; overflow: hidden; }
.hero-img img {
  width: 100%; height: clamp(300px, 44vh, 460px); object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.hero-media:hover .hero-img img { transform: scale(1.03); }
.hero-img::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.14); pointer-events: none; }
.hero-media figcaption { margin-top: .7rem; color: var(--ink-faint); font-size: .66rem; }

/* stats rail */
.hero-stats { border-top: 1px solid var(--line); }
.hero-stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 1.4rem 1.5rem 1.5rem 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat + .stat { padding-left: 1.5rem; }
.stat .num {
  display: block; font-weight: 700; font-stretch: 110%;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1;
  color: var(--brand-dark-blue); font-variant-numeric: tabular-nums;
}
.stat .lbl { color: var(--ink-faint); }

/* ---------- ACCREDS STRIP ---------- */
.accreds { padding-block: 2.4rem; border-bottom: 1px solid var(--line); background: var(--paper-tint); }
.accreds-label { color: var(--ink-faint); margin-bottom: 1.2rem; }
.accreds-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.accred-cell { background: var(--paper); display: flex; align-items: center; justify-content: center; padding: 1.1rem; min-height: 96px; }
.accred-cell img { max-height: 58px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.accred-cell:hover img { filter: none; opacity: 1; }

/* ---------- SECTION FURNITURE ---------- */
.sec-head {
  display: flex; align-items: baseline; gap: 1.2rem;
  padding-bottom: .9rem; border-bottom: 1px solid var(--line-strong);
  margin-bottom: clamp(2rem, 4.5vw, 3.4rem);
}
.sec-index { color: var(--brand-red); }
.sec-name { color: var(--ink-muted); }
.sec-intro h2 {
  font-weight: 750; font-stretch: 112%;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.04; letter-spacing: -0.02em;
  color: var(--brand-dark-blue); max-width: 24ch;
}
.sec-intro p { color: var(--ink-muted); max-width: 60ch; margin-top: 1rem; font-size: 1.05rem; }
.sec-intro { margin-bottom: clamp(2.4rem, 5vw, 4rem); }

/* ---------- ABOUT ---------- */
.about-lede h2 {
  font-weight: 700; font-stretch: 108%;
  font-size: clamp(1.7rem, 3.8vw, 2.9rem);
  line-height: 1.14; letter-spacing: -0.015em;
  color: var(--brand-dark-blue); max-width: 30ch;
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
}
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-text p { color: var(--ink-muted); font-size: 1.05rem; max-width: 58ch; }
.about-media .about-img { overflow: hidden; }
.about-media .about-img img { width: 100%; height: 300px; object-fit: cover; transition: transform .8s var(--ease); }
.about-media:hover .about-img img { transform: scale(1.03); }
.about-media figcaption { margin-top: .7rem; color: var(--ink-faint); font-size: .66rem; }

.mv-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.mv-block { border-top: 2px solid var(--brand-dark-blue); padding-top: 1.2rem; }
.mv-block .mv-label { color: var(--brand-red); display: block; margin-bottom: .8rem; }
.mv-block p { color: var(--ink-muted); }

.values { margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.value-row {
  display: grid; grid-template-columns: 80px 240px 1fr; gap: 1.5rem; align-items: baseline;
  padding-block: 1.5rem; border-bottom: 1px solid var(--line);
  transition: background .25s, padding-left .3s var(--ease);
}
.value-row:hover { background: var(--paper-tint); padding-left: .8rem; }
.value-num { color: var(--brand-red); }
.value-row h3 { font-weight: 650; font-size: 1.15rem; color: var(--brand-dark-blue); }
.value-row p { color: var(--ink-muted); font-size: .97rem; max-width: 64ch; }

/* ---------- SERVICES ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc-row {
  display: grid; grid-template-columns: 80px 1fr 220px; gap: clamp(1.2rem, 3vw, 2.5rem);
  align-items: center; padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
  transition: background .25s, padding-left .3s var(--ease);
}
.svc-row:hover { background: var(--paper-tint); padding-left: .8rem; }
.svc-num { color: var(--brand-red); }
.svc-info h3 { font-weight: 680; font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--brand-dark-blue); letter-spacing: -0.01em; }
.svc-info p { color: var(--ink-muted); font-size: .96rem; margin-top: .3rem; max-width: 60ch; }
.svc-thumb { overflow: hidden; }
.svc-thumb img {
  width: 100%; height: 110px; object-fit: cover;
  transition: transform .8s var(--ease);
}
.svc-row:hover .svc-thumb img { transform: scale(1.05); }

/* ---------- PRODUCTS ---------- */
.products { background: var(--paper-tint); border-block: 1px solid var(--line); }
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.prod-cell { background: var(--paper); padding: 1.6rem; display: flex; flex-direction: column; gap: .55rem; transition: background .25s; }
.prod-cell:hover { background: var(--paper-tint); }
.prod-img { overflow: hidden; margin: -1.6rem -1.6rem 1rem; }
.prod-img img { width: 100%; height: 170px; object-fit: cover; transition: transform .8s var(--ease); }
.prod-cell:hover .prod-img img { transform: scale(1.04); }
.prod-tag { color: var(--brand-red); }
.prod-cell h3 { font-weight: 680; font-size: 1.18rem; color: var(--brand-dark-blue); letter-spacing: -0.01em; }
.prod-cell p { color: var(--ink-muted); font-size: .94rem; }
.prod-link { margin-top: auto; padding-top: .9rem; color: var(--brand-medium-blue); }
.prod-link::after { content: " →"; font-family: var(--font-mono); }
.prod-link:hover { color: var(--brand-red); }

/* ---------- CERTIFICATIONS ---------- */
.cert-feature {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  border: 1px solid var(--line-strong); border-left: 4px solid var(--brand-red);
  padding: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: 2.5rem;
  background: var(--paper);
}
.cert-feature-badge img { width: 110px; height: auto; }
.cert-std { color: var(--ink-faint); display: block; }
.cert-feature-info h3 { font-weight: 750; font-stretch: 110%; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--brand-dark-blue); margin-block: .35rem .6rem; }
.cert-feature-info p { color: var(--ink-muted); max-width: 66ch; }

.cert-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cert-cell { background: var(--paper); padding: 1.5rem 1.3rem; transition: background .25s; }
.cert-cell:hover { background: var(--paper-tint); }
.cert-badge { height: 72px; display: flex; align-items: center; margin-bottom: 1rem; }
.cert-badge img { max-height: 64px; width: auto; }
.cert-cell h4 { font-weight: 700; font-size: 1.1rem; color: var(--brand-dark-blue); }
.cert-cell .cert-std { margin-block: .25rem .6rem; }
.cert-cell p { color: var(--ink-muted); font-size: .85rem; line-height: 1.55; }

/* ---------- PARTNERS ---------- */
.partner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.partner-cell { background: var(--paper); display: flex; align-items: center; justify-content: center; min-height: 110px; padding: 1.4rem; }
.partner-cell img { max-height: 48px; max-width: 130px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .3s, opacity .3s; }
.partner-cell:hover img { filter: none; opacity: 1; }

/* ---------- CTA BAND ---------- */
.cta-band { background: var(--brand-dark-blue); color: #fff; border-top: 4px solid var(--brand-red); }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.cta-inner h2 { color: #fff; font-weight: 750; font-stretch: 112%; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.02em; max-width: 24ch; }
.cta-inner p { color: var(--brand-light-blue); margin-top: .7rem; }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.offices { border-top: 1px solid var(--line); }
.office { padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.office-country { color: var(--brand-red); display: block; margin-bottom: .5rem; }
.office p { color: var(--ink-muted); font-size: .96rem; }
.office-tel { margin-top: .35rem; letter-spacing: .04em; font-size: .78rem; }
.office-tel a { color: var(--brand-medium-blue); }
.office-tel a:hover { color: var(--brand-red); }

.contact-form { border: 1px solid var(--line-strong); padding: clamp(1.6rem, 3.5vw, 2.6rem); background: var(--paper); }
.contact-form h3 { font-weight: 720; font-size: 1.5rem; color: var(--brand-dark-blue); letter-spacing: -0.01em; }
.form-sub { color: var(--ink-muted); font-size: .95rem; margin-block: .4rem 1.8rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field { margin-bottom: 1.4rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--brand-dark-blue); margin-bottom: .35rem; letter-spacing: .03em; }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .2rem;
  border: none; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: transparent; font: inherit; color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-bottom-color: var(--brand-dark-blue);
  box-shadow: 0 1px 0 var(--brand-dark-blue);
}
.field input:user-invalid, .field textarea:user-invalid { border-bottom-color: var(--brand-red); box-shadow: 0 1px 0 var(--brand-red); }
.field textarea { resize: vertical; min-height: 110px; }
.req { color: var(--brand-red); }
.form-note { color: var(--ink-faint); margin-top: .9rem; }
.form-status { margin-top: 1.1rem; padding: .85rem 1rem; font-size: .92rem; display: none; border: 1px solid var(--line); }
.form-status.show { display: block; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--brand-dark-blue); color: rgba(255,255,255,.75); }
.footer-top {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
  border-bottom: 1px solid var(--line-inverse);
}
.footer-brand img { height: 42px; background: #fff; padding: .35rem .55rem; margin-bottom: 1.1rem; }
.footer-brand p { font-size: .92rem; max-width: 36ch; }
.footer-col h5 { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-light-blue); margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,.75); font-size: .92rem; padding: .22rem 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1.3rem; font-size: .82rem; }
.footer-iso { color: var(--brand-light-blue); }

/* ---------- BACK TO TOP ---------- */
.to-top {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 220;
  width: 46px; height: 46px;
  background: var(--brand-dark-blue); color: #fff;
  border: 1px solid var(--line-inverse);
  font-family: var(--font-mono); font-size: 1.1rem;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background .25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-red); }

/* ---------- REVEAL ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============================================================
   RESPONSIVE — ≤1024px
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-media { max-width: 640px; }
  .hero-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: none; padding-left: 1.5rem; }
  .stat:nth-child(2n+1) { padding-left: 0; }
  .stat:nth-child(n+3) { border-bottom: none; }
  .accreds-row { grid-template-columns: repeat(3, 1fr); }
  .about-cols, .mv-row, .contact-grid { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .partner-grid { grid-template-columns: repeat(4, 1fr); }
  .value-row { grid-template-columns: 60px 1fr; }
  .value-row p { grid-column: 2; }
}

/* ============================================================
   RESPONSIVE — ≤680px
   ============================================================ */
@media (max-width: 680px) {
  :root { --gutter: 1.1rem; }
  .topbar .topbar-loc { display: none; }
  .topbar-inner { justify-content: center; }
  .topbar .topbar-cert { font-size: .62rem; }
  .nav-desktop { display: none; }
  .header-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .header-inner { height: 62px; }
  .brand img { height: 34px; }

  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .hero-img img { height: 240px; }
  .hero-actions .btn { flex: 1 1 100%; }

  .accreds-row { grid-template-columns: repeat(2, 1fr); }
  .accred-cell { min-height: 78px; }
  .accred-cell img { max-height: 44px; }

  .svc-row { grid-template-columns: 1fr; gap: .8rem; }
  .svc-num { order: -1; }
  .svc-thumb img { height: 160px; }

  .prod-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .cert-feature { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
  .partner-cell { min-height: 84px; padding: .9rem; }
  .partner-cell img { max-height: 36px; max-width: 90px; }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-top { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .4rem; }

  .value-row:hover, .svc-row:hover { padding-left: 0; }
  .to-top { right: 1rem; bottom: 1rem; }
}

/* ============================================================
   RESPONSIVE — ≤380px
   ============================================================ */
@media (max-width: 380px) {
  .hero h1 { font-size: 2.1rem; }
  .cert-grid { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
}
