:root {
  --bg: #060b12;
  --bg-soft: #10161e;
  --panel: #0b1118;
  --panel-light: #f4f4f2;
  --panel-mid: #1b232d;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.82);
  --text-dark: #1a1f26;
  --text-dark-soft: rgba(26, 31, 38, 0.78);
  --gold: #d7b36a;
  --gold-soft: #e4c98e;
  --line: rgba(255,255,255,0.12);
  --line-dark: rgba(0,0,0,0.08);
  --content: 1180px;
  --radius: 6px;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
  --page-buffer: 7vw;
  --scaling-factor: 100vw;
  --scrollbar-width: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
p { margin: 0; line-height: 1.8; }
h1, h2, h3, .hero-mark, .section-kicker, .card-kicker, .stat-value, .number-value {
  font-family: "Montserrat", sans-serif;
}

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
}

.site-header-inner,
.section-inner,
.hero-inner,
.site-footer-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: var(--page-buffer);
  padding-right: var(--page-buffer);
}

.site-header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand img,
.footer-logo {
  display: block;
  width: auto;
  height: 70px;
}

.footer-logo {
  height: 42px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a,
.nav-menu {
  color: rgba(255,255,255,0.9);
}

.nav-contact {
  background: rgba(255,255,255,0.96);
  color: #161a20 !important;
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  font-weight: 700;
}

.nav-menu {
  font-size: 1.4rem;
  line-height: 1;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-subpage {
  min-height: 78vh;
}

.hero-bg,
.hero-overlay,
.section-image-bg,
.section-image-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg,
.section-image-bg {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transform: scale(1.02);
}

.hero-bg-home { background-image: url("../media/brand/workstation-hero.jpg"); background-position: center center; }
.hero-bg-about { background-image: url("../media/brand/tree-lightbulb.jpg"); background-position: center 18%; }
.hero-bg-tech { background-image: url("../media/brand/data-city.jpg"); background-position: center center; }

.hero-overlay-home {
  background: linear-gradient(90deg, rgba(10, 9, 10, 0.22) 0%, rgba(10, 9, 10, 0.08) 36%, rgba(10, 9, 10, 0.02) 68%, rgba(10, 9, 10, 0.02) 100%);
}

.hero-overlay-warm {
  background: linear-gradient(90deg, rgba(14, 10, 7, 0.52) 0%, rgba(14, 10, 7, 0.34) 42%, rgba(14, 10, 7, 0.18) 100%);
}

.hero-overlay-dark {
  background: linear-gradient(90deg, rgba(8, 12, 18, 0.58) 0%, rgba(8, 12, 18, 0.36) 48%, rgba(8, 12, 18, 0.2) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 64px;
}

.hero-home .hero-inner {
  padding-top: 150px;
}

.hero-mark,
.section-kicker,
.card-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-mark,
.section-kicker { margin-bottom: 1rem; }

.hero h1 {
  max-width: 84%;
  margin: 0;
  font-size: max(36px, min(112px, max(0.5px, calc(0.0578124 * (var(--scaling-factor) - var(--scrollbar-width))))));
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 400;
}

.hero-title-desktop {
  max-width: 84%;
}

.hero-title-line {
  display: inline-block;
  white-space: normal;
}

.hero-title-desktop-lines {
  display: inline-block;
}

.hero-title-mobile-lines {
  display: none;
}

.hero-subtitle {
  max-width: 44rem;
  margin-top: 1.25rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.28rem);
}

.hero-proofline {
  margin-top: 1.6rem;
  max-width: 72%;
  font-size: 1.65rem;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.005em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.4rem;
  border-radius: 2px;
  border: 1px solid transparent;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.button-primary {
  background: rgba(255,255,255,0.92);
  color: #11161c;
}

.button-secondary {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.section {
  position: relative;
}

.section-inner {
  position: relative;
  z-index: 2;
  padding-top: 88px;
  padding-bottom: 88px;
}

.copy-block,
.text-panel,
.centered-copy,
.stats-panel,
.proof-grid,
.cards-grid,
.authority-grid,
.contact-grid,
.admin-dashboard-grid,
.admin-panel-wide {
  max-width: none;
}

.section-dark { background: var(--panel); color: var(--text); }
.section-light { background: var(--panel-light); color: var(--text-dark); }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 48px;
  align-items: start;
}

.copy-block h2,
.text-panel h2,
.centered-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.06;
  font-weight: 700;
}

#how-it-works-preview .section-kicker {
  color: rgba(255,255,255,0.65);
}

#how-it-works-preview .hiw-lead {
  max-width: 100%;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.3;
  color: rgba(255,255,255,0.88);
  margin: 0 0 1.25rem;
}

