/* Anthra Humanoids — site stylesheet
   Design tokens, shared chrome (header/footer/forms), page styles.
   No build step: edit and reload. Cache-bust by bumping ?v= in the HTML. */

:root {
  --bg: #000;
  --fg: #F1F2F3;
  --muted: #8E949B;
  --muted-2: #A2A8AE;
  --soft: #C6CBD1;
  --line: #24272B;
  --field-line: #2E3238;
  --field-bg: #0B0C0E;
  --accent: #FF7A1A;
  --dim: #4E545B;
  --font-display: 'Chakra Petch', 'Saira', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Saira', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --header-h: 76px;
  color-scheme: dark;
}

/* ── Fonts (self-hosted, latin + latin-ext only) ───────────────────────── */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/chakra-petch-300-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/chakra-petch-300-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/chakra-petch-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/chakra-petch-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Saira'; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/saira-var-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Saira'; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/saira-var-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font-body); font-size: 17px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
main { flex: 1 0 auto; }
a { color: var(--fg); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, h4, button, nav a { font-family: var(--font-display); }
h1, h2, h3 { font-weight: 300; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }
::placeholder { color: #9AA1A9; opacity: 1; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 100; padding: 10px 14px; background: var(--fg); color: var(--bg); font-family: var(--font-display); font-size: 14px; }
.skip-link:focus { top: 12px; color: var(--bg); }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; }
.narrow { width: 100%; max-width: 880px; margin: 0 auto; }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: block; line-height: 0; flex: none; }
.brand img { height: 42px; width: auto; max-width: none; }
.brand__mark { display: none; height: 30px; width: auto; }
.site-nav { display: flex; gap: 35px; }
.site-nav a { font-size: 15px; color: var(--muted); padding-bottom: 4px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--fg); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; margin: 0 auto; background: var(--fg); transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  border: 1px solid var(--fg); background: none; padding: 16px 27px;
  font: 400 15px/1 var(--font-display); color: var(--fg); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn--quiet { border-color: var(--field-line); color: var(--soft); padding: 15px 24px; font-size: 14px; }
.btn--quiet:hover { border-color: var(--fg); color: var(--fg); background: var(--field-bg); }

.segmented { display: flex; margin-top: 14px; border: 1px solid var(--field-line); width: max-content; max-width: 100%; }
.segmented button { border: 0; background: transparent; color: var(--muted-2); font: 400 14px/1.2 var(--font-body); padding: 12px 22px; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--field-line); }
.segmented button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field {
  display: block; width: 100%; min-width: 0;
  background: var(--field-bg); border: 1px solid var(--field-line); border-radius: 0;
  padding: 15px 16px; font-family: var(--font-body); font-weight: 300;
  font-size: clamp(16px, 1.4vw, 18px); line-height: normal; color: var(--fg);
  outline: none; -webkit-appearance: none; appearance: none;
}
.field:focus { border-color: var(--accent); }
.field:focus-visible { outline: none; }
textarea.field { line-height: 1.5; resize: vertical; min-height: 6rem; }
textarea.field--tall { min-height: 10rem; }
.field--file { padding: 14px 16px; font-size: 15px; font-weight: 400; color: var(--soft); cursor: pointer; }
.form-grid { display: grid; gap: 26px; }
.form-grid--tight { gap: 22px; }
.cols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.hint { margin: 10px 0 0; color: var(--muted-2); font-size: 13px; }
.consent { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted-2); max-width: 44em; }
.consent a { color: var(--soft); border-bottom: 1px solid var(--field-line); }
.consent a:hover { color: var(--fg); border-bottom-color: var(--fg); }
.form-error { margin: 0; color: var(--accent); font-size: 14px; }
.eyebrow { display: block; font-family: var(--font-display); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.eyebrow--accent { color: var(--accent); }
.done h2, .done h3 { margin: 0; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.01em; }
.done p { margin: 16px 0 0; color: var(--muted); max-width: 30em; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 48px var(--gutter) 52px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; color: var(--muted-2); font-size: 14px; }
.site-footer .brand img { height: 32px; }
.form-slot iframe { display: block; width: 100%; border: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--muted-2); }
.footer-links a:hover { color: var(--fg); }

