/* =========================================================================
   Safra Robotics — shared styles
   Industrial dark theme · white text · hazard-yellow highlights
   ========================================================================= */

:root {
  --ink:        #0B0C0E;   /* base canvas (near-black, cool) */
  --ink-2:      #121419;   /* raised surface / cards */
  --ink-3:      #181B21;   /* hover surface */
  --line:       #262A31;   /* hairline rules + borders */
  --line-2:     #353A43;   /* stronger border */
  --text:       #F3F5F8;   /* near-white body */
  --muted:      #99A0AB;   /* secondary text */
  --muted-2:    #6B7180;   /* tertiary / captions */
  --yellow:     #FFD400;   /* hazard-yellow signature accent */
  --yellow-2:   #FFE45C;   /* lighter yellow for hover */
  --yellow-dim: #6b5b00;   /* very dim yellow for backgrounds */

  --maxw: 1180px;
  --gut: 24px;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 4px;            /* small radius — industrial, sharp */
  --r-lg: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: var(--yellow); color: var(--ink); }

/* visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--yellow); color: var(--ink);
  padding: 10px 16px; font-weight: 600; z-index: 200;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ----------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

section { position: relative; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section + .section { border-top: 1px solid var(--line); }
/* first section clears the fixed (overlay) header, sitting just below the nav */
main > section:first-child { padding-top: clamp(88px, 8vw, 116px); }

/* faint engineering grid in the page background */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* starfield banner across the top of every page (mirrors the footer dunes) */
.page-stars {
  position: absolute; top: 0; left: 0; right: 0;
  width: 100%; height: 320px;
  object-fit: cover; object-position: top;
  pointer-events: none; z-index: 0; opacity: .9;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent);
  mask-image: linear-gradient(to bottom, #000 35%, transparent);
}

/* ----------------------------------------------------------------- type */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }

.h-hero {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.03em;
  font-weight: 600;
}
.h-2 { font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -.025em; }
.h-3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.55; }

.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

p + p { margin-top: 1em; }
em.hl { font-style: normal; color: var(--yellow); }
strong { color: #fff; font-weight: 650; }

/* eyebrow / mono labels — the page's structural voice */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px; background: var(--yellow);
  display: inline-block;
}
.eyebrow .n { color: var(--yellow); }

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

/* ----------------------------------------------------------------- buttons */
.btn {
  --bg: var(--yellow); --fg: var(--ink);
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-display);
  font-weight: 600; font-size: .98rem;
  padding: 14px 22px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bg);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--yellow-2); border-color: var(--yellow-2); transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(255,212,0,.5); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost {
  --bg: transparent; --fg: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { background: var(--ink-3); border-color: var(--text); box-shadow: none; transform: translateY(-2px); }

.btn--lg { padding: 17px 28px; font-size: 1.05rem; }

.textlink {
  color: var(--text);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
  font-weight: 500;
}
.textlink:hover { color: var(--yellow); border-color: var(--yellow); }

/* ----------------------------------------------------------------- header / nav */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -16px rgba(0,0,0,.9);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 13px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.32rem;
  letter-spacing: -.01em;
}
.brand { margin-right: auto; }
.brand .mark { width: 38px; height: 38px; color: var(--yellow); }
.brand b { color: var(--text); font-weight: 600; }
.brand .sub { color: var(--muted-2); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a {
  font-size: .95rem; color: var(--muted);
  transition: color .18s var(--ease);
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.btn { color: var(--ink); font-size: .92rem; padding: 10px 18px; }
.nav-links a.btn:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -23px;
  height: 2px; background: var(--yellow);
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-2); border-radius: var(--r);
  width: 44px; height: 40px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--text);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ----------------------------------------------------------------- hero */
.hero { padding-block: clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero h1 { margin-bottom: 24px; }
.hero .lead { max-width: 48ch; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-tag { margin-bottom: 26px; }

/* signature: operator <-> robot link schematic */
.schematic {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255,212,0,.05), transparent 60%),
    var(--ink-2);
  padding: 28px;
  aspect-ratio: 1 / .82;
}
.schematic .corner {
  position: absolute; width: 10px; height: 10px; border: 1px solid var(--yellow); opacity: .7;
}
.schematic .corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.schematic .corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.schematic .corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.schematic .corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.schematic svg { width: 100%; height: 100%; }
.schematic .lbl {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; fill: var(--muted);
}
.schematic .lbl-y { fill: var(--yellow); }
.schematic-readout {
  position: absolute; left: 22px; bottom: 18px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  letter-spacing: .04em;
}
.schematic-readout b { color: var(--yellow); font-weight: 500; }

/* the travelling pulse along the link */
.pulse { animation: travel 2.6s var(--ease) infinite; }
@keyframes travel {
  0%   { transform: translateX(0);     opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(var(--travel, 210px)); opacity: 0; }
}

/* ----------------------------------------------------------------- stat strip */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--ink-2);
  overflow: hidden;
}
.strip > div { padding: 26px 24px; border-left: 1px solid var(--line); }
.strip > div:first-child { border-left: 0; }
.strip .k {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px;
}
.strip .v { font-family: var(--font-display); font-size: 1.05rem; color: var(--text); line-height: 1.3; }
.strip .v b { color: var(--yellow); font-weight: 600; }

/* ----------------------------------------------------------------- cards */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-2);
  padding: 28px 26px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); background: var(--ink-3); }
