:root {
  --paper: #fcfcfa;
  --paper-shadow: #f4f3ef;
  --ink: #273139;
  --display: rgba(210, 218, 222, 0.29);
  --line: rgba(126, 136, 141, 0.25);
  --amairo: #2ca9e1;
  --edge: clamp(1.4rem, 3.5vw, 3.5rem);
  --ui-font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --jp-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

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

html {
  background: var(--paper);
  color-scheme: light;
  font-family: var(--ui-font);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.8rem;
  background: var(--ink);
  color: #fff;
  font: 400 0.75rem/1 var(--jp-font);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.first-view,
.idea-scene {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.98) 0 24%, rgba(252, 252, 250, 0.82) 55%, rgba(244, 243, 239, 0.48) 100%),
    var(--paper);
}

.first-view::before,
.idea-scene::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 0 0 0 77.15%;
  background: linear-gradient(90deg, rgba(238, 238, 234, 0.16), rgba(255, 255, 255, 0.46) 28%, rgba(245, 244, 241, 0.24));
}

/* Anchor targets receive focus for keyboard continuity, not a viewport outline. */
.first-view:focus,
.idea-scene:focus {
  outline: none;
}

.sky-opening {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 77.15%;
  width: 3.25%;
  height: 100%;
  background:
    linear-gradient(180deg, var(--amairo), #6bc2e9 57%, #d1ecf7 100%);
  box-shadow:
    -15px 0 28px rgba(80, 118, 137, 0.09),
    13px 0 24px rgba(82, 98, 106, 0.12);
}

.architectural-lines {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--line);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.site-header {
  position: absolute;
  z-index: 4;
  top: clamp(1.75rem, 4.8vh, 3rem);
  left: var(--edge);
  right: var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-size: clamp(0.7rem, 0.95vw, 0.95rem);
  line-height: 1;
  letter-spacing: 0.27em;
}

.brand {
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.brand:focus-visible,
.global-nav a:focus-visible,
a.scroll-cue:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 0.45rem;
}

.global-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.55rem, 2.7vw, 2.65rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav span,
.global-nav a {
  display: block;
  font-size: clamp(0.66rem, 0.82vw, 0.82rem);
  line-height: 1;
  letter-spacing: 0.23em;
  white-space: nowrap;
}

.global-nav a {
  position: relative;
  padding-block: 1rem;
  margin-block: -1rem;
  text-decoration: none;
}

.global-nav a[aria-current]::after,
.global-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.35rem;
  width: 1.5rem;
  height: 1px;
  background: var(--ink);
}

@media (min-width: 801px) {
  .global-nav {
    transform: translateX(0.75rem);
  }
}

.display-type {
  position: absolute;
  z-index: -2;
  inset: 0 23.3% 0 0;
  overflow: hidden;
  font-family: var(--ui-font);
  font-weight: 300;
  line-height: 0.78;
  letter-spacing: -0.068em;
  color: var(--display);
  pointer-events: none;
  user-select: none;
}

.display-word {
  position: absolute;
  left: -0.018em;
  display: block;
  font-size: clamp(12rem, 20.1vw, 22rem);
  white-space: nowrap;
}

.display-word--system {
  top: 28.1%;
}

.display-word--design {
  top: 61.8%;
}

.identity-copy {
  position: absolute;
  z-index: 3;
  top: 44.15%;
  left: clamp(3.5rem, 7.5vw, 7.5rem);
  margin: 0;
  transform: translateY(-2%);
}

.identity-number {
  margin: 0 0 clamp(1.25rem, 2.25vh, 1.55rem);
  font-size: clamp(0.72rem, 1vw, 1rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
}

.identity-copy h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.82vw, 1.8rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.085em;
}

.identity-statement {
  margin: clamp(1rem, 1.75vh, 1.2rem) 0 0;
  font-family: var(--jp-font);
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.14em;
}

.identity-statement span {
  display: inline-block;
  white-space: nowrap;
}

.location,
.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: clamp(1.55rem, 4.75vh, 3rem);
  margin: 0;
  font-size: clamp(0.6rem, 0.76vw, 0.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.32em;
  white-space: nowrap;
}

.location {
  left: var(--edge);
}

