/* =====================================================================
   NIHNYX THEME — 2026 refresh
   Loaded AFTER style.css. Overrides look sitewide.
   To roll back: remove <link href="/public/theme.css"> from pages.
   ===================================================================== */

:root {
  --bg: #04050b;
  --bg-2: #080a14;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-hi: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(0, 224, 255, 0.35);
  --text: #e9ecf3;
  --muted: #8d95a8;
  --dim: #5c6375;
  --accent: #00e0ff;
  --accent-2: #4b3bff;
  --radius: 10px;
  --maxw: 1200px;
  --font: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SF Mono", ui-monospace, Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Replace spinning glow with calm, static light + faint grid */
body::before {
  animation: none;
  top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(75, 59, 255, 0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(0, 224, 255, 0.07), transparent 60%);
  filter: none;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

h1, h2, h3 { letter-spacing: -0.02em; font-weight: 600; }

.section-label, .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------------- Buttons ---------------- */
.btn {
  border-radius: 6px;
  padding: 0.85rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #00121a;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 rgba(0,224,255,0);
}
.btn:hover {
  background: #5cf0ff;
  color: #00121a;
  box-shadow: 0 8px 30px rgba(0, 224, 255, 0.25);
}
.btn-ghost, .btn.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover, .btn.btn-ghost:hover {
  background: var(--panel-hi);
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
  box-shadow: none;
}
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.82rem; }

/* ---------------- Header ---------------- */
header {
  padding: 0.9rem 5%;
  background: rgba(4, 5, 11, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
header .logo { letter-spacing: 0; }
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--text);
}
.brand img { width: 30px; height: 30px; display: block; }
.brand span {
  font-size: 1.15rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
header nav { gap: 2rem; }
header nav a {
  font-size: 0.9rem; color: var(--muted); font-weight: 500;
  position: relative; padding: 0.25rem 0;
}
header nav a:hover, header nav a.active { color: var(--text); }
header nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.35rem; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}
.header-cta { margin-left: auto; }
.hamburger span { background: var(--text); height: 2px; }

@media (max-width: 900px) {
  header nav { gap: 1.2rem; }
}
@media (max-width: 768px) {
  .header-cta { display: none; }
  .hamburger { right: 1.25rem !important; top: 1.35rem !important; }
  header nav {
    border-radius: 12px; max-width: 300px; padding: 1.25rem 0;
    background: rgba(8, 10, 20, 0.97);
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  }
  header nav a.active::after { display: none; }
}

/* ---------------- Layout helpers ---------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 5%; }
.section { padding: 7rem 0; position: relative; }
.section--tight { padding: 4.5rem 0; }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.15; margin: 0.75rem 0 1rem; color: var(--text); }
.section-head p { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); border: 0; }

/* ---------------- Hero ---------------- */
.hx {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 90px;
  position: relative; overflow: hidden;
}
.hx__grid {
  display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 3rem; align-items: center;
}
.hx h1 {
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  line-height: 1.04;
  margin: 1.25rem 0 1.5rem;
  color: var(--text);
}
.hx h1 .grad {
  background: linear-gradient(92deg, var(--accent) 0%, #7d8bff 60%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hx__sub { color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.18rem); max-width: 560px; line-height: 1.75; margin-bottom: 2.25rem; }
.hx__actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.hx__meta {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 4rem;
  border-top: 1px solid var(--line);
}
.hx__meta div { padding: 1.25rem 2rem 0 0; margin-right: 2rem; }
.hx__meta div + div { border-left: 1px solid var(--line); padding-left: 2rem; }
.hx__meta b { display: block; font-size: 1.5rem; font-weight: 600; color: var(--text); }
.hx__meta span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }

@media (max-width: 960px) {
  .hx__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hx__meta div, .hx__meta div + div { border-left: 0; padding-left: 0; margin-right: 1.75rem; }
}

/* ---------------- Divisions ---------------- */
.divisions {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel);
}
.division {
  padding: 2rem 1.75rem 2.25rem; position: relative;
  border-right: 1px solid var(--line);
  transition: background 0.25s ease;
  text-decoration: none; color: inherit; display: block;
}
.division:last-child { border-right: 0; }
.division:hover { background: var(--panel-hi); }
.division::before {
  content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.35s ease;
}
.division:hover::before { width: 100%; }
.division__num { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); letter-spacing: 0.15em; }
.division__icon { width: 34px; height: 34px; color: var(--accent); margin: 1.5rem 0 1.25rem; }
.division h3 { font-size: 1.2rem; color: var(--text); margin-bottom: 0.6rem; }
.division p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
.division__items { margin-top: 1.25rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--dim); text-transform: uppercase; line-height: 2; }
@media (max-width: 960px) {
  .divisions { grid-template-columns: 1fr 1fr; }
  .division:nth-child(2) { border-right: 0; }
  .division:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .divisions { grid-template-columns: 1fr; }
  .division { border-right: 0; border-bottom: 1px solid var(--line); }
  .division:last-child { border-bottom: 0; }
}

