/* Enter the world: a short scroll-pinned passage through the stained-glass arch.
   js/hero-entry.js turns it on only while site motion is on; otherwise the hero stays static. */
.hero-lead {
  max-width: 34em;
  margin: clamp(20px, 2.6vh, 28px) 0 0;
  color: var(--neo-silver-bright);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .04em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .85);
  text-wrap: balance;
}
.hero-lead span { display: inline-block; }

.hero-entry { position: relative; }
.hero-entry-runway { display: none; }
.hero--cinematic > .hero-entry-light,
.hero--cinematic > .hero-entry-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
/* Additive light, so it reads as light breaking through the glass rather than a tint over it. */
.hero--cinematic > .hero-entry-light {
  z-index: 3;
  mix-blend-mode: screen;
  background: radial-gradient(circle 62vmax at var(--entry-cx, 72%) var(--entry-cy, 50%),
    rgba(255, 250, 232, .95) 0, rgba(255, 232, 170, .62) 12%, rgba(140, 255, 238, .36) 30%, rgba(120, 247, 232, .1) 58%, transparent 100%);
}
@supports (mix-blend-mode: plus-lighter) {
  .hero--cinematic > .hero-entry-light { mix-blend-mode: plus-lighter; }
}
.hero-entry-rays {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from calc(var(--entry-spin, 0) * 1deg) at var(--entry-cx, 72%) var(--entry-cy, 50%),
    rgba(255, 240, 205, 0) 0deg, rgba(255, 240, 205, .26) 4deg, rgba(255, 240, 205, 0) 8deg 15deg);
  -webkit-mask-image: radial-gradient(circle 70vmax at var(--entry-cx, 72%) var(--entry-cy, 50%), transparent 0 6%, #000 24%, transparent 80%);
  mask-image: radial-gradient(circle 70vmax at var(--entry-cx, 72%) var(--entry-cy, 50%), transparent 0 6%, #000 24%, transparent 80%);
}
/* The last stretch settles into the next section's background instead of cutting to it. */
.hero--cinematic > .hero-entry-veil {
  z-index: 6;
  background: linear-gradient(180deg, rgba(3, 5, 6, .2) 0%, rgba(3, 5, 6, .55) 52%, #030506 100%);
}

.hero-entry[data-entry="on"] .hero-entry-runway { display: block; height: var(--entry-distance, 60vh); }
.hero-entry[data-entry="on"] > .hero--cinematic { position: sticky; top: var(--entry-top, 0px); }
.hero-entry[data-entry="on"] .hero--cinematic .hero-portrait {
  translate: calc(var(--depth-x, 0px) + var(--entry-x, 0px)) calc(var(--depth-y, 0px) + var(--entry-y, 0px));
  scale: var(--entry-scale, 1);
  will-change: translate, scale;
}
.hero-entry[data-entry-active] .hero--cinematic .hero-portrait { transition: none; }
.hero-entry[data-entry="on"] .hero-title-lockup {
  opacity: var(--entry-title, 1);
  translate: 0 var(--entry-title-y, 0px);
}
.hero-entry[data-entry="on"] .hero-title-lockup:focus-within { opacity: 1; translate: none; }
.hero-entry[data-entry="on"] .hero--cinematic .scroll-indicator { opacity: var(--entry-title, 1); }
.hero-entry[data-entry="on"] .hero--cinematic > .hero-entry-light { opacity: var(--entry-light, 0); }
.hero-entry[data-entry="on"] .hero--cinematic > .hero-entry-veil { opacity: var(--entry-veil, 0); }
@media (max-width: 980px) {
  /* Centre without a transform so the scroll sequence can own translate and scale. */
  .hero-entry[data-entry="on"] .hero--cinematic .hero-portrait { right: 0; left: 0; margin-inline: auto; transform: none; }
  .hero-lead { margin-inline: auto; font-size: 1rem; }
}
@media (max-width: 600px) {
  .hero-lead { margin-top: 16px; font-size: .92rem; line-height: 1.65; letter-spacing: .02em; }
}

/* Narrow desktop windows and zoomed pages use the phone-style hero. Keep the arch's tall 9:13 shape
   instead of stretching it across the width, and let the title shrink on short windows. */
@media (min-width: 601px) and (max-width: 980px) {
  .hero.hero--cinematic .hero-portrait {
    width: min(88vw, 480px, calc(min(70svh, 680px) * 9 / 13));
    height: auto;
    aspect-ratio: 9 / 13;
  }
}
/* Wide but short windows (zoomed pages, split screens): title on the left, arch on the right, as on desktop. */
@media (min-width: 601px) and (max-width: 980px) and (min-aspect-ratio: 1/1) {
  .hero.hero--cinematic {
    flex-direction: row;
    padding: clamp(96px, 16svh, 120px) clamp(28px, 5vw, 56px) clamp(36px, 7svh, 56px);
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
  }
  .hero-title-lockup { width: min(48vw, 520px); padding: 0; text-align: left; }
  .hero.hero--cinematic h1 { font-size: clamp(2.4rem, min(6.6vw, 13svh), 4.6rem); line-height: .95; text-align: left; }
  .hero.hero--cinematic h1 span { margin-inline: 0; }
  .hero-cinematic-actions { justify-content: flex-start; }
  .hero-lead { margin-inline: 0; }
  .hero-entry .hero.hero--cinematic .hero-portrait {
    top: clamp(88px, 13svh, 112px);
    right: clamp(28px, 6vw, 72px);
    left: auto;
    bottom: auto;
    width: calc(min(74svh, 620px) * 9 / 13);
    height: min(74svh, 620px);
    margin: 0;
    transform: none;
    aspect-ratio: 9 / 13;
  }
}

/* Portrait tablets: the title block sits at the bottom, over the arch's lower edge, so the lower third is not empty. */
@media (min-width: 601px) and (max-width: 980px) and (max-aspect-ratio: 1/1) {
  .hero.hero--cinematic { justify-content: flex-end; }
}

/* Short desktop windows: let the hero shrink to its content so the buttons stay above the fold. */
@media (min-width: 981px) and (max-height: 700px) {
  .hero.hero--cinematic {
    min-height: 100svh;
    padding-top: clamp(96px, 15svh, 120px);
    padding-bottom: clamp(32px, 6svh, 56px);
  }
  .hero--cinematic .hero-portrait { min-height: 0; }
}

/* Hero copy and actions, 2026-10-31: English first.
   - The title is CREATE / NEW WORLDS in Chakra Petch capitals, whose cut corners echo the HUD and decode effects;
     it runs at almost the width Exo 2 had, which was checked against the arch at every breakpoint. The Japanese
     line beneath it is Zen Kaku Gothic New, widely spaced.
   - The lead lists what NEO makes; the two actions are an equal pair, each with its Japanese meaning underneath.
     Consulting is the solid tiffany button, as in the header; the works button is its outline twin. */
.hero.hero--cinematic h1 > span[lang="en"] {
  font-family: 'Chakra Petch', 'Noto Sans JP', sans-serif;
  font-size: .97em;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
}
.hero.hero--cinematic h1 > span.hero-title-ja {
  margin-top: clamp(14px, 2vh, 22px);
  color: rgba(233, 245, 243, .9);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .32em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
}
.hero-lead[lang="en"] {
  font-family: 'Chakra Petch', 'Noto Sans JP', sans-serif;
  font-weight: 600;
  letter-spacing: .14em;
}
.hero-lead[lang="en"] span + span {
  color: rgba(120, 247, 232, .85);
  font-weight: 500;
  letter-spacing: .08em;
}
.hero-cinematic-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 420px);
}
.hero-cinematic-cta,
.hero-cinematic-link {
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid rgba(120, 247, 232, .7);
  border-radius: 4px;
  font-family: 'Chakra Petch', 'Noto Sans JP', sans-serif;
  font-size: .86rem;
  letter-spacing: .14em;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
}
.hero-cinematic-cta small,
.hero-cinematic-link small {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .12em;
  opacity: .72;
}
.hero-cinematic-cta {
  color: var(--neo-accent);
  background: rgba(4, 8, 9, .62);
}
.hero-cinematic-link {
  color: #04201e;
  background: var(--neo-accent);
  box-shadow: 0 0 24px rgba(120, 247, 232, .28);
}
.hero-cinematic-link::after { content: none; }
.hero-cinematic-cta:hover,
.hero-cinematic-cta:focus-visible {
  color: var(--neo-accent);
  background: rgba(16, 44, 44, .82);
  box-shadow: 0 0 24px rgba(120, 247, 232, .2);
}
.hero-cinematic-link:hover,
.hero-cinematic-link:focus-visible {
  color: #04201e;
  background: #a6fff4;
  box-shadow: 0 0 32px rgba(120, 247, 232, .42);
}
.hero-cinematic-cta:active,
.hero-cinematic-link:active { transform: scale(.97); }
.hero-cinematic-cta:focus-visible,
.hero-cinematic-link:focus-visible { outline: 2px solid #f4fffd; outline-offset: 3px; }
@media (max-width: 980px) {
  .hero-cinematic-actions { margin-inline: auto; }
}
@media (min-width: 601px) and (max-width: 980px) and (min-aspect-ratio: 1/1) {
  .hero-cinematic-actions { margin-inline: 0; }
}
@media (max-width: 600px) {
  .hero.hero--cinematic h1 > span[lang="en"] { font-size: clamp(2.4rem, 12vw, 3.3rem); }
  .hero.hero--cinematic h1 > span.hero-title-ja { margin-top: 12px; font-size: .9rem; letter-spacing: .26em; }
  .hero-lead[lang="en"] { font-size: .74rem; letter-spacing: .1em; }
  .hero-cinematic-actions { gap: 10px; width: min(100%, 320px); margin-top: 22px; }
  .hero-cinematic-cta,
  .hero-cinematic-link { min-height: 54px; font-size: .78rem; letter-spacing: .1em; }
}

/* Brand colours from the profile title, 2026-10-31: white with a soft halo, tiffany NEO glow, and the gold serif italic
   tagline. Letters stay single-colour (gradient-filled text drops glyphs on some Android phones); the two brand colours
   meet only in the thin line under the Japanese tagline. Nothing here animates. */
/* 2026-11-03: CREATE is a vivid gold with a strong gold glow, and its shades of gold (deep, pale, near white) flow
   through it left to right like the colours of NEW WORLDS below (the .hero-aurora copies, styled further down). The
   Japanese line beneath is white so the three lines stay apart. */
.hero.hero--cinematic h1 > span[lang="en"]:not(.grad) {
  position: relative;
  color: #ffcc1f;
  /* A thin dark edge lifts the letters off the bright glass; then a strong, saturated gold glow in three rings. */
  text-shadow: 0 0 1px rgba(0, 0, 0, .95), 0 0 4px rgba(60, 30, 0, .7), 0 0 10px rgba(255, 196, 30, .95), 0 0 24px rgba(255, 176, 20, .75), 0 0 46px rgba(255, 160, 10, .45);
}

/* A gold instrument scale beneath the title, echoing the site's targeting and decode effects. Purely decorative
   (aria-hidden markup at the end of the h1). */
#heroTitle { position: relative; }
.hero-hud {
  position: absolute;
  inset: -6px -4px;
  pointer-events: none;
}
.hero-hud::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  width: 120px;
  height: 6px;
  margin-left: -60px;
  background: repeating-linear-gradient(90deg, rgba(255, 226, 122, .85) 0 1px, transparent 1px 8px);
  filter: drop-shadow(0 0 3px rgba(255, 226, 122, .7));
}
.hero.hero--cinematic h1 > span.grad {
  color: #78f7e8;
  text-shadow: 0 0 2px rgba(0, 0, 0, .9), 0 0 6px rgba(67, 255, 236, .7), 0 0 18px rgba(67, 255, 236, .45), 0 2px 22px rgba(0, 0, 0, .7);
}
/* 2026-11-03: NEW WORLDS takes the colours of the earlier 「創造する」 (tiffany, pale blue, lavender, gold), flowing left
   to right without end. The letters stay solid tiffany, since gradient-filled text drops glyphs on some Android phones;
   each other colour is a copy of the word (the empty <i>s in the h1, so the heading's text is unchanged) seen through a
   soft band of mask. The mask is twice the word's width, so a falling percentage moves it right by one repeat. */
