/* ==========================================================================
   Oilwise Pty Ltd. Site styles.
   Built on the v1.3 brand tokens. See BRAND.md in the kit for the rules.
   Design language: the collection docket. Hairline rules, tabular metadata,
   numbered ledger rows, one amber accent doing the wayfinding.
   ========================================================================== */

/* ---- Fonts, self hosted, SIL OFL ---------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---- Tokens -------------------------------------------------------------- */

:root {
  --ink-900: #111315;
  --ink-700: #2A2E32;
  --ink-500: #565C63;
  --ink-300: #9BA2AA;

  --amber-700: #8A5D00;
  --amber-500: #F2B21A;
  --amber-300: #F7D268;

  --white:   #FFFFFF;
  --surface: #F6F6F4;
  --line:    #E3E5E8;

  --eco-600: #2E7D53;
  --eco-700: #1F5C3C;
  --danger:  #B3261E;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Inter", "Helvetica Neue", Arial, sans-serif;

  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   clamp(1.25rem,  0.5vw + 1.13rem, 1.5rem);
  --text-2xl:  clamp(1.5rem,   1.0vw + 1.25rem, 1.875rem);
  --text-3xl:  clamp(1.875rem, 1.8vw + 1.4rem,  2.5rem);
  --text-4xl:  clamp(2.25rem,  3.0vw + 1.5rem,  3.5rem);
  --text-5xl:  clamp(2.875rem, 5vw + 1.4rem,    4.75rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-6: 1.5rem; --space-8: 2rem;
  --space-12: 3rem;   --space-16: 4rem;  --space-24: 6rem;

  --section-y: clamp(3.5rem, 8vw, 8rem);
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 4px;

  --shadow-sm: 0 1px 2px rgba(17, 19, 21, 0.06);
  --shadow-md: 0 4px 16px rgba(17, 19, 21, 0.08);

  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --dur: 200ms;
  --dur-slow: 500ms;

  --head-h: 4.5rem;
}

/* ---- Reset-lite ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-wrap: balance;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl);  font-weight: 700; line-height: 1.25; }

p { margin: 0 0 var(--space-4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--amber-700); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-8) 0; }

strong { font-weight: 500; }

:focus-visible { outline: 3px solid var(--ink-900); outline-offset: 2px; }
.dark :focus-visible, .dark:focus-visible { outline-color: var(--white); }

::selection { background: var(--amber-300); color: var(--ink-900); }

/* ---- Utilities ------------------------------------------------------------ */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section-alt {
  background: var(--surface) url("../img/pattern-dotgrid-light.png") repeat;
  background-size: 60px 60px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Ghost droplet mark. A huge, faint print of the logo mark sitting behind a
   section's content, like a watermark on the paperwork. */
.section-mark { position: relative; overflow: clip; }
.section-mark > .container { position: relative; z-index: 1; }
.section-mark::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -6rem;
  width: clamp(280px, 36vw, 520px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  -webkit-mask: url("../img/oilwise-mark.svg") no-repeat center / contain;
  mask: url("../img/oilwise-mark.svg") no-repeat center / contain;
  background: var(--ink-900);
  opacity: 0.045;
  pointer-events: none;
}
.section-mark.mark-left::before { right: auto; left: -6rem; }
.section-alt.section-mark::before { opacity: 0.06; }

.dark {
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.92);
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--white); }
.dark a:hover { color: var(--amber-500); }

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 200;
  padding: var(--space-3) var(--space-6);
  background: var(--ink-900);
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus-visible { top: 0; color: var(--white); }

.visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Docket metadata text. Small, tracked, tabular. Data, not decoration. */
.meta {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}
.dark .meta { color: var(--ink-300); }

/* The rule-above-rule-below device from the logo. Two or three per page. */
.ruled {
  border-top: 3px solid var(--ink-900);
  border-bottom: 3px solid var(--ink-900);
  padding-block: var(--space-3);
}
.dark .ruled { border-color: var(--white); }

.accent-bar {
  width: 56px; height: 4px;
  background: var(--amber-500);
  border: 0; margin: 0;
}

