/* ===========================
   ASTRAL PRODUCTIONS — CSS
   =========================== */

@font-face {
  font-family: 'Lunar Escape';
  src: url('../assets/fonts/Lunar Escape.woff2') format('woff2'),
       url('../assets/fonts/Lunar Escape.woff')  format('woff'),
       url('../assets/fonts/Lunar Escape.ttf')   format('truetype'),
       url('../assets/fonts/Lunar Escape.otf')   format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #080810;
  --bg2: #0c0c1a;
  --bg3: #101020;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --text: #e8e8f0;
  --text-muted: #8888a8;
  --text-dim: #555570;

  /* Storm Reavers — ocean gold */
  --sr-accent: #e8a836;
  --sr-accent2: #f0c060;
  --sr-glow: rgba(232, 168, 54, 0.15);

  /* Astral Plague — sickly violet */
  --ap-accent: #9d5cf5;
  --ap-accent2: #bf8fff;
  --ap-glow: rgba(157, 92, 245, 0.18);

  /* Contract / Studio — user's signature blue-teal */
  --ct-accent: #00c8d4;
  --ct-accent2: #5ce8f0;

  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 72px;
  --max-w: 1200px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.6;
  /* clip, not hidden — hidden creates a scroll container and breaks
     position: sticky on the hero */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===================== NAV ===================== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  transition: background var(--transition), backdrop-filter var(--transition);
}

#nav.scrolled {
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.85; }

.nav-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-mark {
  font-size: 1.6rem;
  color: var(--sr-accent);
  line-height: 1;
}

.logo-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  color: var(--text);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  position: relative;
}

.dropdown-caret {
  font-size: 0.65rem;
  transition: transform var(--transition);
  display: inline-block;
}
.nav-dropdown:hover .dropdown-caret,
.nav-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 2px); /* tight gap — covered by bridge pseudo */
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: rgba(10, 10, 20, 0.96);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

/* Invisible bridge from trigger down to menu — prevents hover gap breaking */
.nav-dropdown-trigger::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 18px;
}

/* Arrow pip */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: rgba(10,10,20,0.96);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  rotate: 45deg;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  transition: background var(--transition);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.88rem;
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a:hover { background: var(--surface-hover); }
.nav-dropdown-menu a.dd-active { background: var(--surface); }

.dd-icon {
  font-size: 1.2rem;
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition);
}
/* Glyph icons inherit the project accent so SVG and emoji stay in sync */
.dd-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}
.sr-dd {
  background: rgba(232, 168, 54, 0.1);
  color: var(--sr-accent);
}
.ap-dd {
  background: rgba(157, 92, 245, 0.1);
  color: var(--ap-accent2);
}
/* Icon lights up with its row on hover */
.nav-dropdown-menu a:hover .sr-dd {
  background: rgba(232, 168, 54, 0.18);
  box-shadow: 0 0 14px rgba(232, 168, 54, 0.25);
}
.nav-dropdown-menu a:hover .ap-dd {
  background: rgba(157, 92, 245, 0.18);
  box-shadow: 0 0 14px rgba(157, 92, 245, 0.3);
}

.dd-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.dd-text strong {
  font-weight: 600;
  color: var(--text);
  font-size: 0.88rem;
}
.dd-text em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Mobile sub-items */
.mob-section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.mob-sub {
  padding-left: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted) !important;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--sr-accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 99;
  background: rgba(8, 8, 16, 0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2.5rem;
  gap: 1.25rem;
  transform: translateY(-110%);
  visibility: hidden;
  transition: transform var(--transition), visibility 0s var(--transition);
}
.mobile-menu.open { transform: translateY(0); visibility: visible; transition: transform var(--transition); }
.mob-link {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.mob-link:hover { color: var(--text); }

/* ===================== HERO ===================== */
/* Hero is fixed — it never moves; sections scroll up and over it */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 0;
}

/* Spacer that holds the hero's place in the document flow */
.hero-wrapper {
  position: relative;
  height: 100svh;
  min-height: 600px;
}

/* All sections after the hero sit above it in the stack */
.section-intro,
.project-section,
.contract-section,
.social-section,
.footer {
  position: relative;
  z-index: 2;
  background: rgba(8, 8, 16, 0.8);
}

/* Fade in from the hero so the black hole bleeds into the first section */
.section-intro::before {
  content: '';
  position: absolute;
  top: -3rem;
  left: 0;
  right: 0;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, rgba(8, 8, 16, 0.9));
  pointer-events: none;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.star-field {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, #0a0a1e 0%, #050508 70%);
}

.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--op, 0.6); transform: scale(1); }
  50% { opacity: calc(var(--op, 0.6) * 0.3); transform: scale(0.8); }
}

