/* ===========================================================
   Terravon Energy — site styles
   Single stylesheet. Edit the tokens below to restyle globally.
   =========================================================== */

:root {
  color-scheme: light;

  --ink:        #0B0B0C;
  --ink-80:     #2B2B2E;
  --muted:      #6B6862;
  --paper:      #FFFFFF;
  --soft:       #F6F5F2;
  --soft-2:     #EDEBE6;
  --line:       #E2DFD9;
  --accent:     #B5762F;
  --accent-dk:  #8E5A20;

  --wrap:       1180px;
  --gutter:     clamp(20px, 5vw, 56px);

  --r-sm: 4px;
  --r-md: 10px;

  --t: 220ms cubic-bezier(.2,.6,.2,1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 999;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.04;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 5vw, 3.85rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); letter-spacing: -0.02em; line-height: 1.2; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-80);
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--accent); flex: none;
}

.muted { color: var(--muted); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px;
  font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  border-radius: var(--r-sm);
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

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

.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  color: var(--ink); border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: gap var(--t), color var(--t);
}
.arrow-link:hover { gap: 14px; color: var(--accent-dk); }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px;
}

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.logo svg { height: 26px; width: auto; flex: none; }
.logo-text {
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  font-size: 1.12rem; text-transform: none;
}
.logo-text span { display: block; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  font-size: .93rem; font-weight: 600;
  padding: 9px 14px; border-radius: var(--r-sm);
  color: var(--ink-80);
  transition: color var(--t), background var(--t);
}
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; background: var(--accent); margin-top: 5px;
}
/* .nav a sets a muted colour; these rules must win for the button. */
.nav .btn {
  margin-left: 12px; padding: 11px 20px;
  color: var(--paper);
  background: var(--ink);
}
.nav .btn:hover {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}
/* aria-current would otherwise darken the button text on the Contact page. */
.nav .btn[aria-current="page"] { color: var(--paper); }
.nav .btn::after { display: none; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; cursor: pointer; color: var(--ink);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 22px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 4px; font-size: 1.02rem; }
  .nav a[aria-current="page"]::after { width: 26px; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
}

/* ---------- Sections ---------- */

section { position: relative; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--soft { background: var(--soft); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink .lede { color: rgba(255,255,255,.76); }
.section--ink .muted { color: rgba(255,255,255,.62); }

.section-head { max-width: 62ch; margin-bottom: clamp(38px, 5vw, 60px); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 4.5vw, 64px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.hero-grid > div:last-child {
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 4vw, 48px);
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid > div:last-child { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }
}

/* ---------- Photo band ---------- */

.band {
  position: relative;
  min-height: clamp(320px, 42vw, 520px);
  display: flex; align-items: center;
  background-color: #14161A;
  background-image:
    linear-gradient(100deg, rgba(10,11,12,.80) 0%, rgba(10,11,12,.42) 55%, rgba(10,11,12,.28) 100%),
    linear-gradient(150deg, #2A2E35 0%, #15171B 60%, #0C0D0F 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
}
.band--tanks {
  background-image:
    linear-gradient(100deg, rgba(10,11,12,.80) 0%, rgba(10,11,12,.42) 55%, rgba(10,11,12,.28) 100%),
    url("img/tanks.jpg"),
    repeating-linear-gradient(112deg, rgba(255,255,255,.028) 0 52px, rgba(255,255,255,0) 52px 150px),
    linear-gradient(150deg, #2A2E35 0%, #15171B 60%, #0C0D0F 100%);
}
.band--field {
  background-image:
    linear-gradient(100deg, rgba(10,11,12,.82) 0%, rgba(10,11,12,.50) 60%, rgba(10,11,12,.32) 100%),
    url("img/field.jpg"),
    repeating-linear-gradient(112deg, rgba(255,255,255,.032) 0 52px, rgba(255,255,255,0) 52px 150px),
    linear-gradient(150deg, #31261B 0%, #1A1512 60%, #0C0B0A 100%);
}
.band h2 { font-size: clamp(2.1rem, 5.4vw, 4rem); max-width: 16ch; }
.band p { color: rgba(255,255,255,.8); max-width: 54ch; margin-top: 22px; }

/* ---------- Grids ---------- */

.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px)  { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px)  { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.split {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Cards ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 34px);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -22px rgba(11,11,12,.45);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .97rem; }

.card--flat { background: var(--soft); border-color: transparent; }
.card--flat:hover { border-color: var(--line); }

.card-num {
  font-size: .8rem; font-weight: 800; letter-spacing: .14em;
  color: var(--accent); display: block; margin-bottom: 16px;
}

.card-icon {
  width: 42px; height: 42px; margin-bottom: 20px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--soft-2); color: var(--ink);
}
.card-icon svg { width: 21px; height: 21px; }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.section--ink .stats { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.14); }
.stat { background: var(--paper); padding: clamp(24px, 3vw, 34px); }
.section--ink .stat { background: var(--ink); }
.stat-num {
  font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1; display: block; margin-bottom: 10px;
}
.stat-num--sm { font-size: clamp(1.7rem, 2.7vw, 2.3rem); letter-spacing: -0.035em; }
.stat-label { font-size: .84rem; font-weight: 600; color: var(--muted); letter-spacing: .01em; line-height: 1.4; }
.section--ink .stat-label { color: rgba(255,255,255,.62); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ---------- Asset / project list ---------- */

.assetlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.section--ink .assetlist { border-color: rgba(255,255,255,.16); }
.assetlist li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: baseline;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}
.section--ink .assetlist li { border-color: rgba(255,255,255,.16); }
.assetlist .depth {
  font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: .95rem; letter-spacing: -.02em;
  color: var(--accent); min-width: 66px;
}
.assetlist .desc { font-weight: 600; letter-spacing: -.012em; }
.assetlist .basin { font-size: .86rem; color: var(--muted); text-align: right; white-space: nowrap; }
.section--ink .assetlist .basin { color: rgba(255,255,255,.62); }
@media (max-width: 720px) {
  .assetlist li { grid-template-columns: auto 1fr; }
  .assetlist .basin { grid-column: 1 / -1; text-align: left; margin-top: 2px; }
}

/* ---------- Checklist ---------- */

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: 10px; height: 10px; background: var(--accent); border-radius: 2px;
  transform: skewX(-20deg);
}
.checks strong { font-weight: 700; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 72px); align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-item:first-child { border-top: 1px solid var(--line); }
.contact-item dt { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact-item dd { margin: 0; font-size: 1.06rem; font-weight: 600; letter-spacing: -.015em; }
.contact-item dd a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-item dd a:hover { border-color: var(--accent); color: var(--accent-dk); }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem;
  padding: 13px 15px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(181,118,47,.16);
}
.form-note { font-size: .84rem; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: clamp(52px, 6vw, 76px) 0 34px; }
.site-footer .logo-text { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 5vw, 56px); }
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

