/* ==========================================================================
   AUTOCON — design system
   One set of markup that reflows. Type and spacing scale with the viewport
   via clamp(), so no width is ever a shrunken or magnified copy of a canvas.
   ========================================================================== */

:root {
  /* ground tones — off-black and off-white, never pure */
  --ink:        #0C0D0E;
  --ink-deep:   #08090A;
  --hair:       #1E2226;
  --hair-soft:  #16191B;

  --concrete:   #E9E6E0;
  --concrete-2: #F4F2ED;
  --paper:      #F5F3EE;

  --on-dark:       #EDEBE6;
  --on-dark-mute:  #A8AEB3;
  --on-dark-dim:   #8E969C;
  --on-dark-faint: #5F676D;

  --on-light:      #15181A;
  --on-light-mute: #4E5457;
  --on-light-dim:  #5A5E62;

  --accent: #EDEBE6;          /* the one "accent" is an off-white */

  --line-dark:  #2A3035;
  --line-light: #D2CEC6;

  /* fluid type */
  --t-h1:   clamp(2.25rem, 1.30rem + 4.20vw, 4.10rem);
  --t-h2:   clamp(1.75rem, 1.25rem + 2.20vw, 2.75rem);
  --t-h3:   clamp(1.15rem, 1.05rem + 0.45vw, 1.38rem);
  --t-lead: clamp(1.00rem, 0.95rem + 0.30vw, 1.13rem);
  --t-body: clamp(0.94rem, 0.90rem + 0.18vw, 1.00rem);
  --t-mono: clamp(0.63rem, 0.60rem + 0.12vw, 0.69rem);

  /* fluid rhythm */
  --gutter: clamp(1.25rem, 0.60rem + 2.80vw, 5rem);
  --sec-y:  clamp(3.5rem,  2.20rem + 4.20vw, 6rem);
  --gap:    clamp(1rem,    0.70rem + 1.20vw, 1.5rem);
  --stack:  clamp(1.1rem,  0.90rem + 0.80vw, 1.6rem);

  --maxw: 1280px;
  --radius: 8px;
}

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

html { background: var(--ink); scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-dark);
  font-family: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .72; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── type roles ─────────────────────────────────────────────────────────── */
.display {
  font-family: 'Archivo', 'Helvetica Neue', sans-serif;
  font-variation-settings: 'wdth' 112, 'wght' 800;
  line-height: 1.02; letter-spacing: -.022em; text-wrap: balance;
}
h1.display { font-size: var(--t-h1); }
h2.display { font-size: var(--t-h2); line-height: 1.05; letter-spacing: -.018em; }
h3.display {
  font-family: 'Archivo', 'Helvetica Neue', sans-serif;
  font-variation-settings: 'wdth' 106, 'wght' 700;
  font-size: var(--t-h3); line-height: 1.2; letter-spacing: -.01em;
}
.lead { font-size: var(--t-lead); line-height: 1.6; color: var(--on-dark-mute); }
.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--t-mono); letter-spacing: .2em; text-transform: uppercase;
}
.measure { max-width: 62ch; }

