/* =============================================================================
   Wilder Robotics — Shell (institutional) stylesheet
   Applies to /, /about, /policy, /contact and provides top-nav + footer for all
   ============================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--shell-paper);
  color: var(--shell-ink);
  font-family: var(--font-shell-body);
  font-size: var(--step-body);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Layout container ------------------------------------------------------ */
.wrap {
  max-width: var(--grid-max);
  margin: 0 auto;
  padding-left: var(--grid-gutter);
  padding-right: var(--grid-gutter);
}

/* ---- Top navigation -------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--shell-paper);
  border-bottom: 1px solid var(--shell-rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-wordmark {
  color: var(--shell-ink);
  height: 20px;
  width: auto;
}
.nav-wordmark svg { height: 100%; width: auto; }
.nav-list {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--font-shell-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-list a {
  color: var(--shell-ink);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.nav-list a:hover { border-bottom-color: var(--shell-ink); text-decoration: none; }
.nav-list a[aria-current="page"] { border-bottom-color: var(--shell-ink); }

/* Mobile nav — checkbox-toggled disclosure, no JS */
.nav-toggle { display: none; }
.nav-burger {
  display: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px -8px -8px 0;
  color: var(--shell-ink);
}
.nav-burger svg { width: 22px; height: 22px; }

@media (max-width: 780px) {
  .nav-burger { display: inline-flex; align-items: center; }
  .nav nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--shell-paper);
    border-bottom: 1px solid var(--shell-rule);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-med) var(--ease-out);
  }
  .nav-toggle:checked ~ nav { max-height: 360px; }
  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--grid-gutter);
  }
  .nav-list li {
    border-top: 1px solid var(--shell-rule);
  }
  .nav-list li:first-child { border-top: 0; }
  .nav-list a {
    display: block;
    padding: 14px 0;
    font-size: 15px;
  }
}

/* ---- Typography ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-shell-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
}
.display-hero {
  font-size: var(--step-hero);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.display-1 { font-size: var(--step-1); }
.display-2 { font-size: var(--step-2); }
.display-3 { font-size: var(--step-3); }

.eyebrow {
  font-family: var(--font-shell-mono);
  font-size: var(--step-eyebrow);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-muted);
}

.lead {
  font-size: var(--step-lead);
  line-height: 1.45;
  color: var(--shell-graphite);
}

/* ---- Hairline rules -------------------------------------------------------- */
.rule { border: 0; border-top: 1px solid var(--shell-rule); margin: 0; }

/* ---- Hero section ---------------------------------------------------------- */
.hero {
  padding: var(--space-7) 0 var(--space-6);
}
.hero-wrap {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.hero-eyebrow { margin-bottom: var(--space-3); }
.hero-statement {
  max-width: 22ch;
  color: var(--shell-ink);
}
.hero-sub {
  margin-top: var(--space-4);
  max-width: 58ch;
  color: var(--shell-graphite);
}
.hero-statement.hero-statement-wide {
  max-width: 22ch;
}
@media (max-width: 780px) {
  .hero { padding: var(--space-6) 0 var(--space-5); }
  .hero-statement.hero-statement-wide {
    font-size: clamp(2.0rem, 8vw, 2.6rem);
    line-height: 1.08;
    max-width: none;
  }
}

/* ---- Pre-CTA block (above product ladder) --------------------------------- */
.pre-cta {
  padding: var(--space-5) 0 var(--space-4);
  border-top: 1px solid var(--shell-rule);
}
.pre-cta-lede {
  font-family: var(--font-shell-body, inherit);
  font-size: var(--step-lead, 1.25rem);
  line-height: 1.5;
  color: var(--shell-ink);
  max-width: 60ch;
  margin: 0;
}
.pre-cta-actions {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.pre-cta-actions a {
  font-family: var(--font-shell-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shell-ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--shell-ink);
  transition: opacity var(--dur-med) var(--ease-out);
}
.pre-cta-actions a:hover { opacity: 0.6; }

/* ---- Standards list — urgency anchor ------------------------------------- */
.standards-list .urgent {
  color: var(--shell-ink);
  font-weight: 500;
  border-bottom: 1px dotted var(--shell-ink);
  padding-bottom: 1px;
}

/* ---- Open Work tail (honest narrowing note) ------------------------------- */
.open-work-tail {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--shell-rule);
  max-width: 60ch;
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--shell-muted);
}

