/* Y4M — AI systems company. Dark-mode-first, near-black + neon blue/orange. */

:root {
  --bg: #0a0a0c;
  --bg-alt: #111116;
  --bg-raised: #17171d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef0f4;
  --muted: #9aa0ae;
  --muted-dim: #6b7180;

  --blue: #00d4ff;
  --blue-dim: #1c5b6e;
  --blue-wash: rgba(0, 212, 255, 0.1);

  --orange: #ff6b1a;
  --orange-dim: #8a4420;
  --orange-wash: rgba(255, 107, 26, 0.1);

  --radius: 12px;
  --max-width: 1180px;

  --font-head: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

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

/* Header */
header.site-header {
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text);
}

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

nav.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--text);
  border-color: var(--blue);
}

nav.main-nav a.cta {
  background: var(--orange);
  color: #0a0a0c;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 6px;
  border-bottom: none;
}

nav.main-nav a.cta:hover {
  background: #ff8340;
  box-shadow: 0 0 24px rgba(255, 107, 26, 0.35);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg);
  overflow: hidden;
  padding: 140px 0 80px;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(0, 212, 255, 0.16), transparent 60%),
    radial-gradient(ellipse 40% 35% at 55% 50%, rgba(255, 107, 26, 0.14), transparent 65%),
    var(--bg);
  transition: opacity 0.8s ease;
}

@keyframes hero-glow-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-fallback { animation: hero-glow-pulse 6s ease-in-out infinite; }
}

.hero-scrim {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  width: 100%;
}

.hero-text-panel {
  display: inline-block;
  max-width: 880px;
  margin: 0 auto;
}

.hero h1,
.hero p.lead {
  color: #fbfcfe;
  text-shadow:
    0 0 4px rgba(10, 10, 12, 1),
    0 0 10px rgba(10, 10, 12, 1),
    0 0 22px rgba(10, 10, 12, 0.95),
    0 0 42px rgba(10, 10, 12, 0.9),
    0 2px 6px rgba(10, 10, 12, 1);
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.15;
  max-width: 880px;
  margin: 0 auto 22px;
}

.hero h1 .accent { color: var(--orange); }

.hero p.lead {
  max-width: 640px;
  margin: 0 auto 34px;
  font-size: 1.1rem;
}

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

.btn {
  display: inline-block;
  background: var(--orange);
  color: #0a0a0c;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: 8px;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn:hover {
  background: #ff8340;
  box-shadow: 0 0 30px rgba(255, 107, 26, 0.3);
  transform: translateY(-1px);
}

.btn.outline {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
}

.btn.outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.15);
}

/* Stat strip */
.stat-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0;
}

.stat-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  text-align: center;
}

.stat-number {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 260px;
  margin: 0 auto;
}

.stat-note {
  text-align: center;
  color: var(--muted-dim);
  font-size: 0.78rem;
  margin-top: 28px;
}

/* Page header (non-home pages) */
.page-hero {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 84px 0 64px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 14px;
}

.page-hero p {
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Sections */
section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }
section.tight { padding: 56px 0; }

h2.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin: 0 0 12px;
  color: var(--text);
}

p.section-sub {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
  color: var(--muted);
}

.eyebrow {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

/* Card grids */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: left;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-dim);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-wash), var(--orange-wash));
  border: 1px solid var(--border-strong);
  margin-bottom: 18px;
}

.card .card-image {
  width: calc(100% + 52px);
  margin: -30px -26px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
  display: block;
}

.card h3 {
  font-size: 1.08rem;
  color: var(--text);
  margin: 0 0 10px;
}

.card p { color: var(--muted); font-size: 0.94rem; margin: 0 0 12px; }

.card .replaces {
  font-size: 0.82rem;
  color: var(--muted-dim);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 14px;
}

.card a.link { color: var(--blue); font-weight: 600; font-size: 0.9rem; }
.card a.link:hover { color: #5fe4ff; }

/* Product / proof cards */
.product-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-card .product-image {
  width: calc(100% + 72px);
  margin: -36px -36px 6px;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
  display: block;
}

.product-card .tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--blue);
  padding: 4px 10px;
  border-radius: 4px;
}

.product-card h3 { font-size: 1.3rem; }
.product-card p { color: var(--muted); }
.product-card a.link {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: auto;
}

/* Logo strip */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.logo-placeholder {
  width: 140px;
  height: 56px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-dim);
  font-size: 0.78rem;
}

.logo-chip {
  height: 64px;
  padding: 10px 20px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.logo-chip:hover {
  transform: translateY(-2px);
}

.logo-chip img {
  max-height: 100%;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Two-column feature */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.split img { border-radius: var(--radius); border: 1px solid var(--border); }

.split.reverse .split-text { order: 2; }
.split.reverse .split-img { order: 1; }

.split-text ul { color: var(--muted); padding-left: 20px; }
.split-text li { margin-bottom: 8px; }

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-text,
  .split.reverse .split-img { order: initial; }
}

/* What it replaces framing block used on capability pages */
.mechanism-line {
  font-size: 0.85rem;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 6px;
}

/* Case study cards */
.case-study {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.case-study h3 { font-size: 1.2rem; margin-bottom: 6px; }
.case-study .client { color: var(--muted-dim); font-size: 0.85rem; margin-bottom: 18px; }

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 800px) {
  .case-study-grid { grid-template-columns: 1fr; }
}

.case-study-grid h4 {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 8px;
}

.case-study-grid p { color: var(--muted); font-size: 0.92rem; margin: 0; }

.case-study .outcome-number {
  color: var(--orange);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
}

.case-study-pending {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: var(--muted-dim);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, rgba(0, 212, 255, 0.08), rgba(255, 107, 26, 0.08)), var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: center;
  padding: 72px 0;
}

.cta-band h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0 0 24px; }

/* Contact form */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 800px) {
  .contact-wrap { grid-template-columns: 1fr; }
}

form.contact-form {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

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

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-wash);
}

.field textarea { min-height: 130px; resize: vertical; }

.required-note {
  font-size: 0.8rem;
  color: var(--muted-dim);
  margin-bottom: 18px;
}

.form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.form-status.success { color: var(--blue); display: block; }
.form-status.error { color: var(--orange); display: block; }

.contact-info h3 { color: var(--text); margin-top: 0; }
.contact-info p { color: var(--muted); }
.contact-info .detail { margin-bottom: 20px; }
.contact-info .detail strong { display: block; color: var(--text); }

/* Prose (privacy, blog posts) */
.prose h2 { margin-top: 40px; margin-bottom: 14px; font-size: 1.3rem; }
.prose h3 { margin-top: 28px; margin-bottom: 10px; font-size: 1.1rem; }
.prose p { margin: 0 0 16px; color: var(--muted); }
.prose ul, .prose ol { color: var(--muted); padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--blue); font-weight: 600; }
.prose a:hover { color: #5fe4ff; }
.prose code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.88em;
}

/* Footer */
footer.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 56px 0 28px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  color: var(--text);
  font-size: 0.9rem;
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-grid a,
.footer-grid p { color: var(--muted); }

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: var(--blue); }

.phone-reveal-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.phone-reveal-btn:hover { color: var(--blue); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted-dim);
}

.footer-bottom a { color: var(--muted-dim); }
.footer-bottom a:hover { color: var(--blue); }

@media (max-width: 720px) {
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    display: none;
  }
  nav.main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding-top: 110px; min-height: 92vh; }
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
