/* =====================================================================
   NuEm Studio — site styles
   Theme lives in :root; change --accent to rebrand.
   ===================================================================== */

:root {
  --bg: #0c0e12;
  --bg-soft: #101319;
  --card: #14181f;
  --edge: #232a35;
  --edge-soft: #1b212b;
  --text: #eceef2;
  --muted: #98a1ae;
  --accent: #c8a24a;        /* muted gold */
  --accent-bright: #e3c074;
  --good: #4cc38a;
  --radius: 14px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1140px, 92%); margin: 0 auto; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.01em; }
section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; }
a { color: inherit; }
.accent { color: var(--accent-bright); }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.72rem;
  font-weight: 600; color: var(--accent); margin-bottom: 1rem;
}
.lede { color: var(--muted); font-size: 1.13rem; max-width: 56ch; margin-top: 1.4rem; }
.section-head { margin-bottom: 2.8rem; }
.section-lede { color: var(--muted); max-width: 62ch; margin-top: 0.9rem; }
.section-lede.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.85rem 1.8rem; border-radius: 8px;
  font-weight: 600; font-size: 0.93rem; text-decoration: none; letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: #14110a;
  box-shadow: 0 6px 24px rgba(200, 162, 74, 0.22);
}
.btn-primary:hover { background: var(--accent-bright); }
.btn-ghost { border: 1px solid var(--edge); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-big { font-size: 1.05rem; padding: 1.05rem 2.4rem; }

/* ---------- Nav ---------- */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 14, 18, 0.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--accent); border-radius: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: #14110a;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.01em; }
.nav-links { display: flex; align-items: center; gap: 2.1rem; list-style: none; }
.nav-links a { text-decoration: none; font-size: 0.9rem; color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  border: 1px solid var(--edge); padding: 0.5rem 1.2rem; border-radius: 8px;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(5.5rem, 12vw, 9.5rem); padding-bottom: 0; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -25% -15% auto; height: 75%;
  background:
    radial-gradient(38% 55% at 22% 25%, rgba(200, 162, 74, 0.10), transparent 70%),
    radial-gradient(30% 50% at 80% 15%, rgba(86, 110, 160, 0.12), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.4rem; }
.hero-strip {
  display: flex; align-items: center; gap: 1.6rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem); padding: 1.6rem 0;
  border-top: 1px solid var(--edge-soft);
  color: var(--muted); font-family: var(--font-display);
  font-size: 0.82rem; letter-spacing: 0.24em; text-transform: uppercase;
}
.hero-strip i { flex: 0 0 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* ---------- Capabilities ---------- */
.capabilities { background: var(--bg-soft); border-block: 1px solid var(--edge-soft); }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.cap {
  background: var(--card); border: 1px solid var(--edge-soft); border-radius: var(--radius);
  padding: 2.1rem 1.9rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.cap:hover { border-color: var(--edge); transform: translateY(-3px); }
.cap-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--edge); border-radius: 10px; color: var(--accent);
  margin-bottom: 1.3rem;
}
.cap-icon svg { width: 22px; height: 22px; }
.cap h3 { font-size: 1.18rem; margin-bottom: 0.55rem; }
.cap p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Work ---------- */
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.6rem; }
.filter {
  background: none; border: 1px solid var(--edge); color: var(--muted);
  padding: 0.45rem 1.15rem; border-radius: 999px; font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.filter:hover { color: var(--text); }
.filter.active { background: var(--accent); border-color: var(--accent); color: #14110a; font-weight: 600; }

.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.4rem; }
.work-card {
  grid-column: span 3;
  background: var(--card); border: 1px solid var(--edge-soft); border-radius: var(--radius);
  padding: 2rem; display: flex; flex-direction: column; gap: 0.95rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.work-card:hover { border-color: var(--edge); transform: translateY(-3px); }
.work-card.compact { grid-column: span 2; }
.work-card.hidden { display: none; }
.work-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.work-kind {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.status { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.status.live i { background: var(--good); box-shadow: 0 0 8px rgba(76, 195, 138, 0.7); }
.status.beta i { background: var(--accent); }
.status.progress i { background: #6f7c91; }
.work-card h3 { font-size: 1.45rem; }
.work-card.compact h3 { font-size: 1.2rem; }
.work-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.meta-row span {
  font-size: 0.74rem; color: var(--muted); background: var(--bg);
  border: 1px solid var(--edge-soft); padding: 0.24rem 0.65rem; border-radius: 6px;
}
.work-link {
  font-weight: 600; font-size: 0.9rem; color: var(--accent-bright); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.work-link:hover { text-decoration: underline; }
.work-link.disabled { color: var(--muted); opacity: 0.65; pointer-events: none; }

/* ---------- Animation spotlight ---------- */
.animation { background: var(--bg-soft); border-block: 1px solid var(--edge-soft); }
.anim-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.point {
  border-left: 2px solid var(--accent); padding: 0.3rem 0 0.3rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.point strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.point span { color: var(--muted); font-size: 0.93rem; }

/* ---------- Principles ---------- */
.principle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.principle {
  background: var(--card); border: 1px solid var(--edge-soft); border-radius: var(--radius);
  padding: 1.9rem;
}
.principle span {
  font-family: var(--font-display); font-size: 0.8rem; color: var(--accent);
  letter-spacing: 0.18em;
}
.principle h3 { font-size: 1.12rem; margin: 0.6rem 0 0.45rem; }
.principle p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact .eyebrow { margin-bottom: 0.8rem; }
.contact-inner .btn { margin-top: 2rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--edge-soft); padding: 3rem 0 0; }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 2.4rem;
}
.footer-brand p { color: var(--muted); font-size: 0.88rem; margin-top: 0.9rem; }
.footer-col h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); margin-bottom: 0.9rem; font-weight: 600;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-base {
  border-top: 1px solid var(--edge-soft); padding: 1.4rem 0;
}
.footer-base p { color: var(--muted); font-size: 0.82rem; }

/* ---------- Episodes (animation.html) ---------- */
.hero-compact { padding-bottom: 0; }
.show-section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.show-section.alt { background: var(--bg-soft); border-block: 1px solid var(--edge-soft); }
.show-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem;
  flex-wrap: wrap; margin-bottom: 2.2rem;
}
.show-cta { padding-bottom: 0.4rem; }
.pill-soon {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); border: 1px dashed var(--edge);
  border-radius: 999px; padding: 0.5rem 1.1rem;
}
.episode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.episode h3 { font-size: 1.05rem; margin-top: 0.9rem; }
.episode p { color: var(--muted); font-size: 0.88rem; margin-top: 0.3rem; }
.episode-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--edge-soft); background: #0a0c10;
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.episode:hover .episode-frame {
  border-color: rgba(200, 162, 74, 0.45); transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.episode-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.episode-frame.poster {
  display: grid; place-content: center; gap: 0.3rem; text-align: center;
  background:
    radial-gradient(60% 80% at 50% 20%, rgba(200, 162, 74, 0.10), transparent 70%),
    linear-gradient(160deg, #14181f, #0d1016);
}
.poster-mark { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--accent-bright); }
.poster-sub { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .episode-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .episode-grid { grid-template-columns: 1fr; } }

/* ---------- Motion: page-load entrance ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.anim-in, .hero-inner > * { opacity: 0; animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hero-inner > :nth-child(2), .anim-in.d1 { animation-delay: 0.12s; }
.hero-inner > :nth-child(3), .anim-in.d2 { animation-delay: 0.24s; }
.hero-inner > :nth-child(4), .anim-in.d3 { animation-delay: 0.36s; }
.hero-strip { opacity: 0; animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards; }

/* ---------- Motion: living glow ---------- */
@keyframes glowDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  50% { transform: translate3d(2.5%, 1.5%, 0) scale(1.06); opacity: 0.85; }
}
.hero-glow { animation: glowDrift 14s ease-in-out infinite; will-change: transform, opacity; }

/* ---------- Motion: nav + micro-interactions ---------- */
.nav-links a:not(.nav-cta) { position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); transition: left 0.45s ease;
}
.btn-primary:hover::after { left: 130%; }
.brand-mark { transition: transform 0.3s ease; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }

/* ---------- Reveal on scroll (staggered) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.visible { opacity: 1; transform: none; }
.cap-grid > .reveal:nth-child(2), .work-grid > .reveal:nth-child(2),
.anim-points > .reveal:nth-child(2), .principle-grid > .reveal:nth-child(2),
.episode-grid > .reveal:nth-child(2), .price-grid > .reveal:nth-child(2),
.module-grid > .reveal:nth-child(2), .lab-grid > .reveal:nth-child(2) { transition-delay: 0.1s; }
.cap-grid > .reveal:nth-child(3), .work-grid > .reveal:nth-child(3),
.anim-points > .reveal:nth-child(3), .principle-grid > .reveal:nth-child(3),
.episode-grid > .reveal:nth-child(3), .price-grid > .reveal:nth-child(3),
.module-grid > .reveal:nth-child(3), .lab-grid > .reveal:nth-child(3) { transition-delay: 0.2s; }
.work-grid > .reveal:nth-child(4), .principle-grid > .reveal:nth-child(4),
.episode-grid > .reveal:nth-child(4), .price-grid > .reveal:nth-child(4),
.module-grid > .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .anim-in, .hero-inner > *, .hero-strip { animation: none; opacity: 1; }
  .hero-glow { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .episode-frame, .brand-mark { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cap-grid, .anim-points { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-card, .work-card.compact { grid-column: span 1; }
  .principle-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-soft);
    border-bottom: 1px solid var(--edge-soft); padding: 0.6rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 0.85rem 0; }
  .nav-links .nav-cta { border: 0; }
}