.footer-brand p { margin-top: 18px; max-width: 38ch; font-size: .95rem; color: rgba(255,255,255,.62); }
.footer-col h4 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 700; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { text-decoration: none; font-size: .95rem; color: rgba(255,255,255,.78); transition: color var(--t); }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: clamp(38px, 5vw, 60px); padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between;
  font-size: .84rem; color: rgba(255,255,255,.5);
}

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }

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

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

.page-hero { padding: clamp(56px, 7vw, 96px) 0 clamp(36px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); max-width: 18ch; }
.page-hero .lede { margin-top: 22px; }

/* ---------- Comparison table ---------- */

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ctable {
  width: 100%; min-width: 660px;
  border-collapse: collapse;
  font-size: .95rem;
}
.ctable th, .ctable td {
  text-align: left; vertical-align: top;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--line);
}
.ctable thead th {
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 800; color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
}
.ctable thead th:first-child { color: var(--muted); font-weight: 700; }
.ctable tbody th {
  font-weight: 700; color: var(--ink); width: 21%;
  letter-spacing: -.01em;
}
.ctable tbody td { color: var(--muted); width: 26.3%; }
.ctable tbody tr:last-child th, .ctable tbody tr:last-child td { border-bottom: 0; }
.ctable .yes { color: var(--accent); font-weight: 700; }

/* ---------- Pull quote ---------- */

.pull {
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 700; letter-spacing: -.025em; line-height: 1.28;
  color: var(--ink); max-width: 30ch;
  border-left: 3px solid var(--accent); padding-left: clamp(20px, 2.5vw, 30px);
}
.section--ink .pull { color: #fff; }

/* ---------- Tag pill ---------- */

.tagpill {
  display: inline-block; vertical-align: middle;
  margin-left: 8px;
  font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-dk); background: var(--soft-2);
  border-radius: 999px; padding: 4px 10px;
  position: relative; top: -2px;
}
.card--flat .tagpill { background: var(--paper); }

/* ---------- Figure ---------- */

.figure {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(14px, 2.5vw, 30px);
}
.figure img { width: 100%; height: auto; border-radius: 2px; }
.figure figcaption {
  margin-top: 16px; font-size: .84rem; color: var(--muted);
}

/* ---------- Extra band image ---------- */

.band--facility {
  background-image:
    linear-gradient(100deg, rgba(10,11,12,.80) 0%, rgba(10,11,12,.46) 58%, rgba(10,11,12,.30) 100%),
    url("img/facility.jpg"),
    repeating-linear-gradient(112deg, rgba(255,255,255,.028) 0 52px, rgba(255,255,255,0) 52px 150px),
    linear-gradient(150deg, #2A2E35 0%, #15171B 60%, #0C0D0F 100%);
  background-size: cover;
  background-position: center 62%;
}

.band--aerial {
  background-image:
    linear-gradient(100deg, rgba(8,7,6,.88) 0%, rgba(8,7,6,.62) 52%, rgba(8,7,6,.38) 100%),
    url("img/aerial.jpg"),
    linear-gradient(150deg, #3A2E22 0%, #211A13 60%, #0E0B08 100%);
  background-size: cover;
  background-position: center 45%;
}

.band--section {
  background-image:
    linear-gradient(100deg, rgba(10,11,12,.93) 0%, rgba(10,11,12,.82) 50%, rgba(10,11,12,.70) 100%),
    url("img/log-section.png"),
    linear-gradient(150deg, #23262B 0%, #15171B 60%, #0C0D0F 100%);
  background-size: cover;
  background-position: center;
}