/* ---- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: 48px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn .arr { transition: transform var(--dur) var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* Liquid sheen sweeping across on hover */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-12deg);
  transition: left 0.5s var(--ease);
  pointer-events: none;
}
.btn:hover::after { left: 120%; }

.btn-amber { background: var(--amber-500); color: var(--ink-900); }
.btn-amber:hover { background: var(--amber-300); color: var(--ink-900); }

.btn-dark { background: var(--ink-900); color: var(--white); }
.btn-dark:hover { background: var(--ink-700); color: var(--white); }

.btn-ghost { background: transparent; color: var(--ink-900); border-color: var(--ink-900); }
.btn-ghost:hover { background: var(--ink-900); color: var(--white); }

.dark .btn-ghost { color: var(--white); border-color: var(--white); }
.dark .btn-ghost:hover { background: var(--white); color: var(--ink-900); }

/* ---- Header ----------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease),
              background-color var(--dur-slow) var(--ease),
              border-color var(--dur-slow) var(--ease);
}
.site-head.is-scrolled { box-shadow: var(--shadow-md); }

/* Logged-in WordPress admin bar sits above the sticky header */
body.admin-bar .site-head { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-head { top: 46px; }
}

/* Honeypot field for the enquiry form: invisible to people, present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Over the oil hero the header goes transparent and reversed */
.brand .logo-white { display: none; }
.site-head.on-dark {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}
.site-head.on-dark .brand .logo-ink { display: none; }
.site-head.on-dark .brand .logo-white { display: block; }
.site-head.on-dark .site-nav ul a { color: rgba(255, 255, 255, 0.85); }
.site-head.on-dark .site-nav ul a:hover,
.site-head.on-dark .site-nav ul a[aria-current="page"] { color: var(--white); }
.site-head.on-dark .nav-toggle .bar { background: var(--white); }
.site-head.on-dark :focus-visible { outline-color: var(--white); }

.head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--head-h);
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: 150px; height: auto; }

.site-nav { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px; height: 48px;
  padding: 12px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink-900);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
/* First child is the visually hidden label, so the bars are children 2 to 4 */
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile panel: full screen, ink, big type */
.nav-panel {
  display: none;
  position: fixed;
  inset: var(--head-h) 0 0 0;
  z-index: 90;
  background: var(--ink-900);
  color: var(--white);
  padding: var(--space-8) var(--gutter) var(--space-8);
  overflow-y: auto;
}
.nav-panel.is-open { display: flex; flex-direction: column; }
.nav-panel ul {
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
}
.nav-panel li { border-bottom: 1px solid var(--ink-700); }
.nav-panel li a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-4) 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none;
}
.nav-panel li a:hover { color: var(--amber-500); }
.nav-panel li a .num {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  font-variant-numeric: tabular-nums;
}
.nav-panel li a[aria-current="page"] { color: var(--amber-500); }
.nav-panel-foot {
  padding-top: var(--space-8);
  display: grid;
  gap: var(--space-3);
}

body.nav-open { overflow: hidden; }

/* Desktop nav */
@media (min-width: 1024px) {
  .nav-toggle, .nav-panel { display: none !important; }
  .site-nav { display: flex; align-items: center; gap: var(--space-8); }
  .site-nav ul {
    display: flex;
    gap: var(--space-6);
    list-style: none;
    margin: 0; padding: 0;
  }
  .site-nav ul a {
    position: relative;
    display: inline-block;
    padding: var(--space-2) 0;
    font-weight: 500;
    font-size: var(--text-sm);
    text-decoration: none;
    color: var(--ink-700);
  }
  .site-nav ul a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 3px;
    background: var(--amber-500);
    transition: right var(--dur) var(--ease);
  }
  .site-nav ul a:hover { color: var(--ink-900); }
  .site-nav ul a:hover::after { right: 0; }
  .site-nav ul a[aria-current="page"] { color: var(--ink-900); }
  .site-nav ul a[aria-current="page"]::after { right: 0; }
}
@media (max-width: 1023.98px) {
  .head-cta { display: none; }
}