/* ── Inner pages (careers, legal, 404) ─────────────────────────────────── */
.page-head { padding: clamp(70px, 13vh, 150px) var(--gutter) clamp(40px, 6vh, 70px); }
.page-head h1 { margin: 22px 0 0; font-size: clamp(34px, 4.6vw, 68px); line-height: 1.04; letter-spacing: -.012em; max-width: 16em; text-wrap: balance; }
.page-head .lede { margin: 26px 0 0; color: var(--muted); max-width: 30em; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; }
.page-body { padding: 0 var(--gutter) clamp(80px, 14vh, 180px); }
.page-body > .narrow { border-top: 1px solid var(--line); padding-top: clamp(32px, 5vh, 52px); }

.careers-form .resume { margin-top: clamp(14px, 2vh, 22px); }
.careers-form .resume__body { margin-top: 16px; }
.careers-form .cols--links { margin-top: clamp(10px, 1.5vh, 18px); }
.careers-form .btn { justify-self: start; margin-top: clamp(16px, 3vh, 28px); }

.prose { color: var(--soft); }
.prose h2 { margin: 2.4em 0 .7em; font-size: clamp(21px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.01em; color: var(--fg); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 .5em; font-size: clamp(17px, 1.5vw, 21px); font-weight: 400; color: var(--fg); }
.prose p, .prose li { max-width: 68ch; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose a { color: var(--fg); border-bottom: 1px solid var(--field-line); }
.prose a:hover { border-bottom-color: var(--fg); }
.prose .meta { color: var(--muted); font-size: 14px; margin-bottom: 2.5em; }
.prose .todo { color: var(--accent); font-family: var(--font-display); font-size: .92em; }
.prose table { border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; width: 100%; max-width: 68ch; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); }
.prose th { color: var(--fg); font-weight: 400; white-space: nowrap; }

/* ── Home: hero ────────────────────────────────────────────────────────── */
.hero { position: relative; height: 210vh; min-height: 1300px; }
.hero__stage {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
  overflow: clip; display: grid; align-items: end;
  padding: clamp(60px, 12vh, 160px) 0 clamp(70px, 12vh, 150px); background: #000;
}
.hero__mark { position: absolute; right: -5vw; top: 50%; transform: translateY(-50%); height: min(108vh, 1080px); width: auto; pointer-events: none; }
#legA { opacity: .22; transform: translate(-150px, 120px); }
#legB { opacity: .22; transform: translate(-40px, -150px); }
.hero__copy { position: relative; z-index: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); animation: rise 1s cubic-bezier(.2, .7, .2, 1) .35s both; }
.hero h1 { margin: 0; font-size: clamp(40px, 5.7vw, 94px); line-height: 1.02; letter-spacing: -.012em; max-width: 13em; text-wrap: balance; }
.hero__sub { margin: 30px 0 0; max-width: 31em; color: var(--muted); font-size: clamp(16px, 1.25vw, 20px); line-height: 1.55; }
.hero__cta { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-top: 44px; }
.scroll-cue { position: absolute; left: 0; right: 0; bottom: clamp(22px, 4vh, 40px); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--dim); pointer-events: none; }
.scroll-cue span { font-family: var(--font-display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.scroll-cue svg { width: 12px; height: 22px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Home: calibration plane ───────────────────────────────────────────── */
.motion { position: relative; height: 280vh; min-height: 1600px; background: #000; }
.motion__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: clip; background: #000; perspective: 1100px; perspective-origin: 50% 46%; }
.motion__plane { width: min(150vw, 150vh); height: min(150vw, 150vh); transform-style: preserve-3d; transform: rotateX(66deg) rotateZ(-20deg); }
.motion__plane svg { width: 100%; height: 100%; overflow: visible; }
#ring { transform-box: fill-box; transform-origin: center; opacity: .25; }
#axisH { transform: translateX(-190px); }
#axisV { transform: translateY(190px); }
#dot { opacity: 0; }

/* ── Home: pillars over the road ───────────────────────────────────────── */
.pillars { position: relative; height: 360vh; min-height: 2200px; }
.pillars__stage {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
  overflow: clip; background: #000;
}
.pillars__road { position: absolute; inset: 0; width: 100%; height: 100%; }
.pillars__fade { position: absolute; left: 0; right: 0; pointer-events: none; }
.pillars__fade--top { top: 0; height: 50%; background: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .9) 40%, rgba(0, 0, 0, 0) 100%); }
.pillars__fade--bottom { bottom: 0; height: 22%; background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 100%); }
.pillars__layer { position: absolute; inset: 0; padding: clamp(46px, 7vh, 90px) var(--gutter) clamp(54px, 8vh, 104px); }
.pillars__list { display: flex; flex-direction: column; justify-content: space-between; gap: clamp(18px, 3vh, 44px); height: 100%; max-width: 1360px; margin: 0 auto; }
.pillar { align-self: flex-start; max-width: min(36ch, 44vw); opacity: 0; transform: translateX(-28px); }
.pillar--right { align-self: flex-end; text-align: right; transform: translateX(28px); }
.pillar__rule { display: block; width: 44px; height: 2px; background: var(--accent); }
.pillar--right .pillar__rule { margin-left: auto; }
.pillar h2 { margin: 20px 0 0; font-size: clamp(25px, 2.7vw, 40px); line-height: 1.06; letter-spacing: -.01em; }
.pillar p { margin: 16px 0 0; color: var(--soft); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; }

/* ── Home: steps band ──────────────────────────────────────────────────── */
.steps { position: relative; height: 200vh; min-height: 1100px; }
.steps__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: clip; background: #000; }
.steps__band { position: relative; width: 100%; height: clamp(240px, 40vh, 400px); overflow: hidden; }
.steps__band svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#cadGroup rect { opacity: 0; }

/* ── Home: contact ─────────────────────────────────────────────────────── */
.contact { padding: clamp(60px, 11vh, 140px) var(--gutter) clamp(90px, 17vh, 210px); }
.contact h2 { margin: 0; font-size: clamp(30px, 3.6vw, 55px); line-height: 1.08; letter-spacing: -.01em; max-width: 16em; text-wrap: balance; }
.contact__lede { margin: 22px 0 0; color: var(--muted); max-width: 28em; font-size: 17px; line-height: 1.6; }
.contact__toggle { margin-top: clamp(32px, 5vh, 48px); }
.reveal { overflow: hidden; max-height: 0; opacity: 0; transition: max-height 460ms cubic-bezier(.2, 0, .1, 1), opacity 320ms linear; }
.reveal.is-open { opacity: 1; }
.contact__form { margin-top: clamp(34px, 5vh, 52px); border-top: 1px solid var(--line); padding-top: clamp(30px, 4vh, 44px); }
.contact__form .btn[type="submit"] { justify-self: start; margin-top: 8px; }
.newsletter { margin-top: clamp(56px, 9vh, 104px); border-top: 1px solid var(--line); padding-top: clamp(28px, 4vh, 40px); }
.newsletter .form-slot { margin-top: 18px; }
.newsletter__row { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.newsletter__row .field { flex: 1 1 260px; width: auto; }
.newsletter .consent { margin-top: 14px; }
.newsletter .done p { margin: 0; color: var(--soft); font-size: 17px; }

/* ── Motion preferences ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pillar, #legA, #legB { opacity: 1; transform: none; }
  #cadGroup rect { opacity: 1; }
}

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .brand__word { display: none; }
  .brand__mark { display: block; }
  .site-footer .brand img { height: 26px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 4px var(--gutter) 16px; background: rgba(0, 0, 0, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { font-size: 17px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .hero__mark { right: -28vw; height: min(92vh, 720px); }
  .pillar, .pillar--right { max-width: min(36ch, 100%); }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
}
@media (max-width: 420px) {
  .btn { padding: 14px 20px; }
  .hero__cta { margin-top: 36px; }
}

/* ── Tables on narrow screens (legal pages) ────────────────────────────── */
@media (max-width: 720px) {
  .prose table.stack thead { display: none; }
  .prose table.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .prose table.stack td { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; border: 0; padding: 4px 0; }
  .prose table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 13px; padding-top: 2px; }
  .prose table.kv tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .prose table.kv th, .prose table.kv td { display: block; border: 0; padding: 2px 0; white-space: normal; }
  .prose table.kv th { color: var(--muted); font-size: 13px; }
}
