/* ==========================================================================
   Wenzel Robotics — wenzelrobotics.com
   Single stylesheet. No dependencies, no build step.
   ========================================================================== */

:root {
  /* Surfaces — warm near-black to sit with the maroon brand mark */
  --bg:         #0A0908;
  --surface-1:  #100E0D;
  --surface-2:  #161312;
  --surface-3:  #1D1918;
  --surface-4:  #262120;

  /* Lines */
  --line:        rgba(244, 240, 238, 0.09);
  --line-strong: rgba(244, 240, 238, 0.17);

  /* Text */
  --text:       #F4F0EE;
  --text-dim:   #A69E99;
  --text-faint: #8A817C;

  /* Brand */
  --brand:        #4E2C27;  /* logo mark */
  --accent:       #B4574C;  /* graphics */
  --accent-text:  #D08170;  /* accent on dark, AA at small sizes */

  /* Metrics */
  --header-h: 72px;
  --radius:   14px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(76px, 9vw, 124px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ layout --- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* Narrow sections keep the same outer container (and therefore the same left
   edge) as full-width sections; only the reading measure is constrained. */
.container.narrow > * { max-width: 780px; }

.section { padding-block: var(--section-y); }
.section-alt {
  background: var(--surface-1);
  border-block: 1px solid var(--line);
}

.section-head { margin-bottom: clamp(36px, 5vw, 60px); }

.two-col {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 110px); }
  .two-col-tight { grid-template-columns: 1fr 0.9fr; }
}

/* --------------------------------------------------------- typography --- */

.display {
  font-size: clamp(2.75rem, 7.4vw, 5.5rem);
  line-height: 0.97;
  letter-spacing: -0.038em;
  font-weight: 800;
  margin-bottom: 26px;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 700;
  text-wrap: balance;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 22px;
}

.lead {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  line-height: 1.38;
  letter-spacing: -0.014em;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 22px;
  text-wrap: balance;
}

.lead-sm {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--text);
  line-height: 1.55;
}

.body-copy {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.68;
  max-width: 60ch;
}
.body-copy + .body-copy { margin-top: 18px; }

.hero-body { margin-bottom: 36px; max-width: 48ch; }

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

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.006em;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }

.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }

.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(180, 87, 76, 0.10);
  transform: translateY(-2px);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(10, 9, 8, 0.92);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { flex: none; }

.brand-word {
  display: flex;
  flex-direction: column;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 34px; }
.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--text); }

.header-cta { flex: none; }

/* mobile nav toggle */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(3.75px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(10, 9, 8, 0.97);
  padding: 8px var(--gutter) 20px;
}
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav a {
  display: block;
  padding: 15px 0;
  font-size: 1.0625rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 800px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: block; }
  .mobile-nav[hidden] { display: none; }
}

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

.hero {
  padding-top: clamp(56px, 8vw, 92px);
  padding-bottom: clamp(72px, 10vw, 128px);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.hero-grid {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr 1.08fr; gap: clamp(40px, 5vw, 72px); }
}

.hero-visual .scene { width: 100%; height: auto; }

.coverage {
  transform-box: fill-box;
  transform-origin: left center;
}
.hero-visual.is-visible .coverage {
  animation: sweep 2.8s var(--ease) both;
}
@keyframes sweep {
  from { transform: scaleX(0.80); opacity: 0.25; }
  to   { transform: scaleX(1);    opacity: 1; }
}

/* ---------------------------------------------------------- apex caps --- */

.cap-grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .cap-grid { grid-template-columns: 1fr 1fr; } }

.cap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease),
              transform 0.25s var(--ease);
}
.cap:hover {
  border-color: rgba(180, 87, 76, 0.45);
  background: var(--surface-3);
  transform: translateY(-2px);
}
.cap svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------- progression --- */

.progression {
  position: relative;
  padding-left: 38px;
  display: grid;
  gap: 30px;
}
.progression::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg,
              var(--accent) 0%,
              rgba(180, 87, 76, 0.45) 48%,
              var(--line-strong) 100%);
}

.step { position: relative; }
.step-dot {
  position: absolute;
  left: -38px;
  top: 5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-strong);
}
.section-alt .step-dot { background: var(--surface-1); }

.step-now .step-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(180, 87, 76, 0.16);
}
.step-mid .step-dot { border-color: var(--accent); }
.step-next .step-dot { border-style: dashed; }