/* Scroll progress droplet. The mark fills with amber as you read. */
.gauge {
  display: none;
}
@media (min-width: 1024px) {
  .gauge {
    display: block;
    position: relative;
    width: 44px; height: 44px;
    overflow: hidden;
    -webkit-mask: url("../img/oilwise-mark.svg") no-repeat center / contain;
    mask: url("../img/oilwise-mark.svg") no-repeat center / contain;
    background: var(--line);
  }
  .gauge .fill {
    position: absolute;
    inset: 0;
    background: var(--amber-500);
    transform: translateY(calc(100% - (var(--scrollp, 0) * 100%)));
  }
  .site-head.on-dark .gauge { background: var(--ink-700); }
}

/* ---- Docket panel ------------------------------------------------------------ */

.docket {
  background: var(--white);
  border: 2px solid var(--ink-900);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.docket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 2px solid var(--ink-900);
}
.docket-head img { width: 28px; height: 28px; }
.docket-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.docket-rows { padding: var(--space-2) var(--space-6); }
.docket-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-4);
}
.docket-row + .docket-row { border-top: 1px solid var(--line); }
.docket-row .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--amber-700);
  font-variant-numeric: tabular-nums;
}
.docket-row h3, .docket-row h4 {
  margin: 0 0 var(--space-1);
  font-size: var(--text-lg);
}
.docket-row p { margin: 0; font-size: var(--text-sm); color: var(--ink-500); }
.docket-foot {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-top: 1px dashed var(--ink-300);
}

/* Field table inside docket-styled blocks (compliance sample) */
.docket-fields { padding: var(--space-4) var(--space-6) var(--space-6); }
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.field-row dt { color: var(--ink-500); font-size: var(--text-sm); }
.field-row dd { margin: 0; font-weight: 500; text-align: right; }

/* Rubber stamp. Once, maybe twice, per site. */
.stamp {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--amber-700);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--amber-700);
  color: var(--amber-700);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.stamp-eco {
  border-color: var(--eco-700);
  color: var(--eco-700);
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--eco-700);
}

/* ---- Ledger rows (services index) --------------------------------------------- */

.ledger { border-top: 1px solid var(--ink-900); }
.ledger-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2) var(--space-8);
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.ledger-row:hover { background: var(--surface); }
.ledger-row::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  height: 3px;
  width: 0;
  background: var(--amber-500);
  transition: width var(--dur-slow) var(--ease);
}
.ledger-row:hover::before { width: 100%; }
.ledger-row .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-3xl);
  line-height: 1;
  color: var(--ink-300);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur) var(--ease);
}
.ledger-row:hover .num { color: var(--amber-700); }
.ledger-row h3 { margin: 0; }
.ledger-row p { margin: 0; color: var(--ink-500); }
.ledger-row .go {
  justify-self: start;
  align-self: center;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--ink-700);
}
.ledger-row:hover .go { color: var(--amber-700); }

@media (min-width: 768px) {
  .ledger-row {
    grid-template-columns: 5rem 1fr 16rem auto;
    align-items: center;
    padding-block: var(--space-8);
  }
  .ledger-row p { grid-column: 3; }
  .ledger-row .go { justify-self: end; }
}

/* ---- Imagery ------------------------------------------------------------------- */

.frame {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.frame img { width: 100%; height: auto; }
.frame figcaption {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
}

.bleed { position: relative; }
.bleed img { width: 100%; height: 70vh; min-height: 320px; max-height: 640px; object-fit: cover; }
.bleed .bleed-caption {
  position: absolute;
  left: 0; bottom: 0;
  background: var(--white);
  padding: var(--space-3) var(--space-6) var(--space-3) var(--gutter);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* ---- Oil hero. Full-viewport, dark, a live oil surface that fills on scroll. ------ */

.oil-stage {
  /* Sticky runway. The hero pins briefly, then the page slides over it. */
  height: 180svh;
  margin-top: calc(-1 * var(--head-h) - 1px);  /* hero runs behind the header */
}
@supports not (height: 100svh) { .oil-stage { height: 180vh; } }

.hero-oil {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  overflow: clip;
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.92);
}
@supports not (height: 100svh) { .hero-oil { height: 100vh; } }

.hero-reel { position: absolute; inset: 0; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.hero-video.is-active { opacity: 1; }
/* Keeps the headline readable over daylight footage: heavy on the text side,
   lighter on the right so the film shows through */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(17, 19, 21, 0.84) 0%, rgba(17, 19, 21, 0.52) 45%, rgba(17, 19, 21, 0.12) 78%),
    linear-gradient(to top, rgba(17, 19, 21, 0.5), transparent 40%);
}