#how-it-works-preview .hiw-body {
  max-width: 100%;
}

.copy-block p,
.text-panel p,
.centered-copy p,
.info-card p {
  color: inherit;
}

.copy-block p + p,
.text-panel p + p {
  margin-top: 1rem;
}

.intro-band { background: linear-gradient(180deg, #0a1017 0%, #0f151d 100%); }

.stats-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  padding: 1.5rem 1.6rem;
}

.stat-row + .stat-row {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 1rem;
  padding-top: 1rem;
}

.stat-value,
.number-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.stat-label,
.number-label,
.team-degree {
  color: var(--text-soft);
}

.section-image {
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.section-image-bg {
  background-position: center center;
}

.section-image-overlay.warm {
  background: linear-gradient(90deg, rgba(15, 11, 8, 0.52) 0%, rgba(15, 11, 8, 0.24) 48%, rgba(15, 11, 8, 0.08) 100%);
}

.section-image-overlay.dark-gold {
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.46) 0%, rgba(6, 10, 16, 0.38) 100%);
}

.section-image-overlay.office {
  background: linear-gradient(90deg, rgba(12, 15, 16, 0.56) 0%, rgba(12, 15, 16, 0.28) 42%, rgba(12, 15, 16, 0.12) 100%);
}

.text-panel {
  max-width: 38rem;
}

#how-it-works-preview .text-panel {
  width: 65%;
  max-width: 65%;
}

.narrow-left {
  margin-right: auto;
}

.cards-grid {
  display: grid;
  gap: 24px;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.use-cases-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.objection-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.dark-card .card-kicker {
  color: var(--gold-soft);
}

.hero-home .hero-lead {
  margin-top: 1.35rem;
  max-width: 44rem;
  font-size: clamp(1rem, 1.75vw, 1.22rem);
  line-height: 1.65;
  color: var(--text-soft);
}

.hero-home .hero-lead strong {
  color: #fff;
  font-weight: 600;
}

.stats-panel .stat-value {
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.25;
}

.stack-two {
  grid-template-columns: 1fr;
}

.info-card {
  background: #fff;
  border: 1px solid var(--line-dark);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.info-card a {
  display: inline-block;
  margin-top: 1rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.dark-card {
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
  color: #fff;
  box-shadow: none;
}

.dark-card .team-degree,
.dark-card p {
  color: var(--text-soft);
}

.centered-copy {
  text-align: center;
}

.centered-copy h2 {
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}

.numbers-grid {
  display: grid;
  gap: 18px;
  margin-top: 2rem;
}

.compact-numbers {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.number-card {
  padding: 1.2rem 1rem;
  background: rgba(8,12,18,0.38);
  border: 1px solid rgba(255,255,255,0.12);
}

.image-card {
  min-height: 460px;
  background-size: cover;
  background-position: center center;
  box-shadow: var(--shadow);
}

.proof-strip {
  background: #f8f7f4;
}

.proof-grid,
.authority-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#landing-depth-optimization .proof-grid,
#landing-depth-optimization .landing-depth-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.landing-depth-intro-row {
  width: 100%;
  max-width: none;
  margin-bottom: 1.4rem;
}

/* Situation section */
#situation .situation-intro {
  margin-bottom: 2.2rem;
}

#situation .situation-intro h2 {
  max-width: 780px;
}

.situation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  align-items: start;
}