/* ── layout ─────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: var(--sec-y); }
.sec--light { background: var(--concrete); color: var(--on-light); }
.sec--light p, .sec--light .lead { color: var(--on-light-mute); }
.sec--band { background: var(--paper); color: var(--ink); }
.sec--band p { color: #3A3D40; }
.stack { display: flex; flex-direction: column; gap: var(--stack); }
.stack--tight { gap: .75rem; }

.eyebrow { display: flex; align-items: center; gap: .75rem; color: var(--accent); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
.sec--light .eyebrow, .sec--band .eyebrow { color: var(--on-light-dim); }

.head { display: grid; gap: var(--gap); align-items: end; }
@media (min-width: 900px) {
  .head { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.75rem); }
}

.split { display: grid; gap: clamp(1.75rem, 4vw, 2.5rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .split--flip > .split__visual { order: -1; } }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.grid--tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

/* ── header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(12,13,14,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hair);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); min-height: 4.25rem; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: auto; height: clamp(1.05rem, .85rem + .6vw, 1.4rem); }
.nav { display: none; align-items: center; gap: clamp(1.25rem, 2.2vw, 2.15rem); }
@media (min-width: 880px) { .nav { display: flex; } }
.nav a { font-size: .9rem; font-weight: 500; color: #C4C9CD; }
.nav a[aria-current="page"] { color: var(--on-dark); border-bottom: 2px solid var(--accent); padding-bottom: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding-inline: 1.4rem;
  font-size: .9rem; font-weight: 600; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #12100E; }
.btn--ghost { border: 1px solid #3A4045; color: var(--on-dark); }
.sec--light .btn--primary { background: var(--on-light); color: var(--concrete-2); }
.sec--light .btn--ghost { border-color: #C0BCB4; color: var(--on-light); }
.btns { display: flex; flex-wrap: wrap; gap: .75rem; }

.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; margin-right: -.6rem;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--on-dark);
}
@media (min-width: 880px) { .menu-btn { display: none; } }
.menu { display: none; flex-direction: column; border-top: 1px solid var(--hair); padding-block: .5rem 1.25rem; }
.menu[data-open="true"] { display: flex; }
@media (min-width: 880px) { .menu { display: none !important; } }
.menu a { padding-block: .85rem; font-size: 1rem; border-bottom: 1px solid var(--hair-soft); }
.menu .btn { margin-top: .9rem; border-bottom: 0; }

/* ── imagery ────────────────────────────────────────────────────────────── */
.plate { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-dark); background: #fff; }
.sec--light .plate { border-color: var(--line-light); }
.plate > img { width: 100%; height: 100%; object-fit: cover; }
.plate--ivory { background: #F2EFEB; }
.plate--wide { aspect-ratio: 16 / 9; }
.plate--banner { aspect-ratio: 2 / 1; }
@media (max-width: 640px) { .plate--banner { aspect-ratio: 3 / 2; } }

/* machine renders sit on a blueprint field rather than in a frame */
.field {
  display: grid; place-items: center; padding: clamp(.5rem, 2vw, 1.5rem);
  background-image:
    linear-gradient(#191D21 1px, transparent 1px),
    linear-gradient(90deg, #191D21 1px, transparent 1px);
  background-size: clamp(26px, 3.2vw, 40px) clamp(26px, 3.2vw, 40px);
}
.field img { width: 100%; height: auto; }

/* ── components ─────────────────────────────────────────────────────────── */
.pillar { display: flex; flex-direction: column; gap: .8rem; border-top: 1px solid var(--hair); padding-top: 1.1rem; }
.sec--light .pillar { border-top-color: #C6C2BA; }
.pillar__n { color: var(--accent); }
.sec--light .pillar__n { color: var(--on-light); }
.more {
  align-self: flex-start; font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}

.card { border: 1px solid var(--hair); border-radius: var(--radius); padding: clamp(1.1rem, 2vw, 1.6rem); display: flex; flex-direction: column; gap: .7rem; }
.sec--light .card { border-color: var(--line-light); }

.tile { border: 1px solid var(--line-light); border-radius: var(--radius); overflow: hidden; background: var(--concrete-2); display: flex; flex-direction: column; }
.tile__band { aspect-ratio: 5 / 1.4; border-bottom: 1px solid var(--line-light); }
.tile__band img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: clamp(.85rem, 1.6vw, 1.25rem); display: flex; flex-direction: column; gap: .45rem; }
.tile__note { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .72rem; color: #6A6E71; letter-spacing: .03em; }

.specs { display: flex; flex-direction: column; }
.spec { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: .85rem; border-top: 1px solid var(--hair); margin: 0; }
.specs > .spec:last-of-type { border-bottom: 1px solid var(--hair); }
.spec dt { color: var(--on-dark-dim); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: var(--t-mono); letter-spacing: .18em; text-transform: uppercase; }
.spec dd { margin: 0; font-weight: 500; text-align: right; }

.logos { display: grid; gap: var(--gap); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(45%, 9rem), 1fr)); border-top: 1px solid var(--hair); padding-top: clamp(1.25rem, 3vw, 1.75rem); }
.logos img { width: 100%; height: clamp(3.4rem, 6vw, 5.5rem); object-fit: contain; opacity: .82; }

.flow { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.flow__step { border: 1px solid var(--hair); border-radius: var(--radius); padding: 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.flow__step--key { border-color: var(--accent); }

.person { display: flex; flex-direction: column; gap: .55rem; border-top: 1px solid var(--line-light); padding-top: 1.1rem; }
.sec:not(.sec--light) .person { border-top-color: var(--hair); }
.person__role { color: var(--on-light-dim); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.person__bio { font-size: .94rem; line-height: 1.62; color: var(--on-light-mute); }
.person details > summary {
  cursor: pointer; list-style: none; display: inline-block; margin-top: .2rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 2px; color: var(--on-light);
}
.person details > summary::-webkit-details-marker { display: none; }
.person details[open] > summary { margin-bottom: .7rem; }
.person details p + p { margin-top: .7rem; }

.note { border: 1px dashed #BEB9B1; border-radius: var(--radius); padding: clamp(1rem, 2vw, 1.4rem); display: flex; flex-direction: column; gap: .5rem; }

.strip { border-block: 1px solid var(--hair); }
.strip__inner { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; padding-block: 1.4rem; color: var(--on-dark-dim); }

.subnav { border-block: 1px solid var(--hair); }
.subnav__inner { display: grid; gap: .75rem var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(50%, 10rem), 1fr)); padding-block: 1.5rem; }
.subnav a { display: flex; align-items: baseline; gap: .7rem; }
.subnav .n { color: var(--accent); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: var(--t-mono); letter-spacing: .2em; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer { background: var(--ink-deep); padding-block: clamp(2.75rem, 5vw, 4.5rem) 2.25rem; }
.footer__cols { display: grid; gap: clamp(1.75rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.footer__brand { display: flex; flex-direction: column; gap: 1rem; max-width: 26rem; }
@media (min-width: 760px) { .footer__brand { grid-column: span 2; } }
.footer__col { display: flex; flex-direction: column; gap: .75rem; }
.footer__col a, .footer__col span:not(.mono) { font-size: .88rem; color: #C4C9CD; }
.footer__col .mono { color: var(--on-dark-faint); }
.footer__base { margin-top: clamp(1.75rem, 4vw, 2.75rem); padding-top: 1.4rem; border-top: 1px solid var(--hair-soft); display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; }
.footer__base span { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .68rem; letter-spacing: .12em; color: var(--on-dark-faint); }

.skip { position: absolute; left: -9999px; }
.skip:focus { position: fixed; left: 1rem; top: 1rem; z-index: 200; background: var(--accent); color: #12100E; padding: .7rem 1rem; }
