/* ==========================================================================
   webrtcpro.com — Precise. Senior. Calm. Battle-tested.
   Palette: navy #0B1220 · cyan #22D3EE · green #34D399 · off-white #F1F5F9
            slate #64748B (lines/decoration only) · #94A3B8 (secondary text)
   Type: IBM Plex Sans (display 600/700) · Inter (body 400) · JetBrains Mono
   Scale: 18 / 22.5 / 28 / 35 / 44 / 55 (1.25 desktop, 1.2 mobile)
   ========================================================================== */

:root {
  --navy: #0B1220;
  --navy-raise: #101a2e;
  --cyan: #22D3EE;
  --green: #34D399;
  --ink: #F1F5F9;
  --slate: #64748B;        /* grid lines, borders, decoration — never text */
  --text-2nd: #94A3B8;     /* secondary text, ~7:1 on navy */
  --display: "IBM Plex Sans", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --wrap: 1200px;
  --gut: 24px;
  --ease-enter: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.444rem); /* 28 → 44 */
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin-bottom: 40px;
}

h3 {
  font-size: 1.25rem; /* 22.5 */
  font-weight: 600;
  margin-bottom: 8px;
}

p { max-width: 68ch; }

a { color: var(--cyan); }

.mono {
  font-family: var(--mono);
  font-size: 0.833rem; /* 15px */
  letter-spacing: 0.02em;
}

/* --- focus & skip link ---------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  background: var(--cyan);
  color: var(--navy);
  font-family: var(--display);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s var(--ease-enter);
}
.skip-link:focus { top: 0; }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 32px;
  border-radius: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s var(--ease-enter), box-shadow 0.15s var(--ease-enter);
}

.btn-primary {
  background: var(--cyan);
  color: var(--navy); /* ~11:1 — never white on cyan */
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.35);
}

.btn-large { min-height: 56px; padding: 16px 40px; font-size: 1.111rem; }

.link-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
}

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--cyan); }

@media (max-width: 860px) {
  .site-nav { display: none; } /* flat page — anchors reachable by scroll */
  .btn-header { margin-left: auto; }
}
@media (max-width: 480px) {
  .btn-header { padding: 12px 16px; font-size: 0.889rem; }
}

/* --- sections -------------------------------------------------------------- */

.section { padding-block: 96px; }
.section-alt { background: var(--navy-raise); }

@media (max-width: 720px) {
  .section { padding-block: 56px; }
}

.kicker {
  color: var(--green);
  margin-bottom: 16px;
  text-transform: lowercase;
}

/* --- hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 120px;
  text-align: center;
}

@media (max-width: 720px) {
  .hero { padding-block: 72px; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-status {
  color: var(--green);
  margin-bottom: 24px;
}

.hero-sub {
  margin-top: 24px;
  font-size: 1.25rem;
  color: var(--text-2nd);
  max-width: 56ch;
}
@media (max-width: 720px) {
  .hero-sub { font-size: 1.111rem; }
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 32px;
}

.hero-proof {
  margin-top: 24px;
  font-size: 0.889rem;
  color: var(--text-2nd);
}

/* --- hero mesh (pure CSS/SVG, zero JS) -------------------------------------
   Base (and prefers-reduced-motion) state = static completed mesh.
   Animation lives ONLY inside the no-preference media query.            */

.mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55; /* ≤60% behind headline, per review */
}

.mesh .l {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.5;
  opacity: 0.5; /* static drawn state */
}

.mesh .n {
  fill: var(--cyan);
  opacity: 0.9;
}

.mesh .pkt {
  fill: var(--cyan);
  opacity: 0; /* packets exist only in motion */
}

@media (prefers-reduced-motion: no-preference) {

  .mesh .l {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0;
    animation: link-draw 12s ease-in-out infinite;
  }
  .l1 { animation-delay: 0s; }
  .l2 { animation-delay: 0.5s; }
  .l3 { animation-delay: 1.0s; }
  .l4 { animation-delay: 1.5s; }
  .l5 { animation-delay: 2.0s; }
  .l6 { animation-delay: 2.5s; }
  .l7 { animation-delay: 3.0s; }
  .l8 { animation-delay: 3.5s; }
  .l9 { animation-delay: 4.0s; }

  /* first full connect → packet → green cycle completes by ~2.4s */
  .mesh .pkt {
    animation: packet-run 12s ease-in-out infinite;
    offset-rotate: 0deg;
  }
  .p1 { offset-path: path("M610 285 L735 130"); animation-delay: 0.8s; }
  .p4 { offset-path: path("M140 150 L400 95");  animation-delay: 1.9s; }
  .p2 { offset-path: path("M610 285 L560 505"); animation-delay: 2.4s; }
  .p3 { offset-path: path("M560 505 L900 465"); animation-delay: 3.4s; }

  .mesh .n { animation: node-pulse 12s ease-in-out infinite; }
  .n9 { animation-delay: 1.9s; }
  .n3 { animation-delay: 1.9s; }
  .n1 { animation-delay: 3.0s; }
  .n2 { animation-delay: 3.0s; }
  .n6 { animation-delay: 3.5s; }
  .n7 { animation-delay: 4.5s; }
  .n5 { animation-delay: 5.0s; }
  .n4 { animation-delay: 5.5s; }
  .n8 { animation-delay: 6.0s; }
}