/* ---------------- Product roadmap (restyle) ---------------- */
#products .roadmap { padding: 0; }
.roadmap__grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.product-card { border-radius: var(--radius); border-color: var(--line); background: var(--panel); padding: 1.75rem 1.6rem; }
.product-card:hover { border-color: var(--line-hi); background: var(--panel-hi); }
.product-card--featured {
  border-color: var(--line-hi);
  background: linear-gradient(160deg, rgba(0,224,255,0.07), rgba(75,59,255,0.05) 60%, transparent);
}
.product-card__status { font-family: var(--mono); border-radius: 4px; font-size: 0.64rem; letter-spacing: 0.14em; }
.product-card__type { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; color: var(--dim); }
.product-card h3 { font-size: 1.18rem; }
.product-card p { color: var(--muted); }
.roadmap__note { color: var(--dim); }

/* ---------------- Principles ---------------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.principle { border-top: 1px solid var(--line); padding-top: 1.75rem; }
.principle__num { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.15em; }
.principle h3 { font-size: 1.25rem; margin: 0.9rem 0 0.7rem; color: var(--text); }
.principle p { color: var(--muted); font-size: 0.95rem; line-height: 1.75; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------------- Standards (restyle) ---------------- */
.std {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start;
}
.std__list { display: grid; gap: 0.85rem; }
.std__item {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
  padding: 1.35rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.std__badge {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--accent);
  border: 1px solid var(--line-hi); border-radius: 4px; padding: 0.3rem 0.5rem; white-space: nowrap;
}
.std__item h3 { font-size: 1rem; margin-bottom: 0.3rem; color: var(--text); }
.std__item p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }
.standards__note { color: var(--dim); }
@media (max-width: 860px) { .std { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------------- Efficiency strip ---------------- */
.eff {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
  padding: 2.25rem 2.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(0,224,255,0.05), transparent 60%);
}
.eff svg { width: 40px; height: 40px; color: var(--accent); }
.eff h3 { font-size: 1.2rem; margin-bottom: 0.4rem; color: var(--text); }
.eff p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; max-width: 820px; }
@media (max-width: 640px) { .eff { grid-template-columns: 1fr; padding: 1.75rem; } }

/* ---------------- CTA band ---------------- */
.cta-band {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 4rem 3rem; text-align: center;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(75,59,255,0.25), transparent 70%),
    radial-gradient(500px 200px at 50% 100%, rgba(0,224,255,0.12), transparent 70%),
    var(--bg-2);
}
.cta-band h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0.75rem 0 1rem; color: var(--text); }
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 2rem; line-height: 1.75; }
.cta-band .hx__actions { justify-content: center; }

