/* v20: full-width sheets, real hero images, the studio scene opening from the home headline. */

/* Sheets run edge to edge; no dark strip down the sides. */
.sheet {
  margin-inline: 0;
}

/* Hero images */

.full-hero-media.has-img::after {
  display: none;
}

.full-hero-media.has-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}

/* The scrim sits above the photo so the headline stays readable. */
.full-hero-media.has-img::before {
  z-index: 1;
}

.contact-img {
  margin: 0;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--card-r);
}

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

/* Studio scene: the headline capsule is a window into a room that opens on scroll. */

.studio-seq {
  position: relative;
  height: 460vh;
}

.studio-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.studio-stage .hero-sheet {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: 100svh;
  border-radius: 0;
}

.capsule {
  display: inline-block;
  width: 2.3em;
  height: 0.62em;
  margin-left: 0.12em;
  border-radius: var(--pill);
  vertical-align: 0.05em;
  background: var(--paper-3);
  box-shadow: inset 0 0 0 1px rgba(23, 26, 31, 0.12);
}

.studio-scene {
  position: absolute;
  z-index: 4;
  overflow: hidden;
  background: #14202b;
  pointer-events: none;
  visibility: hidden;
}

.studio-seq.is-ready .studio-scene {
  visibility: visible;
}

.studio-scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 40%;
}

.studio-scene .is-lit,
.studio-scene .is-active {
  opacity: 0;
}

.studio-caption {
  position: absolute;
  z-index: 5;
  left: 5vw;
  right: 5vw;
  bottom: 34px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
}

.studio-caption span:first-child {
  font-weight: 700;
}

/* While the room fills the screen, the header reads light on dark. */
html:has(.studio-seq.is-open) .jw-header {
  color: var(--paper);
}

html:has(.studio-seq.is-open) .jw-header::before {
  opacity: 0;
}

/* The next band starts right after the sequence. */
.studio-seq + .stage-band {
  margin-top: 0;
}

/* Reduced motion: no scroll sequence, the capsule shows the working room. */
.studio-seq.is-static {
  height: auto;
}

.studio-seq.is-static .studio-stage {
  position: relative;
  height: auto;
}

.studio-seq.is-static .hero-sheet {
  position: relative;
  height: auto;
  min-height: 100svh;
}

.studio-seq.is-static .studio-scene,
.studio-seq.is-static .studio-caption {
  display: none;
}

.studio-seq.is-static .capsule {
  background: url("img/studio-03-rear-lit.jpg") 50% 0% / cover;
}

@media (max-width: 600px) {
  .studio-seq {
    height: 380vh;
  }

  .studio-stage .hero-sheet {
    overflow: hidden;
  }

  /* The capsule must stay visible on phones, it is where the scene starts. */
  .capsule {
    display: inline-block;
    width: 1.8em;
  }

  .studio-scene img {
    object-position: 58% 42%;
  }

  .studio-caption span:last-child {
    display: none;
  }
}

/* The band rule from v16 must not pull the hero media out of its full-bleed layer. */
.full-hero > .full-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* The last sheet sits flush on the bottom of the page: no gap, no rounded bottom corners. */
.last-sheet {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Photo heroes: darken the top and bottom bands too, so the meta line and facts read on light photos. */
.full-hero-media.has-img::before {
  background:
    linear-gradient(180deg, rgba(17, 24, 33, 0.55) 0%, rgba(17, 24, 33, 0) 22%, rgba(17, 24, 33, 0) 68%, rgba(17, 24, 33, 0.78) 100%),
    linear-gradient(90deg, rgba(17, 24, 33, 0.82) 0%, rgba(17, 24, 33, 0.35) 55%, rgba(17, 24, 33, 0.1) 100%);
}

/* Approach photo fills its card. */
.approach-photo {
  margin: 0;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--card-r);
}

.approach-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Services demos: the tilted flow window stays inside its own column instead of covering the copy. */
.demos .tab-panel .panel-visual {
  min-width: 0;
  perspective: 1600px;
}

.demos .tab-panel .flow-window {
  width: 100%;
  margin: 0;
  transform: rotateX(4deg) rotateY(-7deg);
  transform-origin: 0 50%;
}

.demos .tab-panel {
  gap: 64px;
}

/* While the hero fades around the opening room, an opaque paper field sits behind it,
   so the light stream never shows through the studio sequence. */
.studio-stage {
  background: var(--paper);
}

/* Logo: always the bare mark, no tile behind it. */
.wordmark-tile,
.jw-header .wordmark-tile,
.jw-header.on-dark .wordmark-tile,
.menu-open .jw-header .wordmark-tile,
.jw-footer .wordmark-tile {
  background: transparent;
  box-shadow: none;
}

.wordmark-tile img {
  width: 34px;
  height: 34px;
}

/* Intro: mark on the left, the line types itself out in a mono face, like a boot screen. */

.intro-pending .intro {
  background: var(--ink-deep);
}

.intro-line {
  display: flex;
  align-items: center;
  gap: 18px;
}

.intro-mark {
  width: 34px;
  height: 34px;
  opacity: 1;
}

.intro-type {
  min-width: 19ch;
  color: rgba(244, 240, 232, 0.72);
  font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  white-space: pre;
}

.intro-caret {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--gold);
  animation: intro-caret 900ms steps(1) infinite;
}

@keyframes intro-caret {
  50% {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .intro-line {
    gap: 12px;
  }

  .intro-type {
    min-width: 0;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }
}

/* Studio frames: the NORTHSTACK sign on the wall stays the focal point, in the capsule too. */
.studio-scene img {
  object-position: 56% 0%;
}

/* Home without the light stream: dark bands sit on plain midnight ink. */
body:not(:has(#stream)) .band,
body:not(:has(#stream)) .stage-band,
body:not(:has(#stream)) .works-band {
  background: var(--ink-deep);
}

body:not(:has(#stream)) .band::before,
body:not(:has(#stream)) .sheet::after {
  display: none;
}

/* "Ötletből rendszer": the morph stays, in a calm flat frame without tilt, glow or floating toast. */
.hero-stage.is-flat {
  perspective: none;
}

.hero-stage.is-flat .flow-window {
  transform: none;
  backdrop-filter: none;
  background: rgba(244, 240, 232, 0.035);
  border: 1px solid rgba(244, 240, 232, 0.1);
  box-shadow: none;
}

.hero-stage.is-flat .flow-window::before,
.hero-stage.is-flat .flow-window::after {
  display: none;
}