.hero-oil-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-top: var(--head-h);
  padding-bottom: 5svh;
  transform: translateY(calc(var(--fillp, 0) * -9vh));
  opacity: calc(1 - var(--fillp, 0) * 1.6);
}
.hero-oil h1 {
  color: var(--white);
  font-size: clamp(3.25rem, 7.5vw + 0.5rem, 6.75rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}
.hero-oil h1 .amber { color: var(--amber-500); }
.hero-oil .lede {
  font-size: var(--text-lg);
  color: var(--ink-300);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-oil .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.hero-oil .btn-ghost:hover { background: var(--white); color: var(--ink-900); border-color: var(--white); }

.hero-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: var(--space-8);
  transform: translateX(-50%);
  z-index: 2;
  color: var(--ink-300);
  opacity: calc(1 - var(--fillp, 0) * 2);
}
.hero-scroll-hint svg { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll-hint svg { animation: hint-bob 2.4s var(--ease) infinite; }
}
@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* The rest of the page rides up over the pinned hero */
.overlap {
  position: relative;
  z-index: 5;
  margin-top: -60svh;
  background: var(--white);
  box-shadow: 0 -24px 64px rgba(5, 6, 7, 0.45);
}
@supports not (height: 100svh) { .overlap { margin-top: -60vh; } }

/* ---- Editorial splits --------------------------------------------------------------- */

.split {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 1024px) {
  .split { grid-template-columns: repeat(12, 1fr); gap: var(--space-8); }
  .split > .split-a { grid-column: 1 / 6; grid-row: 1; }
  .split > .split-b { grid-column: 7 / 13; grid-row: 1; }
  .split.flip > .split-a { grid-column: 8 / 13; }
  .split.flip > .split-b { grid-column: 1 / 7; }
}

.oversize {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 10vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}
.oversize .amber { color: var(--amber-700); }

/* Spec tables: hairline rows, label left, value right */
.spec { border-top: 2px solid var(--ink-900); margin: 0; }
.spec > div {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) 1fr;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.spec dt { font-weight: 500; }
.spec dd { margin: 0; color: var(--ink-500); }
.dark .spec { border-top-color: var(--white); }
.dark .spec > div { border-bottom-color: var(--ink-700); }
.dark .spec dd { color: var(--ink-300); }

/* ---- Service detail blocks (services page) -------------------------------------------- */

.svc { padding-block: var(--section-y); }
.svc + .svc { border-top: 1px solid var(--line); }
.svc-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.svc-head .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-4xl);
  line-height: 1;
  color: var(--amber-700);
  font-variant-numeric: tabular-nums;
}
.svc-head h2 { margin: 0; font-size: var(--text-3xl); }

/* ---- Closing CTA + footer: the single dark band ---------------------------------------- */

.cta-band {
  position: relative;
  overflow: clip;
  padding-block: var(--section-y);
  /* faint ruled texture, echoes the mark, costs nothing */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 47px,
    rgba(255, 255, 255, 0.045) 47px, rgba(255, 255, 255, 0.045) 48px
  );
}
.cta-band h2 { font-size: var(--text-4xl); margin-bottom: var(--space-4); }
.cta-band .cta-lede { color: var(--ink-300); font-size: var(--text-lg); margin-bottom: var(--space-8); }
.cta-inner { max-width: 720px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cta-phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}
.cta-phone:hover { color: var(--amber-500); }

.site-foot { border-top: 1px solid var(--ink-700); }
.foot-grid {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-16) var(--space-8);
}
@media (min-width: 768px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--space-12); }
}
@media (min-width: 1024px) {
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); }
}
.foot-brand img { width: 160px; margin-bottom: var(--space-4); }
.foot-brand p { color: var(--ink-300); font-size: var(--text-sm); }
.site-foot h4 {
  color: var(--white);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: var(--space-3); }