.step-label {
  display: block;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.step-next .step-label { color: var(--text-dim); }
.step-note {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ------------------------------------------------------------- status --- */

.section-status { padding-block: clamp(56px, 7vw, 96px); }

.status-card {
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
}
.status-card .body-copy { max-width: 62ch; }

.eyebrow-live { display: flex; align-items: center; gap: 10px; }
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-text);
  box-shadow: 0 0 0 0 rgba(208, 129, 112, 0.55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(208, 129, 112, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(208, 129, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(208, 129, 112, 0); }
}

/* ------------------------------------------------------------ contact --- */

.contact-intro { max-width: 60ch; margin-bottom: 40px; }

.contact-details {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
  padding-block: 28px;
  border-block: 1px solid var(--line);
}
@media (min-width: 560px) {
  .contact-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}
.contact-details dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.contact-details dd {
  font-size: 1.0625rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.contact-details a {
  border-bottom: 1px solid rgba(180, 87, 76, 0.5);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.contact-details a:hover { color: var(--accent-text); border-color: var(--accent-text); }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-1);
  padding-top: clamp(48px, 6vw, 72px);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-bottom: clamp(36px, 5vw, 56px);
}

.footer-tagline { margin-top: 18px; color: var(--text-dim); font-size: 0.9375rem; }
.footer-meta { margin-top: 4px; color: var(--text-faint); font-size: 0.9375rem; }

.footer-nav ul { display: flex; gap: 28px; }
.footer-nav a {
  font-size: 0.9375rem;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 24px;
}
.footer-bottom p { font-size: 0.8125rem; color: var(--text-faint); }

/* -------------------------------------------------------------- 404 ----- */

.page-center {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: clamp(64px, 12vw, 140px);
}
.page-center .eyebrow { margin-bottom: 18px; }
.page-center .body-copy { margin-bottom: 34px; }

/* -------------------------------------------------------- legal pages --- */

.legal h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  letter-spacing: -0.02em;
  margin-top: 44px;
  margin-bottom: 12px;
}
.legal .body-copy { max-width: 68ch; }
.legal a { border-bottom: 1px solid rgba(180, 87, 76, 0.5); }
.legal a:hover { color: var(--accent-text); }
.legal-updated {
  margin-top: 14px;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ------------------------------------------------------------ reveals --- */

/* Hidden state applies only when .js-reveal is set by reveal-init.js, so the
   page is fully visible if scripting is unavailable or fails. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  will-change: opacity, transform;
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

.js-reveal .hero-copy .reveal:nth-child(1) { transition-delay: 0.05s; }
.js-reveal .hero-copy .reveal:nth-child(2) { transition-delay: 0.12s; }
.js-reveal .hero-copy .reveal:nth-child(3) { transition-delay: 0.19s; }
.js-reveal .hero-copy .reveal:nth-child(4) { transition-delay: 0.26s; }
.js-reveal .hero-copy .reveal:nth-child(5) { transition-delay: 0.33s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------- small utilities */

.legal-title { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.mt-lg { margin-top: 44px; }

/* --------------------------------------------------------- contact form --- */

.contact-form { margin-bottom: 44px; max-width: 640px; }

.field-row { display: grid; gap: 20px; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field { margin: 0 0 20px; }
.field-row .field { margin-bottom: 0; }
.field-row + .field { margin-top: 20px; }

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 9px;
}
.field .req { color: var(--accent-text); margin-left: 2px; }
.field .opt { letter-spacing: 0.04em; text-transform: none; opacity: 0.75; }

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 132px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); opacity: 0.7; }

.field input:hover,
.field textarea:hover { border-color: rgba(244, 240, 238, 0.28); }

.field input:focus,
.field textarea:focus {
  outline: none;
  background: var(--surface-3);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 87, 76, 0.18);
}

/* Only flag a field once the person has actually interacted with it — no
   shouting at someone who has not reached the field yet. */
.field input:user-invalid,
.field textarea:user-invalid { border-color: #C4574B; }
.field input:user-invalid:focus,
.field textarea:user-invalid:focus { box-shadow: 0 0 0 3px rgba(196, 87, 75, 0.2); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.form-status {
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
  color: var(--text-dim);
}
.form-status.is-error { color: #E08579; }
.form-status.is-success { color: var(--text); }

.contact-form.is-sending button[type="submit"] { opacity: 0.6; pointer-events: none; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp-wrap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Success panel swapped in after an AJAX submit. */
.form-sent {
  padding: 28px 30px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  max-width: 640px;
  margin-bottom: 44px;
}
.form-sent h3 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.form-sent p { color: var(--text-dim); font-size: 1rem; line-height: 1.65; margin: 0; }

.contact-details-single { grid-template-columns: minmax(0, 1fr); }