.situation-col-head {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.situation-lead {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.admin-panel--inset {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
  padding: 1.2rem 1.4rem;
}

.admin-panel--inset .list-card {
  border-top-color: rgba(255,255,255,0.12);
  color: var(--text-soft);
}

.admin-panel--inset .list-card strong {
  color: var(--text);
}

#landing-depth-optimization .proof-grid + .landing-depth-bottom-grid {
  margin-top: 18px;
}

#landing-depth-optimization .proof-card,
#landing-depth-optimization .proof-card--copy-only {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#landing-depth-optimization .proof-copy {
  flex: 1;
}

#landing-depth-optimization .proof-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  background: #fff;
}

#landing-depth-optimization [data-asset="103-10-20-frac-profile"] img,
#landing-depth-optimization [data-asset="s2-distance-overhead"] img,
#landing-depth-optimization [data-asset="103-10-20-well-profile"] img {
  height: auto;
}

.proof-card {
  background: #ffffff;
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.proof-card img {
  display: block;
  width: 100%;
  height: auto;
}

.proof-card--copy-only .proof-copy {
  padding-top: 1.35rem;
}

.clipped-proof-card {
  overflow: hidden;
}

.clipped-proof-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.leadership-grid {
  align-items: start;
}

.leadership-card h3 {
  margin: 0.4rem 0 0.25rem;
  font-size: 1.35rem;
  color: var(--text-dark);
}

.leadership-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 1rem;
  border: 1px solid rgba(0,0,0,0.06);
}

.proof-copy {
  padding: 1.15rem 1.2rem 1.3rem;
  color: var(--text-dark);
}

.equation-block {
  margin: 1.6rem 0 1.35rem;
  padding: 1.4rem 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  color: #fff;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.equation-block-strong {
  position: relative;
}