.black-hole-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  will-change: transform; /* promote to own compositor layer */
}

/* ===================== PRESS KIT ===================== */
.presskit-section {
  padding: 7rem 0;
  position: relative;
}
.presskit-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.asset-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.asset-thumb {
  aspect-ratio: 16/9;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-dim);
  overflow: hidden;
  position: relative;
}
.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.asset-thumb-logo {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #0d0d1a, #12121e);
}

.asset-info {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.asset-info-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.asset-info-text span {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.asset-dl-icon {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.asset-card:hover .asset-dl-icon {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}
.screenshot-item {
  aspect-ratio: 16/9;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-dim);
  position: relative;
}
.screenshot-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.screenshot-item:hover {
  border-color: rgba(255,255,255,0.2);
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.screenshot-item .ss-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  font-size: 1rem;
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}
.screenshot-item:hover .ss-overlay { opacity: 1; }

/* Subpage shared */
.subpage-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.subpage-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
}
.subpage-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 0 4rem;
  width: 100%;
}
.subpage-hero-content .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color var(--transition);
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--text-muted); }

@media (max-width: 768px) {
  .asset-grid { grid-template-columns: 1fr 1fr; }
  .screenshot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .asset-grid { grid-template-columns: 1fr; }
  .screenshot-grid { grid-template-columns: 1fr; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  /* Sit above the black hole's midline instead of across it */
  margin-top: -23vh;
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sr-accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Lunar Escape', 'Space Mono', monospace;
  font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  font-weight: normal;
  line-height: 0.95;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  background: linear-gradient(160deg, #FF7259 0%, #d44aaa 50%, #BD00FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-accent {
  display: block;
}

.hero-sub {
  font-size: 1.3rem;
  color: #d8d8ea;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.6);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
}
.hero-scroll-hint span {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--sr-accent), transparent);
  animation: scrollDrop 1.8s ease-in-out infinite;
}
@keyframes scrollDrop {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  40% { opacity: 1; transform: scaleY(1); }
  80%, 100% { opacity: 0; transform: scaleY(1) translateY(10px); }
}

/* ===================== BUTTONS ===================== */
/* Angular, cut-corner, terminal-type — imperial console energy */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.9rem;
  border-radius: 0;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--sr-accent);
  color: #0a0a10;
}
.btn-primary:hover {
  background: var(--sr-accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 168, 54, 0.35);
}

.btn-ghost {
  background: linear-gradient(135deg, rgba(22, 22, 36, 0.88), rgba(12, 12, 22, 0.88));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.btn-ghost:hover {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35), 0 0 24px rgba(255,255,255,0.06);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.btn-ghost-sm {
  padding: 0.5rem 1.1rem;
  background: transparent;
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 0;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: all var(--transition);
}
.btn-ghost-sm:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}

