/* =========================================================
   MetaCoding Solutions — site styles
   Brand tokens: navy #2B2E4A, gold #FAAF39 (from the logo).
   ========================================================= */

:root {
  --navy: #2b2e4a;
  --navy-deep: #1f2239;
  --navy-elev: #343859;
  --gold: #faaf39;
  --gold-ink: #1d1706;
  --text: #f2f3f8;
  --text-muted: #b6bad1;
  --text-faint: #8087a8;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --card: rgba(255, 255, 255, 0.04);
  --glow-gold: rgba(250, 175, 57, 0.22);
  --glow-blue: rgba(112, 128, 255, 0.20);
  --shadow: 0 24px 60px rgba(8, 10, 24, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1160px;
  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--navy);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--gold-ink); }

.container { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--navy-deep); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before { content: ""; width: 1.5rem; height: 1px; background: var(--gold); }

.section-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-top: 1rem; }
.section-head p { color: var(--text-muted); margin-top: 1rem; font-size: 1.08rem; }

.text-link { color: var(--gold); font-weight: 600; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.text-link:hover { border-bottom-color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.9rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 24px rgba(250, 175, 57, 0.25); }
.btn-primary:hover { background: #ffc05a; box-shadow: 0 10px 30px rgba(250, 175, 57, 0.35); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(43, 46, 74, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand-mark { width: 38px; height: 38px; fill: var(--gold); flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; line-height: 1; }
.site-header .brand-mark + .brand-name { padding-left: 0.85rem; border-left: 1.5px solid var(--line-strong); }

/* Glowing header mark */
.site-header .brand-mark {
  filter: drop-shadow(0 0 4px rgba(250, 175, 57, 0.85)) drop-shadow(0 0 12px rgba(250, 175, 57, 0.45));
  animation: mark-glow 3.6s ease-in-out infinite;
  transition: filter 0.3s ease, transform 0.3s ease;
}
.site-header .brand:hover .brand-mark {
  filter: drop-shadow(0 0 6px rgba(255, 200, 100, 1)) drop-shadow(0 0 18px rgba(250, 175, 57, 0.75));
  transform: scale(1.06);
  animation: none;
}
@keyframes mark-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(250, 175, 57, 0.85)) drop-shadow(0 0 12px rgba(250, 175, 57, 0.45)); }
  50%      { filter: drop-shadow(0 0 5px rgba(250, 175, 57, 1)) drop-shadow(0 0 18px rgba(250, 175, 57, 0.7)); }
}
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { font-size: 0.94rem; font-weight: 500; color: var(--text-muted); transition: color 0.15s; display: inline-flex; align-items: center; gap: 0.35rem; }
.nav-links a:hover { color: var(--text); }
.nav-links a svg { width: 15px; height: 15px; opacity: 0.7; }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta .btn { padding: 0.7rem 1.15rem; font-size: 0.9rem; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .nav-links {
    position: absolute; left: 0; right: 0; top: 76px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a.mobile-only { display: inline-flex; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 901px) { .nav-links a.mobile-only { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 15%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 15%, #000 15%, transparent 75%);
  opacity: 0.6; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; z-index: 0; left: -10%; right: -10%; top: -25%; height: 80%;
  background:
    radial-gradient(38% 55% at 22% 40%, var(--glow-blue), transparent 70%),
    radial-gradient(34% 50% at 80% 35%, var(--glow-gold), transparent 70%);
  filter: blur(24px); pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); margin-top: 1.25rem; max-width: 15ch; }
.hero h1 .hl { color: var(--gold); }
.hero .lede { color: var(--text-muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 34rem; margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.9rem 1.25rem; margin-top: 2.75rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.hero-meta li { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); letter-spacing: 0.01em; white-space: nowrap; }
@media (min-width: 901px) { .hero-meta { flex-wrap: nowrap; } }
.hero-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* Graph illustration */
.graph-card {
  position: relative; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--navy-elev), var(--navy-deep));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  padding: 1.5rem; overflow: hidden;
}
.graph-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 50%, var(--glow-gold), transparent 70%);
  opacity: 0.5;
}
.graph-card svg { position: relative; width: 100%; height: auto; }
.graph-card .node { fill: var(--navy); stroke: var(--line-strong); stroke-width: 1.5; }
.graph-card .node-core { fill: var(--gold); stroke: none; }
.graph-card .edge { stroke: var(--gold); stroke-width: 1.5; stroke-opacity: 0.55; stroke-dasharray: 4 6; animation: dash 6s linear infinite; }
.graph-card .lbl { fill: var(--text); font-family: var(--font-mono); font-size: 11px; text-anchor: middle; }
.graph-card .lbl-sub { fill: var(--text-faint); font-size: 9px; }
.graph-card .core-mark { fill: var(--gold-ink); }
@keyframes dash { to { stroke-dashoffset: -100; } }
.graph-caption {
  position: relative; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); display: flex; justify-content: space-between; gap: 1rem;
}
.graph-caption span:last-child { color: var(--gold); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .graph-card { max-width: 520px; }
}

