/* Home hero */
.home-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.spline-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #050505;
}

.spline-bg__fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(120, 120, 130, 0.28), transparent 62%),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(0, 0, 0, 0.85), transparent 55%),
    linear-gradient(180deg, #0a0a0c 0%, #050505 45%, #000 100%);
}

.spline-bg__fallback::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(78vw, 560px);
  height: min(78vw, 560px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.42), transparent 22%),
    radial-gradient(circle at 68% 22%, rgba(220, 220, 230, 0.18), transparent 18%),
    radial-gradient(circle at 50% 58%, rgba(110, 110, 120, 0.65), rgba(18, 18, 22, 0.98) 72%);
  filter: blur(1.5px);
  opacity: 0.95;
  box-shadow:
    0 0 120px rgba(255, 255, 255, 0.07),
    0 0 40px rgba(160, 160, 180, 0.08),
    inset 0 0 80px rgba(0, 0, 0, 0.4);
}

.spline-bg__fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.spline-bg__mount {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.spline-bg.is-live .spline-bg__fallback {
  opacity: 0;
  transition: opacity 900ms ease;
}

/* Hide without destroying iframe — prevents Spline reload on scroll-back */
.spline-bg.is-away .spline-bg__mount {
  opacity: 0;
  visibility: hidden;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.spline-bg.is-live:not(.is-away) .spline-bg__mount {
  opacity: 1;
  visibility: visible;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.spline-bg__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

[data-theme="light"] .spline-bg {
  background: #ececf0;
}

[data-theme="light"] .spline-bg__fallback {
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(180, 180, 190, 0.45), transparent 62%),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.55), transparent 30%),
    linear-gradient(180deg, #f4f4f5 0%, #e8e8ec 100%);
}

[data-theme="light"] .spline-bg__fallback::before {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.8), transparent 28%),
    radial-gradient(circle at 50% 55%, rgba(170, 170, 180, 0.55), rgba(220, 220, 226, 0.95) 70%);
}

[data-theme="light"] .spline-bg__veil {
  background: linear-gradient(180deg, rgba(244, 244, 245, 0.18) 0%, rgba(244, 244, 245, 0.35) 55%, rgba(244, 244, 245, 0.82) 100%);
}

.home-hero {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 6.5rem 1.5rem 7.5rem;
  width: 100%;
}

.home-hero .hero-animate {
  width: min(100%, 52rem);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(90vw, 600px);
  height: min(90vw, 600px);
  transform: translate(-50%, -50%);
  background: var(--accent);
  opacity: 0.05;
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero__eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  backdrop-filter: blur(10px);
}

.home-hero h1 {
  max-width: 18ch;
  font-size: clamp(2.1rem, 7vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.home-hero__lead {
  margin-top: 1.25rem;
  max-width: 38ch;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
}

.home-hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(100%, 360px);
}

@media (min-width: 480px) {
  .home-hero__actions {
    flex-direction: row;
    width: auto;
    justify-content: center;
  }
}

.browser-frame {
  margin-top: 3.5rem;
  width: min(100%, 768px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

[data-theme="light"] .browser-frame {
  background: rgba(255, 255, 255, 0.65);
}

.browser-frame__bar {
  height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.9rem;
  border-bottom: 1px solid var(--border);
}

.browser-frame__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .browser-frame__dot {
  background: rgba(0, 0, 0, 0.2);
}

.browser-frame__body {
  position: relative;
  aspect-ratio: 16 / 9;
}

.browser-frame__body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.browser-frame__caption {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  text-align: left;
}

[data-theme="light"] .browser-frame__caption {
  background: rgba(255, 255, 255, 0.85);
}

.browser-frame__caption strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.browser-frame__caption span {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.home-content {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, transparent, var(--bg) 8%);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section-head p {
  color: var(--text-soft);
  max-width: 36ch;
  font-size: 0.95rem;
}

/* Case study */
.case-hero {
  padding-top: 7.5rem;
}

.case-hero__media {
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}

.case-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-meta {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

@media (min-width: 700px) {
  .case-meta {
    grid-template-columns: repeat(4, 1fr);
  }
}

.case-meta dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-soft);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.case-meta dd {
  font-size: 0.95rem;
  font-weight: 500;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}

.prose .cta-band,
.cta-band--article {
  margin-top: 1.75rem;
  text-align: left;
  padding: 1.35rem 1.25rem;
}

.prose .cta-band h2,
.cta-band--article h2 {
  margin: 0 0 0.4rem !important;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  text-align: left;
}

.prose .cta-band p,
.cta-band--article p {
  margin: 0 0 1rem;
  margin-inline: 0;
  text-align: left;
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.prose ul {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.gallery {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 700px) {
  .gallery {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  min-height: 220px;
}

.next-project {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 3rem 0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Article */
.article-hero {
  padding-top: 7.5rem;
  padding-bottom: 2rem;
}

.article-hero__media {
  margin-top: 1.75rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 21 / 9;
  min-height: 200px;
}

.article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  padding-bottom: 3rem;
}

/* Legal */
.legal-body {
  padding: 7rem 0 3rem;
}

.legal-body h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.legal-body h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.6rem;
}

.legal-body p {
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* 404 */
.error-page {
  min-height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 7rem 1.25rem 3rem;
}

.error-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 12vw, 6rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.error-page p {
  color: var(--text-soft);
  margin: 1rem 0 1.5rem;
}

/* Careers */
.role-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

@media (min-width: 700px) {
  .role-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.role-card h3 {
  font-size: 1.05rem;
  font-weight: 500;
}

.role-card p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Contact map placeholder */
.map-placeholder {
  min-height: 260px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, var(--surface), var(--surface-strong)),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 12px,
      rgba(127, 127, 127, 0.08) 12px,
      rgba(127, 127, 127, 0.08) 24px
    );
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--text-soft);
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