@keyframes link-draw {
  0%   { stroke-dashoffset: 1; opacity: 0; }
  1%   { opacity: 0.5; }
  7%   { stroke-dashoffset: 0; opacity: 0.5; }
  78%  { stroke-dashoffset: 0; opacity: 0.5; }
  88%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: 0; }
}

@keyframes packet-run {
  0%   { offset-distance: 0%;   opacity: 0; }
  2%   { opacity: 1; }
  9%   { offset-distance: 100%; opacity: 1; }
  11%  { offset-distance: 100%; opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}

@keyframes node-pulse {
  0%, 100% { fill: var(--cyan); filter: none; }
  2%       { fill: var(--green); filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.9)); }
  8%       { fill: var(--cyan); filter: none; }
}

/* --- cards ------------------------------------------------------------------ */

.card-grid {
  list-style: none;
  display: grid;
  gap: 24px;
}

.symptom-grid,
.engage-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.expertise-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: rgba(16, 26, 46, 0.7);
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 8px;
  padding: 32px;
}
.section-alt .card { background: rgba(11, 18, 32, 0.6); }

.card p { color: var(--text-2nd); font-size: 1rem; }

.symptom-card h3 { color: var(--ink); }

.sym-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
}

/* --- expertise extras -------------------------------------------------------- */

.arch-figure {
  margin-top: 64px;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 8px;
  padding: 32px 24px 24px;
  background: rgba(11, 18, 32, 0.6);
}

.arch-svg { width: 100%; height: auto; display: block; }

.arch-label {
  font-family: var(--mono);
  font-size: 13px;
  fill: var(--cyan);
}
.arch-label-dim { fill: var(--text-2nd); }
.arch-label-green { fill: var(--green); }

.arch-figure figcaption {
  margin-top: 16px;
  font-size: 0.889rem;
  color: var(--text-2nd);
}

.stack-row {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cyan);
}
.stack-row span {
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 8px;
  padding: 6px 14px;
}

.stack-note {
  margin-top: 16px;
  color: var(--text-2nd);
  font-size: 0.889rem;
}

/* --- engagements --------------------------------------------------------------- */

.engage-card .price {
  color: var(--green);
  margin-bottom: 16px;
}

.engage-card .footnote {
  margin-top: 16px;
  font-size: 0.833rem;
  color: var(--text-2nd);
  border-top: 1px solid rgba(100, 116, 139, 0.35);
  padding-top: 16px;
}

.sprint-figure { margin-top: 24px; }
.sprint-figure svg { width: 100%; height: auto; display: block; }
.sprint-figure figcaption { margin-top: 8px; color: var(--text-2nd); }

.graph-label {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--text-2nd);
}
.ph-label {
  font-family: var(--mono);
  font-size: 14px;
  fill: var(--text-2nd);
}

.engage-hourly {
  margin-top: 40px;
  color: var(--text-2nd);
}
.engage-hourly strong { color: var(--ink); font-weight: 400; font-family: var(--mono); }

/* --- steps ------------------------------------------------------------------------ */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  border-left: 2px solid var(--cyan);
  padding: 8px 0 8px 24px;
}

.step-num {
  display: block;
  color: var(--green);
  margin-bottom: 8px;
}

.step p { color: var(--text-2nd); font-size: 1rem; }

/* --- about + CTA band ---------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-figure { max-width: 320px; }
}

.about-figure svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.about-copy p + p { margin-top: 24px; }
.about-copy p { color: var(--text-2nd); }
.about-copy h2 { margin-bottom: 32px; }

.cta-band {
  margin-top: 96px;
  padding-top: 96px;
  border-top: 1px solid rgba(100, 116, 139, 0.35);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (max-width: 720px) {
  .cta-band { margin-top: 56px; padding-top: 56px; }
}

.cta-heading { max-width: none; margin-bottom: 16px; }

.cta-band p { color: var(--text-2nd); }

.cta-band .btn { margin-top: 32px; }

.cta-note {
  margin-top: 16px;
  font-size: 0.833rem;
}

/* --- footer ------------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid rgba(100, 116, 139, 0.3);
  padding-block: 56px 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px 48px;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 340px;
}

.footer-tagline {
  color: var(--text-2nd);
  font-size: 0.944rem;
}

.footer-book {
  align-self: flex-start;
}

/* --- contact form (Netlify) --------------------------------------------------------- */

.contact-form {
  flex: 1 1 380px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-heading {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.889rem;
  color: var(--text-2nd);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--navy-raise);
  border: 1px solid rgba(100, 116, 139, 0.4);
  border-radius: 8px;
}

.contact-form textarea {
  min-height: 108px;
  resize: vertical;
}

.contact-form input::placeholder {
  color: var(--slate);
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-color: var(--cyan);
}

.contact-form button {
  align-self: flex-start;
  margin-top: 4px;
}

/* honeypot — kept out of the visual + accessibility trees */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer-legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(100, 116, 139, 0.6);
}

.footer-legal p {
  font-size: 0.889rem; /* one step down from body */
  color: var(--text-2nd);
  max-width: none;
}

/* --- scroll reveal (JS-gated; content fully visible without JS) --------------------- */

@media (prefers-reduced-motion: no-preference) {
  html.js-enabled .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease-enter), transform 0.6s var(--ease-enter);
  }
  html.js-enabled .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* --- global reduced-motion safety net ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
