/* ==========================================================================
   PERMIAN H2O — Design System
   Dark / editorial / West Texas water. No gold. Blue accent only.
   Display: Fraunces (serif, italic emphasis)
   Body:    Inter
   Utility: IBM Plex Mono (eyebrows, data, labels)
   Signature: the "waterline" — a rising horizontal divider between sections
   ========================================================================== */

:root {
  /* ---- color ---- */
  --bg:            #0a0d12;   /* base near-black */
  --bg-panel:      #0e131b;   /* section panel, one step up */
  --bg-panel-alt:  #121a24;   /* deeper navy panel, alt sections */
  --bg-raised:     #161f2b;   /* cards, form fields */
  --line:          #212b38;   /* hairline borders */
  --line-soft:     #1a222d;

  --text:          #eef1f5;   /* primary copy */
  --text-dim:      #93a1b0;   /* secondary copy */
  --text-faint:    #5c6b7c;   /* tertiary / fine print */

  --accent:        #4f8fe0;   /* primary blue */
  --accent-bright: #8ec1ff;   /* hover / highlight */
  --accent-dim:    #1f3350;   /* blue fill, low opacity feel */
  --accent-line:   #2c4a6e;   /* blue-tinted border */

  /* ---- type ---- */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* ---- rhythm ---- */
  --container: 1120px;
  --container-narrow: 720px;
  --gap-section: clamp(72px, 11vw, 140px);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- accessibility ---- */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--accent);
  color: #05080c;
  padding: 12px 20px;
  z-index: 999;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.wrap--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- eyebrow / labels ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ---- headings ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 400; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; font-family: var(--font-body); }
em, .accent-italic {
  font-style: italic;
  color: var(--accent-bright);
  font-family: var(--font-display);
}

p { color: var(--text-dim); margin: 0 0 16px; }
p.lead { font-size: 19px; color: var(--text-dim); max-width: 640px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 16px 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--accent-line);
  color: var(--accent-bright);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #05080c; }
.btn--solid { background: var(--accent); color: #05080c; border-color: var(--accent); }
.btn--solid:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.btn--ghost { border-color: var(--line); color: var(--text-dim); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-bright); background: transparent; }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* ---- header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

/* brand: base rule used by footer (fixed small logo); header overrides to fill nav height */
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 34px; width: auto; }

.site-header .brand { height: 100%; padding: 14px 0; }
.site-header .brand img { height: 100%; max-height: 56px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a { color: var(--text-dim); transition: color 0.2s ease; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 1px;
  background: var(--accent);
}
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 1px; background: var(--text); display: block; }

/* ---- hero ---- */
.hero {
  padding: 96px 0 var(--gap-section);
  position: relative;
  overflow: hidden;
}
.hero-media {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 56px;
}
.hero-media img { width: 100%; height: auto; display: block; filter: saturate(0.85) contrast(1.05); }
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,13,18,0) 55%, rgba(10,13,18,0.9) 100%);
  pointer-events: none;
}

/* ---- waterline (signature divider) ---- */
.waterline {
  position: relative;
  height: 64px;
  overflow: hidden;
}
.waterline svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; animation: waterline-drift 18s linear infinite; }
.waterline .w1 { opacity: 0.35; animation-duration: 22s; }
.waterline .w2 { opacity: 0.6; animation-duration: 14s; animation-direction: reverse; }
@keyframes waterline-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- sections ---- */
.section { padding: var(--gap-section) 0; }
.section--panel { background: var(--bg-panel); }
.section--alt { background: var(--bg-panel-alt); }
.section-head { max-width: 640px; margin: 0 0 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- benefit / feature grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid-item {
  background: var(--bg-panel);
  padding: 40px 36px;
}
.section--alt .grid-item, .section--alt .grid { background-color: var(--bg-panel-alt); }
.grid-item .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 18px;
}
.grid-item h3 { margin-bottom: 10px; }
.grid-item p { margin: 0; font-size: 15px; }

