/* ============================================================
   ZirCx — Commissioning Intelligence
   Palantir-caliber dark cinematic landing page
   ============================================================ */

:root {
  --bg: #070F1E;
  --bg-alt: #09142A;
  --panel: #0E1F3C;
  --accent: #E8500A;
  --gold: #F5A623;
  --teal: #0EA5E9;
  --text: #E8F0FA;
  --muted: #5A7A9A;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-soft: rgba(255, 255, 255, 0.06);
  --font-display: "Rajdhani", sans-serif;
  --font-mono: "Space Mono", monospace;
  --font-body: "DM Sans", sans-serif;
  --nav-h: 68px;
  --container: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: var(--text); text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography primitives ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 20px;
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  margin: 0;
  color: var(--text);
}

.display-xl { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }

.display .accent { color: var(--accent); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 1.2em;
}

.lede-secondary { color: var(--muted); }

.body-copy {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1.2em;
}

.body-copy strong, .lede strong { color: var(--text); font-weight: 600; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  line-height: 1;
  padding: 15px 30px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #FFF6EF;
}
.btn-primary:hover {
  background: #FF5F14;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm { padding: 10px 18px; font-size: 0.82rem; }
.btn-lg { padding: 18px 38px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(7, 15, 30, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline-soft);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  color: var(--text);
}
.nav-wordmark-cx { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--hairline);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 28px;
  background: rgba(7, 15, 30, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.mobile-menu a:hover { color: var(--text); }
.mobile-menu .mobile-launch { color: var(--gold); }
.mobile-menu .btn { margin-top: 16px; border-bottom: none; color: #FFF6EF; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  background: radial-gradient(ellipse 120% 80% at 50% -10%, #0C1B36 0%, var(--bg) 60%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(232, 240, 250, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 240, 250, 0.032) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 30%, transparent 78%);
}

.hero-glow {
  position: absolute;
  width: 900px;
  height: 900px;
  left: 50%;
  top: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 80, 10, 0.11) 0%, transparent 62%);
  transform: translate(-50%, -30%);
  animation: glowDrift 22s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-glow-2 {
  width: 700px;
  height: 700px;
  left: 72%;
  top: 68%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.07) 0%, transparent 60%);
  animation: glowDrift2 28s ease-in-out infinite alternate;
}

@keyframes glowDrift {
  from { transform: translate(-58%, -34%) scale(1); }
  to   { transform: translate(-42%, -22%) scale(1.12); }
}
@keyframes glowDrift2 {
  from { transform: translate(-50%, -50%) scale(1.08); }
  to   { transform: translate(-64%, -38%) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.hero-eyebrow {
  color: var(--gold);
  margin-bottom: 28px;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.7rem, 9.5vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: 0.015em;
  margin: 0;
}
.hero-headline em {
  font-style: normal;
  color: var(--accent);
}
.hero-line { display: block; }

.hero-rule {
  width: 72px;
  height: 2px;
  background: var(--accent);
  margin: 36px auto 32px;
}

.hero-subhead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 44px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero entrance */
.hero-eyebrow, .hero-headline .hero-line, .hero-rule, .hero-subhead, .hero-ctas {
  opacity: 0;
  transform: translateY(22px);
  animation: heroIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-headline .hero-line:nth-child(1) { animation-delay: 0.12s; }
.hero-headline .hero-line:nth-child(2) { animation-delay: 0.24s; }
.hero-rule    { animation-delay: 0.38s; }
.hero-subhead { animation-delay: 0.48s; }
.hero-ctas    { animation-delay: 0.60s; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-cue-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: cuePulse 2.2s ease-in-out infinite;
}
@keyframes cuePulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.75); transform-origin: top; }
  50%      { opacity: 1;    transform: scaleY(1); }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(88px, 12vw, 150px) 0;
  position: relative;
}

.section-head { margin-bottom: clamp(44px, 6vw, 72px); }

.section-head .eyebrow::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 14px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Thesis ---------- */

.thesis {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}

.thesis-body { max-width: 780px; margin-bottom: clamp(48px, 6vw, 80px); }

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}

.pillar {
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 36px 28px 40px;
  position: relative;
  transition: background-color 0.3s ease;
}
.pillar:hover { background: rgba(232, 80, 10, 0.045); }
.pillar::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.35s ease;
}
.pillar:hover::before { width: 100%; }

.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 26px;
}
.pillar-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin: 0 0 10px;
}
.pillar-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.5rem;
  line-height: 1.1;
  margin: 0 0 12px;
}
.pillar-text {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

/* Stagger pillar reveals */
.pillar:nth-child(1) { transition-delay: 0s; }
.pillar:nth-child(2) { transition-delay: 0.1s; }
.pillar:nth-child(3) { transition-delay: 0.2s; }
.pillar:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Platform ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.platform-copy .lede { max-width: 460px; }

.platform-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.platform-item {
  padding: 30px 0 30px 28px;
  border-bottom: 1px solid var(--hairline);
  border-left: 2px solid transparent;
  transition: border-left-color 0.3s ease;
}
.platform-item:hover { border-left-color: var(--accent); }

.platform-item-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  color: var(--gold);
  margin: 0 0 8px;
}
.platform-item-text {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  max-width: 560px;
}

