/* =================================================================
   Reliant Drilling - Design System
   ================================================================= */

:root {
  --navy:       #0B1F3A;
  --navy-deep:  #071526;
  --navy-soft:  #132a4a;
  --water:      #2E7DB5;
  --water-deep: #246492;
  --earth:      #6B4F3A;
  --sand:       #E8E4DC;
  --mist:       #F4F6F8;
  --line:       #D5DCE3;
  --fog:        #5A6672;
  --ink:        #1A2430;
  --white:      #ffffff;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body:    "Source Sans 3", "Segoe UI", sans-serif;

  --maxw: 1320px;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 200;
  width: auto; height: auto; clip: auto; padding: 0.75rem 1rem;
  background: var(--navy); color: #fff;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--water);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--water);
}
.section-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin: 0.55rem 0 1rem;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--fog); max-width: 58ch; }
.muted { color: var(--fog); }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.site-header .wrap {
  width: 100%;
  max-width: none;
  padding-inline: clamp(1.25rem, 3.5vw, 2.75rem);
  box-sizing: border-box;
}
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section.tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section--mist { background: var(--mist); }
.section--navy {
  background:
    linear-gradient(160deg, rgba(11,31,58,0.92) 0%, rgba(7,21,38,0.88) 100%),
    url("../img/service-truck.png") center/cover;
  color: rgba(255,255,255,0.9);
}
.section--navy h2,
.section--navy h3 { color: #fff; }
.section--navy .lead,
.section--navy .muted { color: rgba(255,255,255,0.78); }
.section--navy .eyebrow { color: #8ec8eb; }
.section--navy .eyebrow::before { background: #8ec8eb; }
.sec-head { max-width: 58ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.center { text-align: center; }
.sec-head.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.98rem;
  line-height: 1.1;
  white-space: nowrap;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--water);
  color: #fff;
}
.btn--primary:hover { background: var(--water-deep); }
.btn--ghost {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.14);
}
.btn--outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn--outline:hover {
  background: var(--navy);
  color: #fff;
}

/* ---------- Header / Nav ---------- */
.site-header {
  --header-bar: 72px;
  --logo-size: 160px;
  --logo-overhang: calc((var(--logo-size) - var(--header-bar)) / 2);

  position: sticky;
  top: 0;
  z-index: 100;
  /* Navy fills the top overhang so the mark isn't clipped or see-through on scroll */
  padding-top: var(--logo-overhang);
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: visible;
  transition: box-shadow 0.35s;
}
.site-header.scrolled {
  box-shadow: 0 12px 32px -18px rgba(0,0,0,0.55);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-bar);
  padding: 0;
  position: relative;
  z-index: 1;
}
.nav-menu--left {
  justify-content: flex-end;
  justify-self: end;
}
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  justify-self: start;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand--center {
  position: relative;
  z-index: 5;
  /* Pop above + below the navy bar; top overhang fits in header padding */
  margin-top: calc(var(--logo-overhang) * -1);
  margin-bottom: calc(var(--logo-overhang) * -1);
}
.brand-logo {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45));
  transition: transform 0.35s var(--ease);
}
.brand--center:hover .brand-logo {
  transform: scale(1.04);
}
.site-footer .brand--center { margin-block: 0; }
.site-footer .brand-logo {
  width: 88px;
  height: 88px;
  filter: none;
}
.site-footer .brand-text { display: flex; flex-direction: column; line-height: 1; }
.site-footer .brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-footer .brand-sub {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9fd0ef;
  margin-top: 3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}
.nav-menu a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.82);
  transition: color 0.25s, background 0.25s;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.nav-actions { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.nav-actions .btn--primary { padding: 0.7rem 1.1rem; white-space: nowrap; }

.nav-drawer { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 0px);
  display: flex;
  align-items: center;
  /* sticky header sits in flow; less top padding needed than with fixed */
  padding-top: clamp(2rem, 5vh, 3.5rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}
.hero .wrap {
  width: min(100% - 2.5rem, 1400px);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* favor the rig + ground work, less empty sky */
  object-position: 62% 72%;
  transform: scale(1.03);
  transition: transform 8s var(--ease);
}
.hero-bg img.hero-ready { transform: scale(1); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(7,21,38,0.78) 0%, rgba(7,21,38,0.45) 42%, rgba(7,21,38,0.18) 72%, rgba(7,21,38,0.3) 100%),
    linear-gradient(180deg, rgba(7,21,38,0.2) 0%, transparent 40%, rgba(7,21,38,0.4) 100%);
}
.hero-inner {
  max-width: min(58rem, 100%);
  padding: clamp(1.25rem, 3vw, 2rem) 0;
}
.hero .eyebrow {
  color: #9fd0ef;
  margin-bottom: 0.85rem;
}
.hero .eyebrow::before { background: #9fd0ef; }
.hero h1 {
  font-size: clamp(3.15rem, 8.8vw, 5.65rem);
  letter-spacing: 0.02em;
  margin: 0 0 0.85rem;
  color: #fff;
  font-weight: 800;
  line-height: 0.95;
  max-width: 20ch;
}
.hero-inner > p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 38ch;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
}
.hero-license {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.72);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }

/* ---------- Split / About ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split--rev > :first-child { order: 2; }
.split-media {
  position: relative;
  min-height: clamp(320px, 48vw, 520px);
  overflow: hidden;
}
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  position: absolute;
  inset: 0;
}
.split-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(7,21,38,0.35));
  pointer-events: none;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; padding: 1.6rem 0.75rem; }
.stat .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--navy);
  text-transform: uppercase;
}
.stat .num .accent { color: var(--water); }
.stat .label {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
}

/* ---------- Services list ---------- */
.svc-list { display: grid; gap: 0; }
.svc-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.svc-row:first-child { border-top: 1px solid var(--line); }
.svc-row:hover { background: rgba(46,125,181,0.04); }
.svc-thumb {
  width: 140px;
  height: 96px;
  overflow: hidden;
}
.svc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s var(--ease);
}
.svc-row:hover .svc-thumb img { transform: scale(1.06); }
.svc-row h3 {
  font-size: 1.55rem;
  margin-bottom: 0.35rem;
}
.svc-row p { color: var(--fog); max-width: 52ch; font-size: 0.98rem; }
.svc-link {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--water);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Service detail blocks */
.svc-detail {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--line);
}
.svc-detail:last-child { border-bottom: 0; }
.svc-detail:nth-child(even) .svc-detail-media { order: 2; }
.svc-detail-media {
  min-height: clamp(280px, 40vw, 420px);
  overflow: hidden;
  position: relative;
}
.svc-detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.svc-detail h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0.4rem 0 0.85rem;
}
.svc-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: var(--water);
}

/* ---------- Areas ---------- */
.area-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  margin-top: 1.5rem;
}
.area-cloud span {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--navy-soft);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:nth-child(1),
.gallery-item:nth-child(6) {
  grid-row: span 1;
}
.work-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.work-strip a {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.work-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.work-strip a:hover img { transform: scale(1.06); }

/* ---------- Page hero ---------- */
.page-hero {
  padding: clamp(4.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  background:
    linear-gradient(180deg, rgba(11,31,58,0.08), transparent),
    var(--mist);
}
.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0.4rem 0 0.8rem;
}
.breadcrumbs {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 1rem;
}
.breadcrumbs a:hover { color: var(--water); }

/* ---------- CTA ---------- */
.cta-band {
  background: var(--navy);
  color: rgba(255,255,255,0.9);
}
.cta-band h2 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  max-width: 18ch;
}
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-list { display: grid; gap: 1.15rem; margin-top: 1.5rem; }
.contact-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.ci-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(46,125,181,0.1);
  color: var(--water);
  flex-shrink: 0;
}
.ci-icon svg { width: 20px; height: 20px; }
.ci-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
}
.ci-value {
  font-weight: 600;
  color: var(--navy);
  display: block;
  margin-top: 0.15rem;
}
a.ci-value:hover { color: var(--water); }

.form {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--mist);
  border: 1px solid var(--line);
}
.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--navy);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(46,125,181,0.35);
  border-color: var(--water);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.9rem; color: var(--fog); margin-top: 0.25rem; }
.form-success {
  padding: 1.75rem;
  background: rgba(46,125,181,0.08);
  border: 1px solid rgba(46,125,181,0.25);
}
.form-error {
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: rgba(183,54,54,0.07);
  border: 1px solid rgba(183,54,54,0.28);
}
.form-error p { margin: 0; }
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.78);
  padding: clamp(3.5rem, 7vw, 5rem) 0 1.75rem;
}
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: #9fd0ef; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-about p { margin-top: 1rem; max-width: 36ch; font-size: 0.98rem; }
.site-footer h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}
.f-links { display: grid; gap: 0.45rem; }
.f-links a:hover { color: #9fd0ef; }
.footer-area { font-size: 0.95rem; max-width: 28ch; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-bg img { transition: none; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .site-header {
    --logo-size: 140px;
  }
  .nav-menu a { padding: 0.4rem 0.55rem; font-size: 0.92rem; }
}

@media (max-width: 980px) {
  .site-header {
    --header-bar: 64px;
    --logo-size: 120px;
  }
  .nav {
    grid-template-columns: 1fr auto auto;
  }
  .nav-menu--left,
  .nav-menu--right { display: none; }
  .nav-right {
    justify-self: end;
    grid-column: 3;
  }
  .brand--center {
    grid-column: 2;
  }
  .nav-toggle { display: flex; z-index: 95; }

  .nav-drawer {
    display: block;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(300px, 84vw);
    padding: 5.5rem 1.25rem 2rem;
    background: var(--navy);
    transform: translateX(105%);
    transition: transform 0.35s var(--ease);
    z-index: 90;
    border-left: 1px solid rgba(255,255,255,0.08);
  }
  .nav-open .nav-drawer { transform: none; }
  .nav-menu--mobile {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .nav-menu--mobile a { padding: 0.75rem 0.85rem; }

  .split,
  .split--rev,
  .contact-grid,
  .svc-detail,
  .svc-detail:nth-child(even) .svc-detail-media { grid-template-columns: 1fr; }
  .split--rev > :first-child,
  .svc-detail:nth-child(even) .svc-detail-media { order: 0; }
  .svc-row { grid-template-columns: 100px 1fr; }
  .svc-link { display: none; }
  .stats { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .work-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header {
    --logo-size: 104px;
  }
  .nav-actions .btn--primary {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
  }
  .hero h1 { font-size: clamp(2.65rem, 12vw, 3.7rem); }
  .hero { align-items: flex-end; padding-bottom: 3rem; }
  .svc-row { grid-template-columns: 1fr; }
  .svc-thumb { width: 100%; height: 180px; }
  .gallery-grid,
  .work-strip { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
