/* Spira Systems — site styles
   Fluid layout. Breakpoints at 1040px, 780px and 520px. */

:root {
  --ground: #2B2B2B;
  --ground-deep: #1F1F1F;
  --surface: #333333;
  --surface-2: #2E2E2E;
  --inset: #262626;
  --line: #3E3E3E;
  --line-soft: #383838;
  --line-strong: #454545;

  --ink: #F2F0EE;
  --ink-bright: #F7F5F3;
  --ink-2: #B4B0AC;
  --ink-3: #A9A5A1;
  --ink-4: #918D89;
  --ink-5: #7A7772;

  --accent: #E5554F;
  --accent-text: #F07168;
  --on-accent: #1C1A19;

  --gutter: clamp(20px, 5vw, 72px);
  --radius: 12px;

  --display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

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

html { background: var(--ground); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--accent-text); }
a:hover { color: #F79A94; }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent-text);
  text-transform: uppercase;
}

.label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--display); margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn--solid { background: var(--accent); color: var(--on-accent); }
.btn--solid:hover { background: #F0655E; color: var(--on-accent); }
.btn--ghost { border-color: #4A4A4A; color: var(--ink); }
.btn--ghost:hover { border-color: #6A6560; color: var(--ink); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }

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

.site-head {
  background: #303030;
  border-bottom: 1px solid #3B3B3B;
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-head .wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand img { display: block; width: 259px; height: 24px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 14px; color: #CBC7C3; text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-text); }
.nav .btn--outline {
  border-color: var(--accent);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  border-width: 1px;
  border-style: solid;
}
.nav .btn--outline img { display: block; width: 87px; height: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #4A4A4A;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  color: var(--ink);
  cursor: pointer;
}

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

.hero { background: var(--ground-deep); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 104px);
}
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink-bright);
  text-wrap: balance;
}
.hero p {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.6;
  color: #B0ACA8;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 500 / 380;
  border-radius: var(--radius);
  background: var(--inset);
  border: 1px solid var(--line);
  overflow: hidden;
}
.frame svg { display: block; width: 100%; height: 100%; }

/* ---------- client strip ---------- */

.clients { border-bottom: 1px solid var(--line-soft); }
.clients .wrap {
  padding-block: clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.clients__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 4vw, 46px);
}
.clients__row img { display: block; }

/* ---------- generic section ---------- */

.section { padding-block: clamp(56px, 7vw, 88px); }
.section--rule { border-top: 1px solid var(--line-soft); }

.section__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.section__head h2 {
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section__head p {
  margin: 0;
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
}

.niche { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.niche h2 {
  max-width: 22ch;
  font-weight: 700;
  font-size: clamp(24px, 3.6vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.niche p { margin: 0; max-width: 68ch; font-size: 16px; line-height: 1.7; color: var(--ink-3); }

/* ---------- process ---------- */

.process__panel {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 383px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.process__stage {
  position: relative;
  aspect-ratio: 3 / 2;
  border-right: 1px solid var(--line);
  background: #242424;
  overflow: hidden;
}
.process__side {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.process__now {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 3.2vw, 38px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent-text);
}
.process__desc { font-size: 14px; line-height: 1.55; color: var(--ink-2); min-height: 44px; }

.steps { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.step {
  min-height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  transition: border-color 260ms ease, background-color 260ms ease;
}
.step__n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid #5A5A5A;
  color: var(--ink-3);
}
.step__name {
  flex-grow: 1;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}
.step__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #4F4F4F; }

.step.is-live { border-color: var(--accent); background: rgba(229, 85, 79, 0.12); }
.step.is-live .step__n { border-color: var(--accent); color: var(--accent); }
.step.is-live .step__name { color: var(--ink); }
.step.is-live .step__dot { background: var(--accent); }

.stage-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-5);
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* ---------- card grids ---------- */

.grid {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card__art {
  background: var(--inset);
  border-bottom: 1px solid var(--line);
  line-height: 0;
}
.card__art svg { width: 100%; height: auto; display: block; }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.card__body h3 { font-weight: 500; font-size: 18px; color: var(--ink); }
.card__body p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.card__meta { font-size: 10px; letter-spacing: 0.16em; color: var(--ink-5); text-transform: uppercase; }
.card__result { font-size: 13px; letter-spacing: 0.06em; color: var(--accent-text); }

.card--cta {
  background: var(--surface-2);
  border-color: var(--accent);
  padding: 28px;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
}
.card--cta h3 { font-weight: 500; font-size: 20px; line-height: 1.3; color: var(--ink); }
.card--cta p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.card--cta span { font-size: 14px; font-weight: 600; color: var(--accent-text); }

.case__art {
  aspect-ratio: 16 / 10;
  background: var(--inset);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-5);
}

/* ---------- product ---------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.product__copy { display: flex; flex-direction: column; gap: 20px; }
.product__mark { display: block; width: 285px; height: 46px; max-width: 100%; }
.product__copy p { margin: 0; max-width: 56ch; font-size: 16px; line-height: 1.7; color: var(--ink-3); }
.product__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.product__list li { display: flex; gap: 12px; font-size: 15px; line-height: 1.5; color: #D2CFCC; }
.product__list li::before { content: "—"; color: var(--accent-text); }

.spec { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.spec__head { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.spec__row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.spec__row:last-child { border-bottom: 0; }
.spec__row dt { font-size: 10px; letter-spacing: 0.14em; color: var(--ink-4); text-transform: uppercase; }
.spec__row dd { margin: 0; font-size: 14px; color: #D2CFCC; }
.spec__row dd.is-todo { color: var(--ink-4); }

/* ---------- work ---------- */

.work__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.work__head h2 { font-weight: 700; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em; }
.work__head a { font-size: 15px; font-weight: 600; text-decoration: none; }

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

.contact {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
.contact h2 {
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink-bright);
}
.contact p { margin: 0; max-width: 50ch; font-size: 16px; line-height: 1.65; color: var(--ink-3); }
.contact__meta { font-size: 12px; line-height: 2; letter-spacing: 0.12em; color: var(--ink-4); text-transform: uppercase; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 10px; letter-spacing: 0.18em; color: var(--ink-4); text-transform: uppercase; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--inset);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
}
.field input { height: 48px; padding-block: 0; }
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.form .btn { width: 100%; }

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

.site-foot { border-top: 1px solid #3B3B3B; background: var(--inset); }
.site-foot .wrap { padding-block: clamp(40px, 5vw, 56px); display: flex; flex-direction: column; gap: 32px; }
.foot__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.foot__brand { display: flex; flex-direction: column; gap: 12px; }
.foot__brand img { display: block; width: 237px; height: 22px; }
.foot__brand p { margin: 0; font-size: 14px; line-height: 1.7; color: #928E8A; }
.foot__col { display: flex; flex-direction: column; gap: 11px; }
.foot__col h2 { font-family: var(--body); font-size: 10px; font-weight: 400; letter-spacing: 0.18em; color: #7E7A76; text-transform: uppercase; }
.foot__col a { font-size: 14px; color: #BFBBB7; text-decoration: none; }
.foot__col a:hover { color: var(--ink); }
.foot__base {
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #7E7A76;
  text-transform: uppercase;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
}

/* ---------- breakpoints ---------- */

@media (max-width: 1040px) {
  .process__panel { grid-template-columns: 1fr; }
  .process__stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .product { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__frame { order: -1; }
}

@media (max-width: 780px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: #303030;
    border-bottom: 1px solid #3B3B3B;
  }
  .nav.is-open a { padding: 12px 0; font-size: 16px; }
  .nav.is-open .btn--outline { justify-content: center; margin-top: 8px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-head .wrap { position: relative; }
  .brand img { width: 200px; height: 18.5px; }
}

@media (max-width: 620px) {
  .grid--3 { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .spec__row { grid-template-columns: 1fr; gap: 4px; }
  .product__mark { width: 220px; height: 35px; }
}

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