.btn-wishlist {
  background: linear-gradient(135deg, #1a6aa8, #1b87cc);
  color: #fff;
  box-shadow: 0 4px 20px rgba(26, 106, 168, 0.3);
}
.btn-wishlist:hover {
  background: linear-gradient(135deg, #1e7cbb, #2098e0);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 106, 168, 0.5);
}

.ap-wishlist {
  background: linear-gradient(135deg, #5a2d8c, #7c3fcf);
  box-shadow: 0 4px 20px rgba(157, 92, 245, 0.25);
}
.ap-wishlist:hover {
  background: linear-gradient(135deg, #6d38a8, #9450e0);
  box-shadow: 0 8px 30px rgba(157, 92, 245, 0.45);
}

/* ===================== CUT-CORNER KEYLINES ===================== */
/* Borders get clipped at the notches; draw the diagonal edges explicitly.
   Each component sets --cut to its notch size and --edge to its line color. */
.service-card, .social-card, .asset-card, .dev-status,
.presskit-banner-inner, .btn-ghost, .btn-ghost-sm { position: relative; }

.service-card { --cut: 18px; }
.social-card, .asset-card { --cut: 16px; }
.dev-status, .presskit-banner-inner { --cut: 22px; }
.btn-ghost { --cut: 14px; --edge: rgba(255,255,255,0.16); }
.btn-ghost-sm { --cut: 9px; --edge: rgba(255,255,255,0.12); }

.service-card::before, .social-card::before, .asset-card::before,
.dev-status::before, .presskit-banner-inner::before,
.btn-ghost::before, .btn-ghost-sm::before {
  content: '';
  position: absolute;
  width: calc(var(--cut) * 1.42);
  height: 1px;
  background: var(--edge, var(--border));
  top: calc(var(--cut) * 0.5);
  left: calc(var(--cut) * -0.21);
  transform: rotate(-45deg);
  pointer-events: none;
  z-index: 3;
}
.service-card::after, .social-card::after, .asset-card::after,
.dev-status::after, .presskit-banner-inner::after,
.btn-ghost::after, .btn-ghost-sm::after {
  content: '';
  position: absolute;
  width: calc(var(--cut) * 1.42);
  height: 1px;
  background: var(--edge, var(--border));
  bottom: calc(var(--cut) * 0.5);
  right: calc(var(--cut) * -0.21);
  transform: rotate(-45deg);
  pointer-events: none;
  z-index: 3;
}

/* ===================== SECTION SHARED ===================== */
.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sr-accent);
  margin-bottom: 1rem;
}
/* Terminal-style designation prefix on labels */
.section-label::before,
.project-tag::before {
  content: '// ';
  opacity: 0.65;
}

.section-intro {
  text-align: center;
  padding: 7rem 0 4rem;
}

.section-intro h2, .section-desc {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

h2 {
  font-family: 'Lunar Escape', 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
  color: #fff;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===================== SCROLL REVEAL ===================== */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  /* Short travel + fast ease-out: content settles almost immediately,
     the motion just takes the edge off the pop-in */
  transition: opacity 0.38s ease-out, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}
.reveal { transform: translateY(16px); }
.reveal-left { transform: translateX(-22px); }
.reveal-right { transform: translateX(22px); }

.reveal.visible, .reveal-left.visible, .reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* ===================== PROJECT SECTIONS ===================== */
.project-section {
  position: relative;
  padding: 7rem 0;
  overflow: hidden;
}

.project-bg-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sr-art {
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(232, 168, 54, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 100% 100%, rgba(232, 100, 30, 0.05) 0%, transparent 50%);
}

.ap-art {
  background:
    radial-gradient(ellipse 70% 60% at 20% 50%, rgba(157, 92, 245, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 0% 0%, rgba(80, 30, 160, 0.07) 0%, transparent 50%);
}

.project-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.project-inner {
  position: relative;
  z-index: 2;
}

.project-meta {
  margin-bottom: 3rem;
}

.project-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sr-accent);
  margin-bottom: 0.75rem;
}

.ap-theme .project-tag { color: var(--ap-accent); }

.project-title {
  font-family: 'Lunar Escape', 'Space Mono', monospace;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: normal;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.5rem;
}

.project-genre {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.project-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.project-body-flip {
  direction: ltr;
}

/* Media frame */
.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  position: relative;
  background: var(--bg3);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.media-frame:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 36px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(232,168,54,0.15);
}
.ap-frame:hover {
  box-shadow: 0 36px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(157,92,245,0.2);
}

.media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #0e0e1e, #141428);
}
.sr-placeholder {
  background: linear-gradient(135deg, #0e0e18, #1a1408);
}
.ap-placeholder {
  background: linear-gradient(135deg, #0c0818, #12081e);
}

.placeholder-icon {
  font-size: 3rem;
  opacity: 0.4;
}
.media-placeholder p {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.media-caption {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-align: center;
}

/* Project details */
.project-desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.feat-dot {
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sr-accent);
  margin-top: 0.5em;
  flex-shrink: 0;
}
.ap-dot { background: var(--ap-accent); }

.project-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ===================== DEV STATUS TIMELINE ===================== */
.dev-status {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
  padding: 2.5rem;
  backdrop-filter: blur(10px);
}

.status-title {
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-track {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.timeline-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--sr-accent), var(--sr-accent2));
  border-radius: 2px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ap-fill {
  background: linear-gradient(90deg, var(--ap-accent), var(--ap-accent2));
}

.timeline-nodes {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.t-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.t-node.active { opacity: 1; }

.t-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.3s;
  flex-shrink: 0;
}

.t-node.active .t-dot {
  border-color: var(--sr-accent);
  background: var(--sr-accent);
  color: #0a0a10;
  box-shadow: 0 0 16px rgba(232, 168, 54, 0.5);
}

.ap-node.active .t-dot,
.ap-tdot.active { border-color: var(--ap-accent); background: var(--ap-accent); color: #fff; box-shadow: 0 0 16px rgba(157,92,245,0.5); }

.t-info { display: flex; flex-direction: column; gap: 0.2rem; }
.t-info strong { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.t-info span { font-size: 0.72rem; color: var(--text-dim); }
.t-date { font-size: 0.68rem; font-style: italic; color: var(--text-dim); }

.current-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--sr-accent);
  color: #0a0a10;
  border-radius: 20px;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: 'Space Mono', monospace;
  margin-top: 0.25rem;
}
.ap-tag {
  background: var(--ap-accent);
  color: #fff;
}

/* ===================== AP NODE FIX ===================== */
.ap-node.active .t-dot {
  border-color: var(--ap-accent);
  background: var(--ap-accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(157, 92, 245, 0.5);
}

/* ===================== CONTRACT SECTION ===================== */
.contract-section {
  position: relative;
  padding: 8rem 0;
  overflow: hidden;
}

.contract-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0, 200, 212, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, transparent, rgba(0,200,212,0.025) 50%, transparent);
  pointer-events: none;
}
.contract-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,200,212,0.25), transparent);
}