/* ---- Thesis section ------------------------------------------------------- */
.thesis {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--shell-rule);
}
.thesis-body {
  font-family: var(--font-shell-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--shell-ink);
  max-width: 32ch;
  margin: 0;
}
.thesis-eyebrow {
  margin-bottom: var(--space-3);
}
.thesis-founder-link {
  margin-top: var(--space-4);
  font-family: var(--font-shell-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--shell-muted);
}
.thesis-founder-link a {
  color: var(--shell-ink);
  border-bottom: 1px solid var(--shell-ink);
  padding-bottom: 1px;
}
.thesis-founder-link a:hover { text-decoration: none; opacity: 0.6; }

/* ---- Product cards row ----------------------------------------------------- */
.products {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--shell-rule);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-left: 1px solid var(--shell-rule);
}
.product-card {
  padding: var(--space-4) var(--space-4) var(--space-5);
  border-right: 1px solid var(--shell-rule);
  border-bottom: 1px solid var(--shell-rule);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 320px;
  transition: background var(--dur-med) var(--ease-out);
}
.product-card:hover { background: rgba(10, 10, 10, 0.02); }
.product-index {
  font-family: var(--font-shell-mono);
  font-size: var(--step-eyebrow);
  letter-spacing: 0.16em;
  color: var(--shell-muted);
  text-transform: uppercase;
  line-height: 1.4;
}
.product-name {
  font-family: var(--font-shell-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.product-desc {
  color: var(--shell-graphite);
  font-size: var(--step-body);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}
.product-cta {
  font-family: var(--font-shell-body);
  font-size: 14px;
  color: var(--shell-ink);
  border-bottom: 1px solid var(--shell-ink);
  align-self: flex-start;
  padding-bottom: 2px;
}
.product-cta::after { content: " \2192"; }

@media (max-width: 900px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-card { min-height: unset; }
}

/* ---- Two-column info row (About preview) ---------------------------------- */
.info-row {
  padding: var(--space-6) 0;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-5);
  border-top: 1px solid var(--shell-rule);
}
.info-row .label { color: var(--shell-muted); }
.info-row .body { color: var(--shell-ink); }
.info-row .body p { margin: 0 0 var(--space-2) 0; max-width: 58ch; }
@media (max-width: 780px) {
  .info-row { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ---- Standards / specs row ------------------------------------------------ */
.standards {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--shell-rule);
}
.standards-list {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0 0;
  font-family: var(--font-shell-mono);
  font-size: var(--step-micro);
  line-height: 2.4;
  color: var(--shell-graphite);
}
.standards-list a {
  color: var(--shell-ink);
  border-bottom: 1px dotted var(--shell-rule-strong);
}
.standards-list a:hover { border-bottom-style: solid; text-decoration: none; }
.standards-list .kind {
  display: inline-block;
  width: 90px;
  color: var(--shell-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
}

/* ---- Footer --------------------------------------------------------------- */
.footer {
  padding: var(--space-6) 0 var(--space-5);
  border-top: 1px solid var(--shell-rule);
  color: var(--shell-graphite);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.footer-col h4 {
  font-family: var(--font-shell-mono);
  font-size: var(--step-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-muted);
  font-weight: 500;
  margin: 0 0 var(--space-2);
}
.footer-col p, .footer-col a {
  font-size: var(--step-micro);
  color: var(--shell-graphite);
  display: block;
  margin: 0 0 4px;
}
.footer-col a { color: var(--shell-ink); }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-wordmark { color: var(--shell-ink); height: 18px; margin-bottom: var(--space-3); }
.footer-legal {
  padding-top: var(--space-3);
  border-top: 1px solid var(--shell-rule);
  font-size: 12px;
  color: var(--shell-muted);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Footer social ------------------------------------------------------- */
.footer-social {
  display: flex;
  gap: 14px;
  margin-top: var(--space-3);
  align-items: center;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--shell-graphite);
  transition: color 140ms ease, transform 140ms ease;
  line-height: 0;
}
.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: var(--shell-ink);
  text-decoration: none;
}
.footer-social-link:focus-visible {
  outline: 2px solid var(--shell-ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.footer-social-link svg {
  display: block;
}

/* ---- Motion — reduced-motion safe ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