.site-foot a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-foot a:hover { color: var(--amber-500); }
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: space-between;
  padding-block: var(--space-6);
  border-top: 1px solid var(--ink-700);
  font-size: var(--text-sm);
  color: var(--ink-300);
}
.foot-bottom a { color: var(--ink-300); text-decoration: underline; }
.foot-note {
  padding-bottom: var(--space-6);
  font-size: 0.8125rem;
  color: var(--ink-500);
  max-width: none;
}

/* ---- Forms --------------------------------------------------------------------------- */

.form-grid { display: grid; gap: var(--space-6); }
@media (min-width: 768px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
}

.field label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.field .hint { color: var(--ink-500); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  min-height: 48px;
  font: inherit;
  color: var(--ink-900);
  background: var(--white);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--ink-900);
  outline-offset: 1px;
  border-color: var(--ink-900);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); border-width: 2px; }
.error-msg {
  display: none;
  margin-top: var(--space-2);
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 500;
}
.field.has-error .error-msg { display: block; }

.form-status {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-6);
  border: 2px solid var(--eco-700);
  border-radius: var(--radius);
  color: var(--eco-700);
  font-weight: 500;
  display: none;
}
.form-status.is-visible { display: block; }

/* ---- Stacked sections. Each section pins once read and the next slides up
   over it, on every page. JS sets the sticky offset per section so any
   height works; without JS nothing sticks and the page reads normally. ----- */

.js .stack-item {
  position: sticky;
}
.js .stack-item.stack-covered {
  box-shadow: 0 -28px 64px rgba(5, 6, 7, 0.3);
}
@media (prefers-reduced-motion: reduce) {
  .js .stack-item { position: static !important; }
}

/* ---- Reveal motion. Opacity and transform only, observer driven. ---------------------- */

.js .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .rv.in { opacity: 1; transform: none; }

.js .rule-draw {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 700ms var(--ease);
}
.js .rule-draw.in { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .rv, .js .rule-draw { opacity: 1; transform: none; }
}

/* ---- Page intro (inner pages) ---------------------------------------------------------- */

.page-intro {
  position: relative;
  overflow: clip;
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--surface) url("../img/pattern-dotgrid-light.png") repeat;
  background-size: 60px 60px;
  border-bottom: 1px solid var(--line);
}
.page-intro > .container { position: relative; z-index: 1; }
.page-intro::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -5rem;
  width: clamp(260px, 30vw, 440px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  -webkit-mask: url("../img/oilwise-mark.svg") no-repeat center / contain;
  mask: url("../img/oilwise-mark.svg") no-repeat center / contain;
  background: var(--ink-900);
  opacity: 0.05;
  pointer-events: none;
}
.page-intro h1 { margin-bottom: var(--space-4); }
.page-intro .lede { font-size: var(--text-lg); color: var(--ink-500); margin-bottom: 0; }
.page-intro .accent-bar { margin-bottom: var(--space-6); }

/* ---- Legal pages ------------------------------------------------------------------------ */

.legal { padding-block: var(--space-12) var(--section-y); }
.legal-body { max-width: 760px; }
.legal-body h2 { font-size: var(--text-2xl); margin-top: var(--space-12); }
.legal-body h3 { font-size: var(--text-lg); margin-top: var(--space-8); }
.legal-body p, .legal-body li { color: var(--ink-700); }

/* ---- Misc --------------------------------------------------------------------------------- */

.grid-2 { display: grid; gap: var(--space-8); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.grid-3 { display: grid; gap: var(--space-8); }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.muted { color: var(--ink-500); }
.eco { color: var(--eco-700); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---- Blog: archive cards ---------------------------------------------------------------- */

.post-list { display: grid; gap: var(--space-12) var(--space-8); }
@media (min-width: 768px) { .post-list { grid-template-columns: 1fr 1fr; } }

.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5, 1.25rem);
  border-top: 1px solid var(--ink-900);
  padding-top: var(--space-4);
}
.post-card-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}
.post-card-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.post-card:hover .post-card-media img { transform: scale(1.02); }
.post-card-body { display: flex; flex-direction: column; gap: var(--space-4); }
.post-card h2 { font-size: var(--text-2xl); margin: 0; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { color: var(--amber-700); }
.post-card .excerpt { color: var(--ink-500); margin: 0; }
.post-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin: 0;
  max-width: none;
}
.post-card .go {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--ink-700);
  text-decoration: none;
}
.post-card .go .arr { display: inline-block; transition: transform var(--dur) var(--ease); }
.post-card .go:hover { color: var(--amber-700); }
.post-card .go:hover .arr { transform: translateX(4px); }

