/* One still drawing behind every page: no hover reveal, no scroll motion, no WebGL. */

body:has(> .site-bg),
:root[data-theme="light"] body:has(> .site-bg),
:root[data-theme="dark"] body:has(> .site-bg) {
  background-color: var(--paper);
  background-image: none;
}

body > .site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--paper);
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/photos/site-bg-illustration.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.16;
}

/* Paper is far lighter than the drawing, so light theme needs less of it. */
:root[data-theme="light"] .site-bg::after {
  opacity: 0.09;
}

/* Do not reset .nav position — it stays sticky. */
body:has(> .site-bg) .nav {
  z-index: 20;
}

body:has(> .site-bg) main,
body:has(> .site-bg) .footer {
  position: relative;
  z-index: 1;
}

body:has(> .site-bg) .section,
body:has(> .site-bg) .section--warm,
body:has(> .site-bg) .section--dark,
body:has(> .site-bg) .hero--editorial,
body:has(> .site-bg) .how-build__shell,
body:has(> .site-bg) .how-build__main,
body:has(> .site-bg) .contact__intro,
body:has(> .site-bg) .footer {
  background: transparent;
}

body:has(> .site-bg) .why-card,
body:has(> .site-bg) .ai-process__step,
body:has(> .site-bg) .contact-action:not(.contact-action--wa),
body:has(> .site-bg) .contact-brief,
body:has(> .site-bg) .work-card {
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero--editorial {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-height) + 1.5rem) clamp(1.15rem, 4vw, 3rem) 2rem;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}

.hero--editorial::before {
  display: none;
}

.hero-editorial__inner {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-editorial__eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-editorial__stage {
  position: relative;
  margin: 0 0 1.35rem;
}

.hero-editorial__type {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  line-height: 0.95;
}

.hero-editorial__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 6.2rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--ink);
}

.hero-editorial__roles {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2em 0.35em;
}

.hero-editorial__solid {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 6.5vw, 3.75rem);
  letter-spacing: -0.035em;
  text-transform: lowercase;
  color: var(--ink);
}

.hero-editorial__outline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 6.5vw, 3.75rem);
  letter-spacing: -0.035em;
  text-transform: lowercase;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--ink) 90%, transparent);
  paint-order: stroke fill;
}

.hero-editorial__pitch {
  margin: 0 auto 1rem;
  max-width: 42ch;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink-soft);
}

.hero-editorial__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
}

.hero-editorial__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.hero-editorial__type,
.hero-editorial__pitch,
.hero-editorial__foot {
  will-change: transform, opacity;
}

.section__title--scroll {
  will-change: transform, opacity;
  transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
  .hero-editorial__type,
  .hero-editorial__pitch,
  .hero-editorial__foot,
  .section__title--scroll,
  [data-scroll-reveal] {
    will-change: auto;
    transform: none !important;
    opacity: 1 !important;
  }

}

.nav--on-editorial {
  --nav-bg: color-mix(in srgb, var(--paper) 82%, transparent);
  color: var(--ink);
}

.nav--on-editorial .nav__brand-name,
.nav--on-editorial .nav__links a {
  color: var(--ink);
}

@media (max-width: 640px) {
  .hero--editorial {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 1.1rem);
    padding-bottom: 3.25rem;
    padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
  }

  .hero-editorial__name {
    font-size: clamp(2.15rem, 11vw, 3.2rem);
    overflow-wrap: anywhere;
  }

  .hero-editorial__roles {
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1.05;
  }

  .hero-editorial__solid,
  .hero-editorial__outline {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
  }

  .hero-editorial__outline {
    -webkit-text-stroke-width: 1px;
  }

  .hero-editorial__pitch {
    max-width: none;
    font-size: 1rem;
  }

  .hero-editorial__actions {
    width: 100%;
  }

  .hero-editorial__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

}

@media (max-height: 520px) and (orientation: landscape) {
  .hero--editorial {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 0.6rem);
    padding-bottom: 1.5rem;
    justify-content: flex-start;
  }
}