.contract-section .section-label { color: var(--ct-accent); }
.contract-section .container { position: relative; z-index: 2; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 3.5rem 0;
}

/* Studio identity — three trajectories, brand-coral accent */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}
.studio-grid .service-icon { color: #FF7259; }
@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  padding: 2rem 1.75rem;
  transition: all var(--transition);
  transition-delay: var(--delay, 0s);
  cursor: default;
}
.service-card:hover {
  background: var(--surface-hover);
  border-color: rgba(56,217,217,0.2);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.service-icon {
  font-size: 1.5rem;
  color: var(--ct-accent);
  margin-bottom: 1.25rem;
  display: block;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.service-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.contract-cta {
  text-align: center;
  padding-top: 1rem;
}
.contract-cta p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.contract-cta .btn-primary {
  background: var(--ct-accent);
  color: #040e0e;
}
.contract-cta .btn-primary:hover {
  background: var(--ct-accent2);
  box-shadow: 0 8px 30px rgba(0, 200, 212, 0.35);
}

/* ===================== SOCIAL SECTION ===================== */
.social-section {
  padding: 7rem 0;
  position: relative;
}
.social-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.social-section .section-label { color: var(--ap-accent); }
.social-section { text-align: center; }

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
  text-align: left;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  transition: all var(--transition);
}
.social-card:hover {
  background: var(--surface-hover);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.social-icon {
  padding: 0.6rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.social-card:hover .social-icon {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.social-card span:nth-child(2) {
  font-weight: 600;
  font-size: 0.95rem;
}
.social-handle {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.social-steam { border-color: rgba(26,106,168,0.2); }
.social-steam:hover { border-color: rgba(26,106,168,0.4); }

/* ===================== PRESS KIT BANNER ===================== */
.presskit-banner {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: 4rem 0;
}
.presskit-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.presskit-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}
.presskit-banner-inner h3 {
  font-family: 'Lunar Escape', 'Space Grotesk', sans-serif;
  font-weight: normal;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.4rem;
}
.presskit-banner-inner p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 480px;
}

/* ===================== FOOTER ===================== */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.footer-brand .logo-mark {
  font-size: 1rem;
  color: var(--sr-accent);
}
.footer-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
}
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.footer-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-email:hover { color: var(--ct-accent); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-nodes { gap: 0.5rem; }
  .t-info strong { font-size: 0.75rem; }
  .t-info span { font-size: 0.65rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  #nav { padding: 0 1.25rem; }
  .logo-text { font-size: 0.68rem; }
  .nav-logo-img { width: 36px; height: 36px; }

  /* Phones are tall: the hole sits low, so the text needs less lift */
  .hero-content { margin-top: -10vh; }
  .hero-title { font-size: clamp(2.4rem, 11vw, 4.2rem); }
  .hero-sub { font-size: 1.05rem; }

  .project-body {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .project-body-flip .project-details { order: -1; }

  .project-section { padding: 5rem 0; }

  .dev-status { padding: 1.75rem; }
  .timeline-nodes {
    flex-direction: column;
    gap: 1.25rem;
  }
  .t-node {
    flex-direction: row;
    text-align: left;
    opacity: 1;
  }
  .timeline-track { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .social-grid { grid-template-columns: 1fr; }
  .project-title { font-size: clamp(2rem, 12vw, 3.5rem); }
  .hero-cta { flex-direction: column; align-items: center; }
}

/* ===================== GRAIN TEXTURE ===================== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===========================
   SLOW MODE (animations off)
   =========================== */
.slow-mode *, .slow-mode *::before, .slow-mode *::after {
  animation: none !important;
  transition: none !important;
}
.slow-mode .reveal, .slow-mode .reveal-left, .slow-mode .reveal-right,
.slow-mode .g-letter, .slow-mode .hero-follow {
  opacity: 1 !important;
  transform: none !important;
}
.slow-mode #scytheIntro, .slow-mode #sphereIntro { display: none !important; }
.slow-mode .star { opacity: var(--op, 0.4); }

/* Motion toggle pill */
.motion-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9000;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(10, 10, 16, 0.75);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.motion-toggle:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* Sound toggle pill — sits left of the motion toggle */
.sound-toggle {
  position: fixed;
  bottom: 1rem;
  right: 8.75rem;
  z-index: 9000;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(10, 10, 16, 0.75);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sound-toggle:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
@media (max-width: 600px) {
  .sound-toggle { right: 1rem; bottom: 3.75rem; }
}

/* ===========================
   SLANT STRIP — shared hover-expand panels
   Accent color via --strip (default gold); full-bleed width.
   =========================== */
.slant-strip {
  --strip: #e8a836;
  /* Panel lean. The panel is skewed into a true parallelogram; media and
     content are counter-skewed back upright so nothing looks distorted. */
  --skew: -14deg;
  --slant-gap: 18px;
  display: flex;
  gap: var(--slant-gap);
  margin-top: 2.5rem;
  height: 520px;
  /* Full bleed plus overhang so the outer slanted edges run offscreen */
  width: calc(100vw + 180px);
  margin-left: calc(50% - 50vw - 90px);
}
.slant-strip + .slant-strip { margin-top: var(--slant-gap); }
.slant-panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transform: skewX(var(--skew));
}
.slant-panel:hover { flex: 2.6; }
.slant-media {
  position: absolute;
  inset: -5% -110px;
  background-size: cover;
  background-position: center;
  transform: skewX(calc(-1 * var(--skew))) scale(1.18);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
  filter: saturate(0.7) brightness(0.65);
}
.slant-panel:hover .slant-media {
  transform: skewX(calc(-1 * var(--skew))) scale(1.06);
  filter: saturate(1.1) brightness(0.9);
}
.slant-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,10,0.15) 0%, rgba(5,5,10,0.35) 55%, rgba(5,5,10,0.92) 100%);
  z-index: 1;
}
.slant-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transform: skewX(calc(-1 * var(--skew)));
  /* Horizontal padding ≥ the skew offset (tan 14° × 260px half-height ≈ 65px)
     keeps upright text inside the leaning panel */
  padding: 2rem calc(1.5rem + 68px);
}
/* Outer panels overhang the viewport by 90px — keep their content on screen */
.slant-panel:first-child .slant-content { padding-left: calc(1.5rem + 68px + 90px); }
.slant-panel:last-child .slant-content { padding-right: calc(1.5rem + 68px + 90px); }
/* While one panel is expanded, fade its squeezed neighbors' labels */
.slant-content { transition: opacity 0.4s ease; }
.slant-strip:hover .slant-panel:not(:hover) .slant-content { opacity: 0.25; }
.slant-icon {
  font-size: 2rem;
  color: var(--strip);
  margin-bottom: auto;
  padding-top: 0.5rem;
  text-shadow: 0 0 20px color-mix(in srgb, var(--strip) 50%, transparent);
}
.slant-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--strip);
  margin-bottom: 0.6rem;
}
.slant-content h3 {
  font-family: 'Lunar Escape', sans-serif;
  font-size: 1.15rem;
  font-weight: normal;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.6rem;
}
.slant-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(12px);
  transition: max-height 0.65s cubic-bezier(0.22,1,0.36,1), opacity 0.5s ease 0.1s, transform 0.55s cubic-bezier(0.22,1,0.36,1) 0.05s;
}
.slant-panel:hover .slant-details,
.slant-panel.open .slant-details {
  max-height: 280px;
  opacity: 1;
  transform: translateY(0);
}
.slant-details p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
  max-width: 520px;
}
.slant-details .pillar-why {
  font-size: 0.75rem;
  color: var(--strip);
  font-style: italic;
}
@media (max-width: 768px) {
  .slant-strip {
    flex-direction: column;
    height: auto;
    gap: var(--slant-gap);
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
  /* Stacked: lean the cut the other way — top/bottom edges slant instead */
  .slant-panel {
    min-height: 150px;
    transform: none;
    clip-path: polygon(0 12px, 100% 0, 100% calc(100% - 12px), 0 100%);
  }
  .slant-panel:first-child { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 0 100%); }
  .slant-panel:last-child  { clip-path: polygon(0 12px, 100% 0, 100% 100%, 0 100%); }
  .slant-panel:hover, .slant-panel.open { flex: 1; }
  .slant-media { inset: -5%; transform: scale(1.1); }
  .slant-panel:hover .slant-media { transform: scale(1.05); }
  .slant-content,
  .slant-panel:first-child .slant-content,
  .slant-panel:last-child .slant-content { transform: none; padding: 2rem 1.5rem; }
}