/* ---------- Liquid cooling ---------- */

.liquid {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}

.liquid-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.liquid-copy .lede { max-width: 560px; }
.liquid-copy .body-copy { max-width: 560px; }

.liquid-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hairline);
  background: rgba(14, 31, 60, 0.45);
}

.liquid-spec {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline-soft);
}
.liquid-spec:last-child { border-bottom: none; }

.spec-key {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--teal);
  white-space: nowrap;
}
.spec-val {
  font-size: 0.92rem;
  color: var(--text);
}

/* ---------- Capabilities ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.cap-tile {
  background: var(--bg);
  padding: 34px 30px 38px;
  position: relative;
  transition: background-color 0.3s ease;
}
.cap-tile:hover { background: var(--panel); }
.cap-tile::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.3s ease;
}
.cap-tile:hover::after { opacity: 1; width: 56px; }

.cap-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin: 0 0 18px;
}
.cap-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.28rem;
  line-height: 1.15;
  margin: 0 0 10px;
}
.cap-text {
  font-size: 0.93rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Neoclouds ---------- */

.neoclouds {
  background:
    radial-gradient(ellipse 70% 90% at 80% 20%, rgba(232, 80, 10, 0.07) 0%, transparent 60%),
    var(--bg-alt);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}

.neoclouds-inner { max-width: 820px; }
.neoclouds-lede { margin-top: 28px; color: var(--muted); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 60px);
  margin-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--hairline);
  padding-top: clamp(36px, 4vw, 56px);
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: var(--text);
  margin: 0 0 10px;
}
.stat-unit {
  font-family: var(--font-mono);
  font-size: 0.4em;
  color: var(--gold);
  letter-spacing: 0.14em;
  margin-left: 6px;
}
.stat-caption {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
  max-width: 260px;
}

.stat:nth-child(1) { transition-delay: 0s; }
.stat:nth-child(2) { transition-delay: 0.12s; }
.stat:nth-child(3) { transition-delay: 0.24s; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.about-grid .section-head { margin-bottom: 0; }

.about-copy { max-width: 620px; }

.about-sig {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  color: var(--muted);
  margin: 40px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.about-sig-mark {
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.contact-intro .lede { color: var(--muted); margin-top: 24px; max-width: 440px; }

.contact-direct {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 36px;
}
.contact-direct a {
  color: var(--gold);
  border-bottom: 1px solid rgba(245, 166, 35, 0.35);
  transition: border-color 0.2s ease;
}
.contact-direct a:hover { border-bottom-color: var(--gold); }

.contact-form-wrap {
  background: rgba(14, 31, 60, 0.5);
  border: 1px solid var(--hairline);
  padding: clamp(28px, 4vw, 44px);
  position: relative;
}
.contact-form-wrap::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 64px;
  height: 2px;
  background: var(--accent);
}

.contact-form { display: flex; flex-direction: column; gap: 22px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; }

.form-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-field .optional { color: rgba(90, 122, 154, 0.6); text-transform: none; letter-spacing: 0.05em; }

.form-field input,
.form-field textarea {
  background: rgba(7, 15, 30, 0.65);
  border: 1px solid var(--hairline);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border-radius: 0;
  transition: border-color 0.2s ease;
  width: 100%;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(90, 122, 154, 0.55); }

.form-error {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #FF7A4D;
  margin: 0;
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 40px 20px;
}
.form-success-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.5rem;
  margin: 0;
}
.form-success-text {
  color: var(--muted);
  margin: 0;
  max-width: 380px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline-soft);
  background: var(--bg);
  padding: 56px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; gap: 14px; align-items: flex-start; }

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.footer-by {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: none;
  font-weight: 400;
}
.footer-tagline {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--gold); }

.footer-legal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(90, 122, 154, 0.7);
  margin: 0;
  width: 100%;
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: flex; }
  .nav { background: rgba(7, 15, 30, 0.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--hairline-soft); }

  .platform-grid,
  .liquid-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .stat-row { grid-template-columns: 1fr; gap: 36px; }
  .stat-caption { max-width: none; }
}

@media (max-width: 620px) {
  .pillars { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-bottom: 100px; }
  .hero-ctas .btn { width: 100%; }
  .footer-inner { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-glow, .hero-glow-2, .scroll-cue-line {
    animation: none;
  }

  .hero-eyebrow, .hero-headline .hero-line, .hero-rule, .hero-subhead, .hero-ctas {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
