:root {
  --black: #141312;
  --paper: #f8f7f3;
  --white: #ffffff;
  --gold: #c79a32;
  --text: #24221f;
  --muted: #625d52;
  --line: #d9d4c7;
  --soft: #eee9dd;
  --blue: #2e6f9e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Avenir Next, Inter, Helvetica Neue, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--black);
  color: var(--white);
  font-weight: 800;
  transform: translateY(-140%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.inline-link {
  display: inline-block;
  color: var(--black);
  font-weight: 800;
  border-bottom: 2px solid var(--gold);
}

.band .inline-link {
  color: var(--paper);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 247, 243, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav {
  max-width: 1180px;
  min-height: 74px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand img {
  width: 252px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.nav-links a {
  color: #35312b;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--black);
  border-radius: 6px;
  background: var(--black);
  color: var(--white);
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
}

.button.secondary {
  background: transparent;
  color: var(--black);
}

.page-hero .button.secondary,
.band .button.secondary,
.cta .button.secondary {
  border-color: rgba(248, 247, 243, 0.72);
  color: var(--paper);
}

.button.gold {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
  box-shadow: inset 0 -4px 0 var(--gold);
}

main {
  overflow-x: hidden;
  overflow-y: visible;
}

section {
  padding: 74px 28px;
  scroll-margin-top: 96px;
}

.inner {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: center;
  background: var(--black);
  color: var(--paper);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 19, 18, 0.95) 0%, rgba(20, 19, 18, 0.78) 54%, rgba(20, 19, 18, 0.28) 100%),
    var(--hero-image, url("photos/photo-hero-refinery-overview.webp")) var(--hero-position, center) / var(--hero-size, cover) no-repeat;
  transform: scale(1.01);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 10px;
  background: var(--gold);
}

.page-hero .inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
}

h1, h2, h3 {
  margin: 0;
  color: var(--black);
  line-height: 1.06;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  color: var(--white);
  font-size: 52px;
  font-weight: 850;
}

h2 {
  font-size: 36px;
  font-weight: 820;
}

h3 {
  font-size: 21px;
  font-weight: 780;
}

.lead {
  max-width: 790px;
  margin: 24px 0 0;
  color: #eee9dd;
  font-size: 20px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.actions.compact {
  margin-top: 22px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 54px;
  align-items: start;
}

.split > * {
  min-width: 0;
}

.section-intro {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.card::before {
  content: "";
  display: block;
  width: 38px;
  height: 5px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--gold);
}

.card:nth-child(even)::before {
  background: var(--blue);
}

.card p,
.card li {
  color: var(--muted);
  font-size: 15px;
}

.card p {
  margin: 12px 0 0;
}

.card .inline-link {
  margin-top: 12px;
}

.card ul {
  margin: 14px 0 0;
  padding-left: 19px;
}

.intake-form {
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field.full,
.form-grid > .full {
  grid-column: 1 / -1;
}

.form-field label,
.checkbox-list legend,
.consent-panel legend {
  color: var(--black);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.25;
}

.checkbox-list legend,
.consent-panel legend {
  max-width: 100%;
  padding: 0 6px;
  white-space: normal;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.human-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.32fr);
  gap: 10px;
  align-items: center;
}

.human-check-row span {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4efe4;
  color: var(--black);
  font-weight: 760;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.form-hint,
.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.checkbox-list,
.consent-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkbox-list {
  grid-column: 1 / -1;
  background: #fffdf8;
}

.consent-panel {
  border-color: #d0bd8f;
  background: #fbf4e3;
}

.checkbox-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.checkbox-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.checkbox-item input {
  margin-top: 4px;
  accent-color: var(--gold);
}

.checkbox-item .inline-link {
  display: inline-block;
  white-space: nowrap;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.form-status {
  flex-basis: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.form-status strong {
  color: var(--black);
}

.form-status.success {
  border-color: rgba(46, 111, 158, 0.35);
  background: #eef5fa;
}

.form-status.error {
  border-color: #d0bd8f;
  background: #fbf4e3;
}

.intake-form .button {
  cursor: pointer;
}

.intake-form .button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.routine-steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.routine-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.routine-step::before {
  content: counter(step);
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 800;
  box-shadow: inset 0 -4px 0 var(--gold);
}

.routine-step strong {
  display: block;
  color: var(--black);
}

.routine-step span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.band {
  background: var(--black);
  color: var(--paper);
}

.band h2,
.band h3 {
  color: var(--paper);
}

.band .section-intro,
.band .card p,
.band .card li {
  color: #EEE9DD;
}

.band .card {
  border-color: #34312b;
  background: #191919;
}

.visual-card {
  margin: 36px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.visual-card figcaption {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.value-chain-visual {
  margin-top: 0;
  border-color: #34312b;
  background: var(--black);
}

.value-chain-visual img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
}

.value-chain-visual figcaption {
  display: grid;
  gap: 12px;
  border-top-color: rgba(248, 247, 243, 0.16);
  background: var(--black);
  color: #eee9dd;
}

.value-chain-caption {
  display: block;
}

.value-chain-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.value-chain-steps span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.value-chain-steps strong {
  color: var(--white);
  font-size: 13px;
  line-height: 1.2;
}

.value-chain-steps em {
  color: #cfc9bb;
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
}

.read-more {
  border-top: 1px solid var(--line);
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.reference-card {
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.reference-card.featured {
  border-color: rgba(199, 154, 50, 0.55);
  background: #fffaf0;
}

.reference-meta {
  margin-bottom: 12px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.reference-card h3 {
  margin-bottom: 12px;
}

.reference-card p {
  color: var(--muted);
  font-size: 15px;
}

.reference-card .inline-link {
  margin-top: 16px;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.photo-tile {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-tile figcaption {
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.timeline-item {
  padding: 18px 20px;
  border-left: 5px solid var(--gold);
  background: var(--white);
}

.timeline-item strong {
  display: block;
  color: var(--black);
}

.timeline-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 15px;
}

.cta {
  background: var(--black);
  color: var(--paper);
  text-align: center;
}

.cta h2 {
  color: var(--white);
}

.cta p {
  max-width: 720px;
  margin: 18px auto 0;
  color: #EEE9DD;
  font-size: 18px;
}

.site-footer {
  background: #0f0f0f;
  color: #EEE9DD;
  padding: 44px 28px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 34px;
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 12px;
}

.footer-logo img {
  width: 204px;
}

.footer-slogan {
  color: var(--white);
  font-size: 17px;
  font-weight: 820;
  line-height: 1.25;
}

.footer-disclaimer,
.footer-copy {
  max-width: 640px;
  margin: 0;
  color: #d5d0c4;
  font-size: 13px;
  line-height: 1.5;
}

.footer-copy {
  color: #a9a397;
}

.footer-actions {
  display: grid;
  justify-items: end;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.footer-links a {
  color: #EEE9DD;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid rgba(199, 154, 50, 0.6);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(238, 233, 221, 0.34);
  border-radius: 50%;
  color: #EEE9DD;
  text-decoration: none;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.footer-social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

@media (max-width: 1020px) {
  .split {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid.two,
  .reference-grid,
  .photo-strip,
  .form-grid,
  .checkbox-options,
  .human-check-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 16px;
  }

  section {
    padding: 56px 20px;
  }

  .nav {
    min-height: auto;
    padding: 10px 20px 12px;
    width: 100%;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .brand img {
    width: 160px;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px 16px;
    font-size: 14px;
    white-space: normal;
  }

  .nav-links a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .page-hero .inner,
  .inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .page-hero,
  section {
    width: 100%;
    max-width: 100vw;
  }

  .page-hero h1,
  h1 {
    width: min(320px, calc(100vw - 40px));
    max-width: min(320px, calc(100vw - 40px));
    font-size: 27px;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: normal;
  }

  h2 {
    width: min(350px, calc(100vw - 40px));
    max-width: min(350px, calc(100vw - 40px));
    font-size: clamp(26px, 7.6vw, 30px);
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  .page-hero .lead,
  .lead,
  .section-intro,
  .split > div > p,
  .reference-card p,
  .card p,
  .card li,
  .visual-card figcaption,
  .cta p,
  .site-footer p {
    width: min(320px, calc(100vw - 40px));
    max-width: min(320px, calc(100vw - 40px));
    font-size: 16px;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  .reference-card,
  .card,
  .visual-card {
    max-width: min(350px, calc(100vw - 40px));
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    max-width: min(320px, calc(100vw - 40px));
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .card-grid,
  .card-grid.two,
  .reference-grid,
  .photo-strip,
  .form-grid,
  .checkbox-options,
  .human-check-row,
  .value-chain-steps,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-actions,
  .footer-social,
  .footer-links {
    justify-items: start;
    justify-content: flex-start;
  }
}