.card .ico {
  display: block;
  width: 38px; height: 38px; margin-bottom: 20px;
  color: var(--yellow);
}
.card .ico svg { width: 100%; height: 100%; stroke: currentColor; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }
.card .tag {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; display: block;
}

/* numbered process steps (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.step { padding: 32px 28px; border-left: 1px solid var(--line); position: relative; }
.step:first-child { border-left: 0; }
.step .num {
  font-family: var(--font-mono); font-size: .8rem; color: var(--yellow);
  letter-spacing: .1em; margin-bottom: 18px; display: block;
}
.step h3 { margin-bottom: 10px; font-size: 1.2rem; }
.step p { color: var(--muted); font-size: .96rem; }

/* task ladder (rungs = real sequence simple -> skilled) */
.ladder { display: grid; gap: 14px; }
.rung {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 24px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--ink-2); padding: 24px 26px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.rung:hover { border-color: var(--line-2); transform: translateX(4px); }
.rung .lvl {
  font-family: var(--font-mono); color: var(--yellow); font-size: 1.1rem;
  border-right: 1px solid var(--line); padding-right: 0; height: 100%;
  display: flex; align-items: center;
}
.rung h3 { font-size: 1.15rem; margin-bottom: 6px; }
.rung p { color: var(--muted); font-size: .95rem; max-width: 60ch; }
.rung .meta {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-2); text-align: right; white-space: nowrap;
}

/* feature rows */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.frow + .frow { margin-top: clamp(40px, 6vw, 80px); }
.frow .panel {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--ink-2);
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.frow .panel svg { width: 70%; height: 70%; }

/* checklist */
.checks { list-style: none; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; color: var(--muted); }
.checks li b { color: var(--text); font-weight: 600; }
.checks .tick {
  width: 22px; height: 22px; border: 1px solid var(--yellow); border-radius: 3px;
  display: flex; align-items: center; justify-content: center; color: var(--yellow); margin-top: 3px;
}
.checks .tick svg { width: 13px; height: 13px; stroke: currentColor; }

/* pilot timeline */
.timeline { list-style: none; display: grid; gap: 0; }
.timeline li {
  display: grid; grid-template-columns: 120px 1fr; gap: 28px;
  padding: 26px 0; border-top: 1px solid var(--line); align-items: start;
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when {
  font-family: var(--font-mono); font-size: .8rem; color: var(--yellow);
  letter-spacing: .06em; padding-top: 3px;
}
.timeline h3 { font-size: 1.15rem; margin-bottom: 6px; }
.timeline p { color: var(--muted); font-size: .96rem; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem;
  transition: color .18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--yellow); }
.faq summary .pm { color: var(--yellow); font-family: var(--font-mono); font-size: 1.3rem; flex: none; transition: transform .2s var(--ease); }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq .ans { padding: 0 4px 26px; color: var(--muted); max-width: 70ch; }

/* CTA band */
.cta-band {
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 160% at 80% 10%, rgba(255,212,0,.08), transparent 55%),
    var(--ink-2);
  padding: clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: 1.4fr auto; gap: 40px; align-items: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--muted); max-width: 50ch; }

/* ----------------------------------------------------------------- form */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.field label .req { color: var(--yellow); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 14px 16px; width: 100%;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--yellow); background: var(--ink-3);
}
.field select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.field .err { color: #ff8a8a; font-size: .85rem; font-family: var(--font-mono); display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #ff8a8a; }
.field.invalid .err { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-note { color: var(--muted-2); font-size: .9rem; }
.form-status { font-family: var(--font-mono); font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: var(--yellow); }
.form-status.bad { color: #ff8a8a; }

.form-success {
  border: 1px solid var(--yellow); border-radius: var(--r-lg);
  background: rgba(255,212,0,.05); padding: 32px; text-align: center; display: none;
}
.form-success.show { display: block; }
.form-success .big {
  width: 48px; height: 48px; margin: 0 auto 16px; color: var(--yellow);
  border: 1px solid var(--yellow); border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* ----------------------------------------------------------------- footer */
.site-footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding-block: 56px 190px; margin-top: 0; }
.site-footer .wrap { position: relative; z-index: 1; }
.footer-dunes {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 180px;
  object-fit: cover; object-position: bottom;
  pointer-events: none; opacity: .9; z-index: 0;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-grid .blurb { color: var(--muted); max-width: 38ch; margin-top: 16px; font-size: .95rem; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 500; margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a { color: var(--muted); font-size: .95rem; transition: color .18s var(--ease); }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding-top: 26px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .78rem; color: var(--muted-2); letter-spacing: .04em;
  flex-wrap: wrap;
}
.footer-bottom .dot { color: var(--yellow); }

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

/* ----------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .schematic { max-width: 460px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(3), .strip > div:nth-child(4) { border-top: 1px solid var(--line); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step { border-left: 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; }
  .frow { grid-template-columns: 1fr; }
  .frow .panel { order: -1; aspect-ratio: 16/9; }
  .cta-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .brand-col { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 20px;
    transform: translateY(-120%); transition: transform .28s var(--ease);
    height: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 16px 4px; color: var(--text); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links .btn { margin-top: 16px; justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .strip > div { border-left: 0; border-top: 1px solid var(--line); }
  .strip > div:first-child { border-top: 0; }
  .form-row { grid-template-columns: 1fr; }
  .rung { grid-template-columns: 44px 1fr; }
  .rung .meta { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