/* ---- steps ---- */
.steps { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.step {
  display: flex;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.step .num { font-family: var(--font-mono); color: var(--accent); font-size: 14px; min-width: 40px; }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; }

/* ---- image + text split ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media { border: 1px solid var(--line); overflow: hidden; }
.split-media img { width: 100%; }
.split-media img, .hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: cover;
}

/* ---- benefit list ---- */
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.feature-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
}
.feature-list li:first-child { border-top: 1px solid var(--line); }
.feature-list .mark { color: var(--accent); font-family: var(--font-mono); font-size: 13px; padding-top: 3px; }
.feature-list strong { display: block; color: var(--text); margin-bottom: 3px; }
.feature-list span.desc { color: var(--text-dim); font-size: 14.5px; }

/* ---- FAQ (accordion) ---- */
.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 24px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 4px 24px; margin: 0; max-width: 720px; }

/* ---- badges / trust row ---- */
.badge-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.badge {
  width: 92px; height: 92px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 8px;
}

/* ---- testimonial / quote ---- */
.quote-card {
  border: 1px solid var(--line);
  padding: 32px;
  background: var(--bg-panel);
}
.quote-card p { color: var(--text); font-size: 17px; font-family: var(--font-display); font-style: italic; }
.quote-card .who { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- stat strip ---- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 32px 24px; border-right: 1px solid var(--line); text-align: center; }
.stat:last-child { border-right: none; }
.stat .value { font-family: var(--font-display); font-style: italic; font-size: 34px; color: var(--accent-bright); display: block; margin-bottom: 6px; }
.stat .label { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }

/* ---- CTA band ---- */
.cta-band {
  border: 1px solid var(--accent-line);
  background: radial-gradient(circle at 20% 20%, var(--accent-dim), transparent 60%), var(--bg-panel-alt);
  padding: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin: 0; }

/* ---- form ---- */
.form-card {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 48px;
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--radius);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 26px; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.checkbox-row label { font-size: 14px; color: var(--text-dim); font-family: var(--font-body); text-transform: none; letter-spacing: normal; }
.checkbox-group { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.checkbox-group .checkbox-row { margin-bottom: 0; }
.form-note { font-size: 12.5px; color: var(--text-faint); margin-top: 18px; }

/* ---- contact info rows ---- */
.info-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-row .k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); width: 90px; flex-shrink: 0; }
.info-row .v { color: var(--text); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--bg-panel); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin: 0 0 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: var(--text-dim); font-size: 14.5px; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--accent-bright); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
}
.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover { color: var(--accent); }
.social-row { display: flex; gap: 14px; }
.social-row a {
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-row a:hover { border-color: var(--accent); color: var(--accent-bright); }
.disclosure { font-size: 12.5px; color: var(--text-faint); max-width: 640px; margin: 24px 0 0; }

/* ---- product page bits ---- */
.spec-table { width: 100%; border-collapse: collapse; margin: 0; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table td { padding: 16px 0; font-size: 14.5px; }
.spec-table td:first-child { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; width: 40%; }
.spec-table td:last-child { color: var(--text); }

.price-tag { font-family: var(--font-display); font-style: italic; font-size: 28px; color: var(--accent-bright); }

/* ---- utility ---- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* ---- reveal-on-scroll ---- */
.reveal { transform: translateY(16px); opacity: 0.001; transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
/* Safety net: if JS never runs (or runs after paint delay), don't leave real content invisible */
.no-js .reveal, .reveal { animation: reveal-fallback 0s 1.2s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) and (min-width: 901px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links--open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    position: absolute;
    top: 84px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 28px;
  }
  .nav-toggle { display: flex; }
  .grid, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .cta-band { padding: 40px 28px; flex-direction: column; align-items: flex-start; }
  .form-card { padding: 28px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header .wrap { height: 72px; }
  .nav-links--open { top: 72px; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: none; }
  .hero { padding: 64px 0 var(--gap-section); }
  .cta-band { padding: 32px 20px; }
  .faq-item summary { font-size: 15.5px; }
}