.equation-block-strong::before {
  content: "FIELD PRODUCTION CURVE";
  display: block;
  margin-bottom: 0.85rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.equation-block .katex-display {
  margin: 0;
  font-size: 1.22em;
}

/* KaTeX spans don’t always inherit parent color; keep math readable on light panels */
.equation-block.panel-light .katex,
.panel-light .equation-block .katex {
  color: var(--text-dark);
}

.panel-light .equation-block,
.equation-block.panel-light {
  background: linear-gradient(180deg, #ffffff, #f7f7f5);
  border-color: var(--line-dark);
  color: var(--text-dark);
}

.panel-light .equation-block-strong::before,
.equation-block-strong.panel-light::before {
  color: rgba(26,31,38,0.56);
}

.proof-copy h3 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
}

.proof-copy .proof-math-points {
  margin: 0.65rem 0 1rem;
  padding-left: 1.25rem;
  line-height: 1.65;
}

.proof-copy .proof-math-points li {
  margin: 0.35rem 0;
}

.proof-copy .proof-math-sub {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
  list-style: disc;
}

.authority-section {
  background: linear-gradient(180deg, #0a1118 0%, #0d141c 100%);
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

input, textarea {
  width: 100%;
  border: 1px solid rgba(26, 31, 38, 0.14);
  background: #fff;
  color: #1a1f26;
  padding: 0.9rem 1rem;
  font: inherit;
}

textarea { resize: vertical; }
.form-status { min-height: 1.5rem; color: var(--text-dark-soft); }

.admin-hero-section {
  background: linear-gradient(180deg, #081019 0%, #0c141d 100%);
}

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

.admin-panel {
  background: #ffffff;
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.admin-panel h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--text-dark);
}

.admin-panel p {
  color: var(--text-dark-soft);
}

.admin-panel-wide {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.list-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-dark);
}

.list-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.list-card strong,
.list-card strong a {
  color: var(--text-dark);
}

.list-card span,
.event-row span {
  color: var(--text-dark-soft);
  font-size: 0.95rem;
}

.site-footer {
  background: #070b10;
  color: var(--text-soft);
}

.site-footer-inner {
  padding-top: 32px;
  padding-bottom: 32px;
}

.site-footer p {
  margin-top: 0.9rem;
  max-width: 42rem;
}

.footer-privacy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.footer-privacy-links a,
.privacy-choice-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.privacy-choice-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.cookie-consent {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  width: min(94vw, 560px);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 1.1rem;
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent-copy {
  display: grid;
  gap: 0.45rem;
}

.cookie-consent-copy p {
  margin: 0;
  color: var(--text-dark-soft);
}

.cookie-consent-copy a {
  color: var(--text-dark);
  font-weight: 600;
}

.cookie-consent-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.privacy-policy {
  max-width: 860px;
}

.privacy-policy h3 {
  margin-top: 2rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-panel {
  opacity: 0;
  transform: perspective(1400px) rotateX(10deg) rotateZ(-4deg) translateY(60px);
  transform-origin: left top;
  transition: transform 1000ms cubic-bezier(0.22, 1, 0.36, 1), opacity 1000ms ease;
  will-change: transform, opacity;
}

.reveal-panel.in-view {
  opacity: 1;
  transform: perspective(1400px) rotateX(0deg) rotateZ(0deg) translateY(0);
}

/* Section headlines: same motion as legacy proof cards, without animating the image */
h2.reveal-panel {
  display: block;
}

.hero-copy-helix .helix-line {
  opacity: 0;
  display: inline-block;
  transform-origin: 0 50%;
  transform: perspective(900px) rotateX(68deg) rotateY(-18deg) translate3d(0, 42px, 0);
  filter: blur(5px);
}

/* Both spans have .helix-line; this beats .helix-line's display on desktop only */
.hero-copy-helix .hero-title-mobile-lines {
  display: none;
}

.hero-copy-helix.is-visible .helix-line {
  animation: helixIn 800ms cubic-bezier(0.22, 0.8, 0.2, 1) forwards;
}

@keyframes helixIn {
  from {
    opacity: 0;
    transform: perspective(900px) rotateX(68deg) rotateY(-18deg) translate3d(0, 42px, 0);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: perspective(900px) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal,
  .reveal-panel,
  .hero-copy-helix .helix-line {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (max-width: 980px) {
  .two-col,
  .three-up,
  .compact-numbers,
  .proof-grid,
  .authority-grid,
  .admin-dashboard-grid,
  #landing-depth-optimization .proof-grid,
  #landing-depth-optimization .landing-depth-bottom-grid {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    padding-top: 18px;
    padding-bottom: 18px;
    width: 100%;
    max-width: none;
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.9rem;
  }

  .cookie-consent {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions {
    justify-content: stretch;
  }

  .nav-contact {
    padding: 0.55rem 0.9rem;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-subpage {
    min-height: 68vh;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    max-width: 100%;
    font-size: max(36px, min(72px, max(0.5px, calc(0.09 * (var(--scaling-factor) - var(--scrollbar-width))))));
  }

  .hero-title-desktop-lines {
    display: none !important;
  }

  .hero-title-mobile-lines {
    display: inline-block !important;
  }

  .hero-proofline,
  .hero-home .hero-lead {
    max-width: 100%;
  }

  .hero-home .hero-lead {
    font-size: 0.94rem;
    margin-top: 0.9rem;
  }

  .brand img {
    height: 42px;
  }

  .footer-logo {
    height: 28px;
  }

  .hero-home .hero-inner {
    padding-top: 122px;
  }

  .hero-proofline {
    font-size: 0.94rem;
    margin-top: 0.9rem;
  }

  #landing-depth-optimization .proof-card img,
  #landing-depth-optimization [data-asset="103-10-20-frac-profile"] img,
  #landing-depth-optimization [data-asset="s2-distance-overhead"] img,
  #landing-depth-optimization [data-asset="103-10-20-well-profile"] img {
    height: auto;
  }

  .button {
    width: 100%;
  }
}