/* ---------- Expertise cards ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; padding: 1.75rem 1.6rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.card:hover { border-color: rgba(250, 175, 57, 0.5); transform: translateY(-3px); background: rgba(255, 255, 255, 0.06); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(250, 175, 57, 0.14); color: var(--gold); margin-bottom: 1.25rem;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card .num { position: absolute; top: 1.5rem; right: 1.5rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }
.why-grid .section-head { margin-bottom: 1.5rem; }
.principles { display: grid; gap: 0.9rem; }
.principle {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
  padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
}
.principle .mark { font-family: var(--font-mono); color: var(--gold); font-size: 0.82rem; padding-top: 0.25rem; }
.principle strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.3rem; }
.principle span { color: var(--text-muted); font-size: 0.95rem; }

.quote-card {
  position: relative; margin-top: 2rem; padding: 1.75rem 1.75rem 1.5rem;
  border-radius: var(--radius); border: 1px solid rgba(250, 175, 57, 0.4);
  background: linear-gradient(150deg, rgba(250, 175, 57, 0.12), rgba(250, 175, 57, 0.03));
}
.quote-card::before { content: "“"; position: absolute; top: -0.2rem; left: 1.2rem; font-family: var(--font-display); font-size: 5rem; line-height: 1; color: var(--gold); opacity: 0.35; }
.quote-card blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.3; letter-spacing: -0.01em; }
.quote-card cite { display: block; margin-top: 1rem; font-style: normal; font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Philosophy ---------- */
.philosophy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .philosophy-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.philosophy-grid .section-head { margin-bottom: 0; }
.philosophy-grid .section-head p { color: var(--text); font-size: 1.15rem; }
.philosophy-copy { padding-top: 0.35rem; }
.philosophy-copy p { color: var(--text-muted); font-size: 1.05rem; }
.philosophy-copy p + p { margin-top: 1.1rem; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (max-width: 720px) { .pillars { grid-template-columns: 1fr; } }
.pillar { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem 1.4rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); border-left: 3px solid var(--gold); }
.pillar strong { font-family: var(--font-display); font-size: 1.05rem; }
.pillar span { font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid .section-head { margin-bottom: 1.75rem; }
.contact-actions { display: grid; gap: 0.85rem; }
.contact-row {
  display: flex; align-items: center; gap: 1rem; padding: 1.05rem 1.2rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); transition: border-color 0.15s, transform 0.15s;
}
.contact-row:hover { border-color: var(--gold); transform: translateY(-1px); }
.contact-row .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(250, 175, 57, 0.14); color: var(--gold); flex: none; }
.contact-row .ico svg { width: 20px; height: 20px; }
.contact-row small { display: block; font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-mono); }
.contact-row strong { font-weight: 600; font-size: 0.98rem; }
.contact-row .arrow { margin-left: auto; color: var(--text-faint); width: 18px; height: 18px; }
.form-card {
  border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--navy-deep); box-shadow: var(--shadow); overflow: hidden;
}
.form-card-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); }
.form-card-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.form-card iframe { width: 100%; min-height: 560px; border: 0; display: block; background: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--navy-deep); padding: 2.5rem 0; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.footer-brand { display: flex; align-items: center; gap: 0.9rem; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-brand .brand-name { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }
.footer-brand .brand-tagline { display: block; font-size: 0.8rem; color: var(--text-faint); }
.footer-row p, .footer-row a { color: var(--text-faint); font-size: 0.88rem; }
.footer-row a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-links a { display: inline-flex; align-items: center; gap: 0.3rem; }
.footer-links a svg { width: 13px; height: 13px; }

/* ---------- Reveal animation ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .contact-row { transition: none; }
  .graph-card .edge { animation: none; }
  .site-header .brand-mark { animation: none; }
}
