/* Drill IQ landing page — styles */

:root {
  /* Ground */
  --bg:        #0e1b2a;
  --bg-alt:    #10202f;
  --footer-bg: #0b1624;
  --hairline:  rgba(150, 172, 196, 0.16);
  --rail:      rgba(150, 172, 196, 0.18);

  /* Ink */
  --serif-ink: #e8eef3;   /* display headlines */
  --ink:       #e6ecf1;   /* emphasised body */
  --muted:     #a3b3c2;   /* body copy */
  --muted-dim: #a3b3c2;   /* intros, secondary */
  --label:     #5f7286;   /* slate eyebrows / labels */

  /* Accent */
  --amber:      #edb24e;  /* buttons, ticks, dot */
  --amber-head: #e6a23c;  /* headline highlight */
  --amber-ink:  #12181f;  /* text on amber */

  --maxw: 1520px;
  --pad:  clamp(1.5rem, 6vw, 6.5rem);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

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

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;            /* centered: content stays in the middle, the empty space opens up on both sides as the viewport widens */
  padding-inline: var(--pad);
}

/* Nav and footer row: centered to the same width as the page content, so the
   brand lines up with the content's left edge while the bar behind it still
   spans the full viewport. */
.bleed {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---- Eyebrows / labels ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  flex: none;
}

.label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  margin: 0;
}
.label--slate { color: var(--label); }
.label--amber { color: var(--amber); }

/* ---- Headlines ---- */
h1, h2, h3 { font-family: var(--serif); color: var(--serif-ink); font-weight: 600; margin: 0; }
.balance { text-wrap: balance; }

.hl { color: var(--amber-head); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border: none;              /* some CTAs are <button> now, which has a default border */
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: #f2bf65; transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ================= NAV ================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 16, 23, 0.72);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.scrolled { border-bottom-color: var(--hairline); }
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* brand left, links centered, demo right */
  align-items: center;
  height: 76px;
}
.brand {
  justify-self: start;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--serif-ink);
  letter-spacing: 0.01em;
}
.brand em { font-style: normal; color: var(--amber); }
.nav__links {
  justify-self: center;
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.nav__links a { transition: color 0.18s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { justify-self: end; }
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: 1fr auto; }   /* links column is gone, so the CTA keeps its own column on the right instead of sharing the middle one */
}

/* ================= HERO ================= */
.hero { position: relative; overflow: hidden; }
.hero__inner {
  position: relative;
  z-index: 2;
  padding-top: clamp(4rem, 11vh, 8rem);
  padding-bottom: clamp(4.5rem, 12vh, 8.5rem);
  max-width: 56rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 1.6rem 0 0;
}
.hero__sub {
  margin: 2rem 0 0;
  max-width: 38rem;
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--muted-dim);
}
.hero__sub strong { color: var(--ink); font-weight: 600; }
.hero__cta { margin-top: 2.4rem; }
/* On phones let the headline wrap on its own; the forced breaks are for the
   wide layout only. Loosen the letter-spacing too, or words crowd together
   at the narrower size. */
@media (max-width: 560px) {
  .hero h1 { letter-spacing: -0.005em; }
  .hero h1 br { display: none; }
}

/* Derrick line-art bleeding off the right edge */
.derrick {
  position: absolute;
  top: 0;
  right: -6%;
  height: 100%;
  width: 42%;
  max-width: 620px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}
.derrick svg { height: 100%; width: 100%; }
@media (max-width: 860px) { .derrick { opacity: 0.22; right: -20%; } }
@media (max-width: 560px) { .derrick { display: none; } }

/* Subtle radial lift behind the headline */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 18% 30%, rgba(42, 62, 88, 0.38), transparent 62%);
  z-index: 0;
}