/* ---------------- Footer ---------------- */
footer.site-footer {
  text-align: left; margin-top: 0; padding: 4.5rem 0 2rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.012));
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand p { margin-top: 1rem; max-width: 300px; line-height: 1.7; color: var(--muted); font-size: 0.88rem; }
.footer-col h4 {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dim); font-weight: 500; margin-bottom: 1rem;
}
.footer-col a { display: block; color: var(--muted); text-decoration: none; padding: 0.28rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: var(--dim);
}
.footer-loc { font-family: var(--mono); letter-spacing: 0.08em; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------------- Inner pages: tidy existing blocks ---------------- */
.coming-soon-page__inner h1, .legal-page__header h1 { color: var(--text); }
.legal-text h2 { color: var(--text); }
.cookie-banner { border-color: var(--line); border-radius: var(--radius); background: rgba(8, 10, 20, 0.97); }

/* Home roadmap: 4-col grid, featured card spans 2 (7 cards = 2 full rows) */
@media (min-width: 1100px) {
  #products .roadmap__grid { grid-template-columns: repeat(4, 1fr); }
  #products .product-card--featured { grid-column: span 2; }
}

@media (max-width: 768px) {
  header { justify-content: flex-start; }
  header .brand { position: static; transform: none; margin: 0; }
  .hx { min-height: auto; padding: 120px 0 3rem; }
  .hx__actions .btn { flex: 1 1 auto; text-align: center; }
}

/* Sticky header everywhere (old CSS made it scroll away) */
header { position: sticky !important; top: 0; }
.hx { min-height: calc(100vh - 64px); padding-top: 2rem; }
@media (max-width: 600px) {
  header { flex-direction: row; align-items: center; }
}
@media (max-width: 768px) {
  .hx { min-height: auto; padding: 3rem 0; }
}
.coming-soon-page--short { padding-top: 6rem; }
section.roadmap { max-width: var(--maxw); margin: 0 auto; padding: 2rem 5% 6rem; }

/* Single-column hero: big, confident, editorial */
.hx__grid--single { grid-template-columns: 1fr; }
.hx__grid--single > div { max-width: 920px; }
.hx__grid--single h1 { font-size: clamp(2.7rem, 6.2vw, 5.4rem); }
.hx__grid--single .hx__sub { max-width: 640px; }

/* ---------------- Alignment: one shared left/right edge ----------------
   --gutter = same edge as .wrap content at every screen width          */
:root { --gutter: max(5vw, calc((100vw - var(--maxw)) / 2 + 5vw)); }
.hx > .wrap { width: 100%; }                 /* flex item was shrinking + centering */
header { padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }
.coming-soon-page { padding-left: var(--gutter); padding-right: var(--gutter); }
section.roadmap { max-width: none; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap { max-width: none; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (max-width: 768px) { .hamburger { right: var(--gutter) !important; } }
.page-hero, .about-strip, .about-philosophy, .env-statement, .standards, .service-areas, .inquiry-section, .pillars {
  padding-left: var(--gutter) !important; padding-right: var(--gutter) !important;
}

/* ---------------- Inner page heroes ---------------- */
.hx--page { min-height: auto; padding: 7rem 0 4rem; }
.hx--page h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.hx--contact { padding-bottom: 6rem; }
.hx--contact .split { align-items: start; }
.hx--contact h1 { margin-bottom: 1.25rem; }
@media (max-width: 768px) { .hx--page { padding: 3.5rem 0 2.5rem; } }

/* Two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; }
.split .section-head p + p { margin-top: 1rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2.5rem; } }

/* Company facts table */
.facts { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.hx--contact .facts { margin-top: 2.25rem; max-width: 520px; }
.facts__row {
  display: grid; grid-template-columns: 150px 1fr; gap: 1rem; align-items: baseline;
  padding: 1rem 1.4rem; border-bottom: 1px solid var(--line);
}
.facts__row:last-child { border-bottom: 0; }
.facts__row span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.facts__row b { font-weight: 500; color: var(--text); font-size: 0.95rem; }
.facts__row a { color: var(--accent); text-decoration: none; }
.facts__row a:hover { text-decoration: underline; }
@media (max-width: 480px) { .facts__row { grid-template-columns: 1fr; gap: 0.25rem; } }

/* 4-up principles (process) */
.principles--4 { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
@media (max-width: 1000px) { .principles--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .principles--4 { grid-template-columns: 1fr; } }

/* Non-link division cards (services) */
div.division:hover::before { width: 0; }
div.division:hover { background: transparent; }

/* ---------------- Forms ---------------- */
.form-card {
  max-width: none; margin: 0; width: 100%;
  padding: 2rem; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, rgba(14,17,30,0.85), rgba(8,10,20,0.85));
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.form-card form { display: flex; flex-direction: column; }
.form-card label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.45rem; text-align: left;
}
.form-card input, .form-card textarea {
  width: 100%; margin: 0 0 1.25rem; padding: 0.8rem 0.95rem;
  font: inherit; font-size: 0.95rem; color: var(--text);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-card input::placeholder, .form-card textarea::placeholder { color: var(--dim); }
.form-card input:focus, .form-card textarea:focus {
  outline: none; border-color: var(--line-hi); box-shadow: 0 0 0 3px rgba(0,224,255,0.12);
}
.form-card textarea { resize: vertical; min-height: 130px; }
.form-card button.btn { width: 100%; cursor: pointer; margin-top: 0.25rem; font-family: inherit; }
.form-status { margin-top: 1rem; font-size: 0.9rem; }
.form-fine { margin-top: 1rem; font-size: 0.78rem; color: var(--dim); }
.form-fine a { color: var(--muted); }
