/* ============================================================
   ConsultX Enterprises — The Neutral Frame
   Dark warm-charcoal, structural gold, Red Hat family.
   ============================================================ */

:root {
  /* palette — warm charcoal tinted toward the gold hue, OKLCH */
  --bg:          oklch(0.17 0.010 85);
  --bg-raised:   oklch(0.21 0.012 85);
  --bg-well:     oklch(0.14 0.008 85);
  --ink:         oklch(0.95 0.008 90);   /* warm off-white */
  --ink-soft:    oklch(0.78 0.014 88);   /* secondary text — ≥4.5:1 on --bg */
  --gold:        oklch(0.78 0.132 92);   /* evolved #D2AE34 */
  --gold-deep:   oklch(0.66 0.120 90);
  --gold-dim:    oklch(0.78 0.132 92 / 0.28);  /* rails, hairlines */
  --gold-faint:  oklch(0.78 0.132 92 / 0.10);
  --line:        oklch(0.34 0.014 88);
  --error:       oklch(0.72 0.16 30);
  --ok:          oklch(0.80 0.12 140);

  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-body:    "Red Hat Text", system-ui, sans-serif;
  --font-mono:    "Red Hat Mono", ui-monospace, monospace;

  /* z-scale */
  --z-sticky: 20;
  --z-menu:   30;

  --measure: 68ch;
  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: var(--z-menu);
  background: var(--gold); color: var(--bg-well);
  padding: 0.5rem 1rem; font-family: var(--font-mono); font-size: 0.85rem;
  transform: translateY(-300%);
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.button--gold {
  background: var(--gold);
  color: oklch(0.18 0.02 85);
  font-weight: 500;
}
.button--gold:hover { background: var(--ink); border-color: var(--ink); color: var(--bg-well); }
.button--gold:active { transform: translateY(1px); }
.button[disabled] { opacity: 0.5; cursor: default; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: oklch(0.17 0.010 85 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem var(--pad-x);
  max-width: 82rem; margin-inline: auto;
}
.nav__brand img { width: auto; height: 34px; }
.nav__menu {
  display: flex; align-items: center; gap: 2rem;
  list-style: none; margin: 0; padding: 0;
}
.nav__menu a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4rem 0;
}
.nav__menu a:hover { color: var(--gold); }
.nav__menu .nav__cta {
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 0.45rem 1.1rem;
}
.nav__menu .nav__cta:hover { border-color: var(--gold); }
.nav__toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  max-width: 82rem; margin-inline: auto;
  padding: clamp(5rem, 12vh, 9rem) var(--pad-x) clamp(4rem, 9vh, 7rem);
}
.hero__entity {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}
.hero__title {
  font-size: clamp(2.6rem, 7.5vw, 5.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.hero__lede {
  max-width: 44ch;
  margin-top: 1.75rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--ink-soft);
}
.hero__ticker {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1rem;
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero__tick { color: var(--gold); }
.hero .button { margin-top: 2.75rem; }

/* ---------- the stack (signature) ---------- */
.stack {
  border-block: 1px solid var(--line);
  background: var(--bg-well);
  padding: clamp(4rem, 9vh, 7rem) var(--pad-x);
}
.stack__intro { max-width: 82rem; margin-inline: auto; }
.stack__intro h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stack__intro p {
  max-width: var(--measure);
  margin-top: 1.25rem;
  color: var(--ink-soft);
}

/* the rack frame */
.rack {
  max-width: 82rem;
  margin: 3.5rem auto 0;
  border: 1px solid var(--gold-dim);
  border-top-width: 3px;
  border-bottom-width: 3px;
  position: relative;
}
/* rack rails: vertical hole strips left + right */
.rack::before, .rack::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 1.4rem;
  background-image: radial-gradient(circle 2.5px, var(--gold-dim) 100%, transparent 0);
  background-size: 1.4rem 1.9rem;
  background-position: center;
  background-repeat: repeat-y;
}
.rack::before { left: 0; border-right: 1px solid var(--gold-faint); }
.rack::after  { right: 0; border-left: 1px solid var(--gold-faint); }

.unit { border-bottom: 1px solid var(--line); }
.unit:last-child { border-bottom: none; }

.unit__head {
  display: grid;
  grid-template-columns: auto auto minmax(9rem, 14rem) 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.6rem 3rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 200ms var(--ease-out);
}
.unit__head::-webkit-details-marker { display: none; }
.unit__head:hover { background: var(--gold-faint); }

.unit__u {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.unit__led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line);
  transition: background-color 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.unit.is-live .unit__led {
  background: var(--gold);
  box-shadow: 0 0 8px 1px var(--gold-dim);
}
.unit__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.unit__line { color: var(--ink-soft); font-size: 0.98rem; }
.unit__chevron {
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 250ms var(--ease-out);
}
.unit[open] .unit__chevron { transform: rotate(225deg); }

.unit__body { padding: 0 3rem 2rem; }
.unit__spec {
  columns: 2;
  column-gap: 3rem;
  max-width: 62rem;
  margin: 0; padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.unit__spec li {
  padding: 0.4rem 0;
  border-bottom: 1px solid oklch(0.28 0.012 88);
  break-inside: avoid;
}

/* ---------- approach ---------- */
.approach {
  max-width: 82rem; margin-inline: auto;
  padding: clamp(4rem, 9vh, 7rem) var(--pad-x);
}
.approach__head h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.approach__head p {
  max-width: var(--measure);
  margin-top: 1.25rem;
  color: var(--ink-soft);
}
.approach__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem 3rem;
  margin: 3.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.approach__steps li {
  counter-increment: step;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  position: relative;
}
.approach__steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.approach__steps h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.5rem;
}
.approach__steps p {
  margin-top: 0.75rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* ---------- ideologies ---------- */
.ideologies {
  border-block: 1px solid var(--line);
  background: var(--bg-raised);
  padding: clamp(4rem, 9vh, 7rem) var(--pad-x);
}
.ideologies h2 {
  max-width: 82rem; margin-inline: auto;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ideologies__list {
  max-width: 82rem;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem 3rem;
}
.ideologies__item dt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.ideologies__item dd {
  margin: 0.75rem 0 0;
  color: var(--ink);
  font-size: 1.02rem;
}

/* ---------- industries ---------- */
.industries {
  max-width: 82rem; margin-inline: auto;
  padding: clamp(4rem, 8vh, 6rem) var(--pad-x);
}
.industries h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.industries__list {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin: 2rem 0 0; padding: 0;
  list-style: none;
}
.industries__list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
}

/* ---------- contact ---------- */
.contact {
  border-top: 1px solid var(--line);
  background: var(--bg-well);
  padding: clamp(4rem, 9vh, 7rem) var(--pad-x);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 4rem;
  max-width: 82rem;
  margin-inline: auto;
}
.contact__info h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.contact__address { font-style: normal; margin-top: 2rem; color: var(--ink-soft); }
.contact__entity { color: var(--ink); font-weight: 500; margin-bottom: 0.5rem; }
.contact__lines {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 0.6rem;
}
.contact__lines a { color: var(--ink); text-decoration: none; }
.contact__lines a:hover { color: var(--gold); }
.contact__label {
  display: inline-block; width: 6.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.contact__social {
  display: flex; gap: 0.75rem;
  list-style: none; margin: 2.5rem 0 0; padding: 0;
}
.contact__social a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.contact__social a:hover { color: var(--gold); border-color: var(--gold-dim); }

.contact__form-intro { color: var(--ink-soft); max-width: 40ch; }
.field { margin-top: 1.5rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  transition: border-color 180ms var(--ease-out);
}
.field input:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field__error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  min-height: 1.2em;
}
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field--hp { position: absolute; left: -9999px; }
.contact__form .button { margin-top: 2rem; }
.contact__form-status { margin-top: 1rem; font-size: 0.95rem; min-height: 1.4em; }
.contact__form-status.is-ok { color: var(--ok); }
.contact__form-status.is-error { color: var(--error); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem var(--pad-x);
  max-width: 82rem; margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer__maker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: oklch(0.60 0.02 88);
}

/* ---------- reveal (enhance-only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0.001;
    transform: translateY(18px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .nav__toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    background: none; border: 1px solid var(--line);
    cursor: pointer;
  }
  .nav__toggle-bar,
  .nav__toggle-bar::before,
  .nav__toggle-bar::after {
    display: block;
    width: 18px; height: 2px;
    background: var(--ink);
    position: relative;
    transition: transform 250ms var(--ease-out), opacity 200ms;
  }
  .nav__toggle-bar::before, .nav__toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav__toggle-bar::before { top: -6px; }
  .nav__toggle-bar::after  { top: 6px; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar::after  { transform: translateY(-6px) rotate(-45deg); }

  .nav__menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu li { border-top: 1px solid var(--line); }
  .nav__menu a { display: block; padding: 1rem var(--pad-x); }
  .nav__menu .nav__cta { border: none; }

  .rack::before, .rack::after { display: none; }
  .unit__head {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      "u led name chevron"
      "line line line line";
    row-gap: 0.5rem;
    padding: 1.25rem 1.25rem;
  }
  .unit__u { grid-area: u; }
  .unit__led { grid-area: led; }
  .unit__name { grid-area: name; font-size: 1.15rem; }
  .unit__line { grid-area: line; font-size: 0.92rem; }
  .unit__chevron { grid-area: chevron; justify-self: end; }
  .unit__body { padding: 0 1.25rem 1.5rem; }
  .unit__spec { columns: 1; }
}