.hero-aurora {
  position: absolute;
  inset: 0;
  font-style: normal;
  pointer-events: none;
  user-select: none;
  -webkit-mask-size: 200% 100%;
  mask-size: 200% 100%;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}
.hero-aurora::before {
  content: attr(data-text) / "";
  white-space: nowrap;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}
.hero-aurora:nth-of-type(1) {
  color: #8fdcff;
  -webkit-mask-image: linear-gradient(100deg, transparent 6%, #000 20%, transparent 34%);
  mask-image: linear-gradient(100deg, transparent 6%, #000 20%, transparent 34%);
}
.hero-aurora:nth-of-type(2) {
  color: #c7b8ff;
  -webkit-mask-image: linear-gradient(100deg, transparent 22%, #000 36%, transparent 50%);
  mask-image: linear-gradient(100deg, transparent 22%, #000 36%, transparent 50%);
}
.hero-aurora:nth-of-type(3) {
  color: #ffe27a;
  -webkit-mask-image: linear-gradient(100deg, transparent 40%, #000 54%, transparent 68%);
  mask-image: linear-gradient(100deg, transparent 40%, #000 54%, transparent 68%);
}
/* CREATE's copies carry the shades of its gold instead. */
.hero-aurora--gold:nth-of-type(1) { color: #e89b00; }
.hero-aurora--gold:nth-of-type(2) { color: #fff3b0; }
.hero-aurora--gold:nth-of-type(3) { color: #fffbe8; }
/* 2026-11-16: the bands no longer flow. Moving the masks over the letters every frame made the heading flicker on
   phones (reported on Android); the colours now rest where they are. */
.hero.hero--cinematic h1 > span.hero-title-ja {
  margin-top: clamp(16px, 2.2vh, 24px);
  color: rgba(244, 251, 250, .95);
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: .3em;
  text-indent: .3em;
  /* A tight dark edge first, so the line reads over bright glass; then the tiffany halo from the profile title. */
  text-shadow: 0 1px 2px rgba(0, 0, 0, .95), 0 0 10px rgba(0, 0, 0, .85), 0 0 16px rgba(67, 255, 236, .3);
}
.hero.hero--cinematic h1 > span.hero-title-ja::after {
  content: "";
  display: block;
  width: 140px;
  height: 2px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, rgba(120, 247, 232, 0), #78f7e8 25%, var(--neo-gold-light) 75%, rgba(232, 201, 121, 0));
  box-shadow: 0 0 10px rgba(120, 247, 232, .5), 0 1px 3px rgba(0, 0, 0, .8);
}
@media (min-width: 981px) {
  .hero.hero--cinematic h1 > span.hero-title-ja::after {
    margin-left: 0;
    background: linear-gradient(90deg, #78f7e8, var(--neo-gold-light) 70%, rgba(232, 201, 121, 0));
  }
}
@media (min-width: 601px) and (max-width: 980px) and (min-aspect-ratio: 1/1) {
  .hero.hero--cinematic h1 > span.hero-title-ja::after {
    margin-left: 0;
    background: linear-gradient(90deg, #78f7e8, var(--neo-gold-light) 70%, rgba(232, 201, 121, 0));
  }
}
@media (max-width: 600px) {
  .hero.hero--cinematic h1 > span.hero-title-ja { margin-top: 14px; font-size: 1.05rem; letter-spacing: .26em; text-indent: .26em; }
  .hero.hero--cinematic h1 > span.hero-title-ja::after { width: 112px; margin-top: 12px; }
}

/* Phones, 2026-11-01: no background blur over the live glass. A blur over a canvas that redraws every frame makes the
   phone re-render the picture behind it each frame, and on Android the GPU then runs short and leaves black squares.
   A slightly darker plate keeps the button and the time readout just as legible. */
@media (max-width: 600px) {
  .hero-cinematic-cta {
    background: rgba(4, 8, 9, .78);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .hero.hero--cinematic > .hero-sky-readout {
    background: rgba(3, 5, 6, .84);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Phones, 2026-11-01: the faint light paths and particle haze behind the hero hold still. Each was a full-hero layer
   animating all the time (one of them masked), on top of four live canvases; on Android the GPU ran out of memory
   and left parts of the page unpainted. At rest they look the same. */
@media (max-width: 600px) {
  .hero::before,
  .hero::after,
  .hero.hero--cinematic::before,
  .hero.hero--cinematic::after {
    animation: none;
    will-change: auto;
  }
}

/* The magic circle (hero-gate.js), drawn over the light during the last stretch of the scroll sequence and under the
   veil that settles into the next section. */
.hero.hero--cinematic > .hero-gate {
  position: absolute;
  z-index: 5;
  inset: 0 auto auto 0;
  display: none;
  width: 100%;
  pointer-events: none;
}
.hero-entry[data-entry="on"] .hero.hero--cinematic > .hero-gate { display: block; }
.hero-entry[data-entry="on"] .hero.hero--cinematic > .hero-gate[hidden] { display: none; }