/* WordPress pagination on the archive */
.pagination { margin-top: var(--space-16); border-top: 1px solid var(--ink-900); padding-top: var(--space-6); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.pagination .page-numbers.current { background: var(--ink-900); color: var(--white); border-color: var(--ink-900); }
.pagination a.page-numbers:hover { border-color: var(--ink-900); color: var(--ink-900); }

/* ---- Blog: article ------------------------------------------------------------------------ */

.post-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  max-width: none;
}
.post-crumbs a { text-decoration: none; }
.post-crumbs a:hover { color: var(--amber-700); text-decoration: underline; }
.post-crumbs .sep { color: var(--ink-300); }
.post-intro h1 { max-width: 20ch; }
.post-intro .lede { max-width: 68ch; }

.post-hero { margin: 0 0 var(--space-12); }
.post-hero img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.post-hero figcaption {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
}

.post-body { max-width: 760px; }
.post-body > * + * { margin-top: var(--space-4); }
.post-body p, .post-body li { color: var(--ink-700); font-size: var(--text-lg); line-height: 1.65; }
.post-body h2 { font-size: var(--text-3xl); margin-top: var(--space-16); margin-bottom: var(--space-4); }
.post-body h3 { font-size: var(--text-xl); margin-top: var(--space-12); margin-bottom: var(--space-3); }
.post-body h2:first-child { margin-top: 0; }
.post-body ul, .post-body ol { padding-left: 1.25rem; }
.post-body li + li { margin-top: var(--space-2); }
.post-body a { color: var(--ink-900); text-decoration: underline; text-decoration-color: var(--amber-500); text-decoration-thickness: 2px; }
.post-body a:hover { color: var(--amber-700); text-decoration-color: currentColor; }
.post-body strong { font-weight: 500; color: var(--ink-900); }
.post-body blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  border-left: 4px solid var(--amber-500);
}
.post-body blockquote p { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); line-height: 1.3; color: var(--ink-900); }
.post-body figure { margin: var(--space-8) 0; }
.post-body figcaption { font-size: var(--text-sm); color: var(--ink-500); margin-top: var(--space-2); }

/* Tables in articles take the spec-table look: hairline rows, data not decoration */
.post-body .wp-block-table { margin: var(--space-8) 0; overflow-x: auto; }
.post-body table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink-900); font-size: var(--text-base); }
.post-body th, .post-body td { text-align: left; padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-700); }
.post-body th { font-weight: 500; color: var(--ink-900); }
.post-body tbody th { font-weight: 500; }

/* Callout box: a docket-style aside inside an article */
.post-body .callout {
  margin: var(--space-8) 0;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber-500);
}
.post-body .callout p { font-size: var(--text-base); }
.post-body .callout p:first-child { margin-top: 0; }

/* Sources list at the foot of an article */
.post-body .sources { margin-top: var(--space-16); padding-top: var(--space-6); border-top: 1px solid var(--ink-900); }
.post-body .sources h2 { font-size: var(--text-xl); margin-top: 0; }
.post-body .sources ol { padding-left: 1.25rem; }
.post-body .sources li { font-size: var(--text-sm); color: var(--ink-500); overflow-wrap: anywhere; }
.post-body .sources a { text-decoration-thickness: 1px; }

/* Previous / next */
.post-nav {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-16);
  border-top: 1px solid var(--ink-900);
  padding-top: var(--space-6);
}
@media (min-width: 768px) { .post-nav { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.post-nav-link:hover { border-color: var(--ink-900); background: var(--surface); color: var(--ink-900); }
.post-nav-next { text-align: right; }
.post-nav-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.01em; }