/* ============ SECTION SCAFFOLD ============ */
.section { position: relative; padding-block: clamp(4.5rem, 10vh, 8rem); }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 46rem; }
.section h2 {
  font-size: clamp(2rem, 4.3vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 1.1rem 0 0;
}
.section__intro {
  margin: 1.5rem 0 0;
  max-width: 42ch;
  color: var(--muted-dim);
  font-size: 1.06rem;
}

/* Left rail: vertical line + depth marker */
.rail {
  position: absolute;
  left: max(0px, calc((100% - var(--maxw)) / 2));
  top: 0;
  bottom: 0;
  width: var(--pad);
  pointer-events: none;
}
.rail::before {                 /* vertical line set left of the content, with room for the marker */
  content: "";
  position: absolute;
  right: 4rem;
  top: 0; bottom: 0;
  border-left: 1px solid var(--rail);
}
.rail__mark {                   /* depth tick + label, between the line and the content */
  position: absolute;
  top: clamp(4.5rem, 10vh, 8rem);
  left: calc(var(--pad) - 4rem);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rail__mark i { display: block; width: 14px; height: 1px; background: var(--amber); }
@media (max-width: 1200px) { .rail { display: none; } }

/* ============ THREE-COLUMN GRID ============ */
.cols {
  margin-top: clamp(3rem, 6vh, 4.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; gap: 2.5rem; } }

.col { padding-top: 1.4rem; border-top: 1px solid var(--hairline); }

/* The Problem section's columns end in a pull-quote, and the three columns'
   body text runs to different lengths — so without help the quotes land at
   different heights depending on how each column wraps at the current
   width. Named rows (label / heading / body / quote), with every .col
   subgridded into them, fix that: each row's height becomes the tallest
   occurrence of that row across all three columns, recomputed by the
   browser at any viewport width. */
.cols--quoted { grid-template-rows: auto auto 1fr auto; }
.cols--quoted .col {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
}
@media (max-width: 820px) {
  .cols--quoted { grid-template-rows: none; }
  .cols--quoted .col { display: block; }
}

.col h3 {
  font-size: 1.32rem;
  line-height: 1.16;
  margin: 1.1rem 0 0;
}
/* Body paragraphs only — not the label or the pull-quote, which are also
   <p> in a column and set their own colour. */
.col p:not(.label):not(.col__quote) {
  margin: 1rem 0 0;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--muted);
}
.col__quote {
  align-self: start;  /* sits right after its own paragraph, not pinned to
                          the bottom of the row */
  margin-top: 2.5rem; /* gap above the text */
  padding-left: 1rem;
  border-left: 2px solid var(--amber);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.04rem;
  line-height: 1.45;
  color: var(--serif-ink);
}

/* ================= CTA ================= */
.cta { padding-block: clamp(5rem, 12vh, 9rem); }
.cta__inner { max-width: 40ch; }
.cta h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.cta p {
  margin: 1.5rem 0 0;
  max-width: 38ch;
  color: var(--muted-dim);
  font-size: 1.08rem;
}
.cta__actions { margin-top: 2.4rem; }
.cta__note {
  margin-top: 1.6rem;
  font-size: 0.86rem;
  color: var(--muted-dim);
}
.cta__note a { color: var(--amber); }

/* ================= FOOTER ================= */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--hairline);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
  padding-block: 2rem;
  font-size: 0.85rem;
  color: var(--muted-dim);
}
.footer .brand { font-size: 1.05rem; }
.footer__inner .sep { margin-left: auto; }
@media (max-width: 620px) { .footer__inner .sep { margin-left: 0; } }

/* ================= DEMO MODAL ================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 17, 0.72);
  backdrop-filter: blur(2px);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 2.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.modal__panel h2 { font-size: 1.7rem; line-height: 1.15; margin: 1rem 0 0; }
.modal__intro { margin: 0.9rem 0 0; color: var(--muted-dim); font-size: 0.98rem; line-height: 1.5; }
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal__close:hover { background: var(--hairline); color: var(--ink); }
.modal__close:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.modal__form { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.9rem; }
.modal__label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.modal__input {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0.8em 1em;
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--ink);
}
.modal__input::placeholder { color: var(--muted-dim); }
.modal__input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.modal__turnstile:empty { display: none; }
.modal__turnstile { margin: 4px 0; }
.modal__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.modal__submit { margin-top: 0.3rem; width: 100%; }
.modal__status { margin: 0.9rem 0 0; font-size: 0.86rem; color: var(--muted-dim); min-height: 1.2em; }
.modal__status--error { color: #e88; }

/* ================= REVEAL ================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