.scroll-cue {
  right: var(--edge);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

a.scroll-cue {
  min-height: 44px;
  margin-bottom: -14px;
  text-decoration: none;
}

a.scroll-cue:hover span {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* Scene 02 shares the FV's spatial and typographic tokens. */
.idea-scene {
  display: grid;
  align-items: center;
  min-height: max(100svh, 680px);
  padding-block: 10rem 8rem;
}

.sky-opening--idea {
  height: 74%;
  background: linear-gradient(180deg, #d1ecf7, #eaf6fc 60%, rgba(234, 246, 252, 0) 100%);
  clip-path: polygon(0 0, 100% 0, 35% 100%, 35% 100%);
  box-shadow: none;
}

.display-type--idea {
  inset: 0;
}

.display-type--idea .display-word {
  font-size: clamp(12rem, 21.2vw, 24rem);
}

.display-word--every {
  top: 16%;
}

.display-word--where {
  top: 65%;
  left: 21%;
}

.idea-copy {
  z-index: 3;
  margin-left: clamp(3.5rem, 7.5vw, 7.5rem);
  margin-right: 25%;
}

.idea-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1.82vw, 1.8rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.085em;
}

.idea-copy h2 span,
.idea-conclusion span {
  display: inline-block;
}

.idea-actions,
.idea-conclusion {
  font-family: var(--jp-font);
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.1em;
}

.idea-actions {
  margin: 1.5rem 0 0;
}

.idea-actions span {
  display: block;
}

.idea-conclusion {
  margin: 1.8rem 0 0;
}

.idea-copy h2 span,
.idea-actions span,
.idea-conclusion span {
  white-space: nowrap;
}

.scroll-cue svg {
  width: 0.72rem;
  height: 1rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .first-view .brand,
  .first-view .global-nav,
  .identity-copy,
  .first-view .location,
  .first-view .scroll-cue {
    animation: reveal 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .global-nav {
    animation-delay: 80ms;
  }

  .identity-copy {
    animation-delay: 130ms;
  }

  .location,
  .scroll-cue {
    animation-delay: 210ms;
  }

  .first-view .sky-opening {
    animation: sky-reveal 1050ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sky-reveal {
  from {
    opacity: 0;
    transform: scaleY(0.96);
    transform-origin: top;
  }

  to {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
}

@media (max-width: 800px) {
  :root {
    --edge: clamp(1.25rem, 5.8vw, 2rem);
  }

  .first-view::before,
  .idea-scene::before {
    left: auto;
    right: 0;
    width: 24%;
  }

  .site-header {
    top: max(1.4rem, env(safe-area-inset-top));
    align-items: flex-start;
  }

  .brand {
    font-size: clamp(0.62rem, 3vw, 0.78rem);
    letter-spacing: 0.29em;
  }

  .global-nav {
    position: absolute;
    top: 3rem;
    left: 0;
    right: 0;
  }

  .global-nav ul {
    justify-content: space-between;
    gap: 0.8rem;
  }

  .global-nav span,
  .global-nav a {
    font-size: clamp(0.5rem, 2.25vw, 0.62rem);
    letter-spacing: 0.14em;
  }

  .sky-opening {
    left: auto;
    right: 21%;
    width: clamp(1.4rem, 7vw, 2rem);
  }

  .display-type {
    inset: 0;
  }

  .display-word {
    font-size: clamp(6.5rem, 28vw, 10rem);
    letter-spacing: -0.075em;
  }

  .display-word--system {
    top: 27%;
  }

  .display-word--design {
    top: 64%;
  }

  .identity-copy {
    top: 43%;
    left: var(--edge);
    right: 28%;
    transform: none;
  }

  .identity-number {
    margin-bottom: 1.15rem;
    font-size: 0.68rem;
  }

  .identity-copy h1 {
    font-size: clamp(1.35rem, 6.4vw, 1.75rem);
    letter-spacing: 0.055em;
  }

  .identity-statement {
    max-width: 17em;
    margin-top: 1rem;
    font-size: clamp(0.95rem, 4.2vw, 1.15rem);
    line-height: 1.8;
    letter-spacing: 0.1em;
  }

  .identity-statement span {
    display: block;
  }

  .location,
  .scroll-cue {
    bottom: max(1.4rem, env(safe-area-inset-bottom));
    font-size: 0.56rem;
    letter-spacing: 0.28em;
  }

  .scroll-cue span {
    display: inline;
  }

  .scroll-cue {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    gap: 0.45rem;
  }

  .scroll-cue svg {
    width: 0.8rem;
    height: 1.15rem;
  }

  .idea-scene {
    min-height: max(100svh, 740px);
    padding-block: 9rem 7rem;
  }

  .idea-copy {
    margin-left: var(--edge);
    margin-right: 25%;
  }

  .idea-copy h2 {
    font-size: clamp(1.15rem, 4.8vw, 1.5rem);
    line-height: 1.6;
    letter-spacing: 0.055em;
  }

  .idea-copy h2 span,
  .idea-conclusion span {
    display: block;
  }

  .idea-actions,
  .idea-conclusion {
    font-size: clamp(1rem, 4.2vw, 1.15rem);
    line-height: 2;
    letter-spacing: 0.08em;
  }

  .display-type--idea .display-word {
    font-size: clamp(6.5rem, 28vw, 14rem);
  }

  .display-word--every {
    top: 21%;
  }

  .display-word--where {
    top: 74%;
    left: 10%;
  }
}

@media (max-width: 420px) {
  .global-nav {
    letter-spacing: 0.13em;
  }

  .global-nav ul {
    gap: 0.42rem;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .display-word {
    font-size: 18vw;
  }

  .identity-copy {
    top: 40%;
  }

  .identity-number {
    margin-bottom: 0.8rem;
  }

  .identity-statement {
    margin-top: 0.8rem;
  }
}
