/* ============ SEARED BONITO — styles ============ */

:root {
  --bg: #02060d;
  --bg-2: #041020;
  --navy: #001843;
  --ink: #f4f1ea;
  --muted: #93a3ba;
  --flame-1: #ff5a1f;
  --flame-2: #ffb03a;
  --ember: linear-gradient(90deg, var(--flame-1), var(--flame-2));
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue",
          "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
          "Noto Sans JP", "Yu Gothic UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

::selection { background: rgba(255, 90, 31, .35); color: var(--ink); }

/* ============ Nav ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(22px, env(safe-area-inset-left));
  transition: background .45s ease, backdrop-filter .45s ease, box-shadow .45s ease;
}
.nav.scrolled {
  background: rgba(2, 6, 13, .58);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 1px 0 rgba(244, 241, 234, .07);
}
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.nav-logo { height: 50px; width: auto; }
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(244, 241, 234, .22);
  background: rgba(2, 6, 13, .35);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .3s ease;
}
.lang-toggle:hover { border-color: rgba(244, 241, 234, .5); }
.lang-opt { transition: color .3s ease; }
.lang-opt.active { color: var(--ink); font-weight: 700; }
.lang-sep { opacity: .4; }

/* ============ Shared ============ */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-left));
}
.kicker {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--flame-2);
  margin-bottom: 22px;
}
.stmt {
  font-size: clamp(2rem, 5.4vw, 4.2rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.022em;
  max-width: 21ch;
  text-wrap: balance;
}
html[lang="ja"] .stmt { letter-spacing: 0; line-height: 1.26; font-feature-settings: "palt"; }
.lead {
  font-size: clamp(1.1rem, 1.75vw, 1.3125rem);
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--muted);
  max-width: 58ch;
  margin-top: 26px;
}
html[lang="ja"] .lead { letter-spacing: 0; line-height: 1.85; text-wrap: pretty; line-break: strict; word-break: auto-phrase; }

/* Japanese line breaking: phrase-based wrapping where supported, no mid-phrase breaks */
html[lang="ja"] :is(.stmt, .move-title, .essence-title, .q-card, .coda, .footer-note, .hero-line, .hero-sub, .kicker) {
  word-break: auto-phrase;
  line-break: strict;
}
.nowrap { white-space: nowrap; }

.sear-rule {
  display: block;
  width: 64px;
  height: 2px;
  border-radius: 2px;
  background: var(--ember);
  margin-bottom: 18px;
  transform-origin: left center;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  filter: blur(6px);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1),
              transform .9s cubic-bezier(.22,.61,.36,1),
              filter .9s cubic-bezier(.22,.61,.36,1);
}
.reveal.on { opacity: 1; transform: none; filter: none; }
.reveal.on .sear-rule { animation: ignite 1.1s cubic-bezier(.22,.61,.36,1) both .15s; }
@keyframes ignite { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 640px at 50% 118%, rgba(255, 90, 31, .16), transparent 62%),
    radial-gradient(900px 520px at 50% 112%, rgba(0, 40, 96, .5), transparent 70%),
    linear-gradient(180deg, #02060d 0%, #030b18 55%, #041020 100%);
}
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-glow {
  position: absolute;
  left: 50%;
  bottom: -12%;
  width: 130vw;
  height: 46vh;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 122, 40, .22), rgba(255, 90, 31, .07) 55%, transparent 75%);
  filter: blur(10px);
  animation: breathe 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { opacity: .75; transform: translateX(-50%) scaleY(1); }
  50% { opacity: 1; transform: translateX(-50%) scaleY(1.12); }
}
.hero-inner { position: relative; z-index: 2; padding: 0 24px; }
.hero-mark {
  width: clamp(160px, 22vw, 275px);
  height: auto;
  margin: 0 auto 34px;
  filter: drop-shadow(0 8px 40px rgba(0, 24, 67, .8));
}
.hero-title {
  font-size: clamp(2.7rem, 9vw, 7.4rem);
  font-weight: 700;
  letter-spacing: -.018em;
  line-height: 1.02;
  background: linear-gradient(180deg, #ffffff 0%, #dfe6f2 55%, #93a3ba 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 18px;
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
  font-weight: 500;
  letter-spacing: .015em;
  color: #c9d2df;
}
.hero-line {
  margin: 46px auto 0;
  font-size: clamp(.95rem, 1.6vw, 1.1rem);
  color: rgba(244, 241, 234, .82);
  display: inline-block;
}
.hero-line .sear-rule { margin: 0 auto 14px; }

/* load-in rise animation */
.rise { opacity: 0; transform: translateY(30px); filter: blur(8px); }
body.loaded .rise {
  animation: riseIn 1.15s cubic-bezier(.22,.61,.36,1) forwards;
}
body.loaded .rise:nth-child(1) { animation-delay: .05s; }
body.loaded .rise:nth-child(2) { animation-delay: .22s; }
body.loaded .rise:nth-child(3) { animation-delay: .42s; }
body.loaded .rise:nth-child(4) { animation-delay: .62s; }
@keyframes riseIn { to { opacity: 1; transform: none; filter: none; } }

.scroll-cue {
  position: absolute;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: cueIn 1s ease 1.6s forwards;
}
@keyframes cueIn { to { opacity: .9; } }
.cue-bar {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--flame-2), transparent);
  animation: cueSlide 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cueSlide {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}

/* ============ Origin ============ */
.origin { position: relative; min-height: 130svh; display: flex; align-items: flex-end; overflow: hidden; }
.origin-media { position: absolute; inset: 0; overflow: hidden; }
.embers-origin { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* fire flicker — two out-of-phase glow layers blended over the flames */
.fire-flicker {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.fire-flicker::before,
.fire-flicker::after {
  content: "";
  position: absolute;
  inset: -6%;
  background: radial-gradient(50% 42% at 47% 72%, rgba(255, 128, 44, .5), rgba(255, 90, 31, .18) 55%, transparent 76%);
  animation: flick1 2.7s ease-in-out infinite;
  will-change: opacity, transform;
}
.fire-flicker::after {
  background: radial-gradient(38% 32% at 57% 76%, rgba(255, 178, 62, .44), rgba(255, 100, 34, .14) 58%, transparent 78%);
  animation: flick2 4.1s ease-in-out infinite;
}
@keyframes flick1 {
  0%, 100% { opacity: .5; transform: scale(1); }
  16% { opacity: .92; }
  33% { opacity: .58; transform: scale(1.035); }
  52% { opacity: 1; transform: scale(1.012); }
  70% { opacity: .66; }
  86% { opacity: .94; transform: scale(1.02); }
}
@keyframes flick2 {
  0%, 100% { opacity: .72; transform: scale(1.025); }
  21% { opacity: .4; }
  44% { opacity: .96; transform: scale(1.005); }
  64% { opacity: .5; }
  83% { opacity: .88; transform: scale(1.03); }
}
.origin-img {
  width: 100%;
  height: 116%;
  object-fit: cover;
  will-change: transform;
}
.origin-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(2, 6, 13, .1) 34%, rgba(2, 6, 13, .34) 66%, var(--bg) 100%),
    linear-gradient(90deg, rgba(2, 6, 13, .55), transparent 55%);
}
.origin-copy {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-left)) 16svh;
  width: 100%;
}
.origin-copy .stmt { text-shadow: 0 2px 30px rgba(2, 6, 13, .8); }

/* ============ Manifesto ============ */
.manifesto { height: 330vh; position: relative; background: var(--bg); }
.pin { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.pin-inner { max-width: 900px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left)); }
.words {
  font-size: clamp(1.7rem, 4.6vw, 3.4rem);
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.02em;
}
html[lang="ja"] .words { letter-spacing: 0; line-height: 1.52; font-feature-settings: "palt"; }
.words .w {
  opacity: .12;
  display: inline-block;
  transition: opacity .25s linear;
}
.words .w.lit { opacity: 1; }

/* ============ AI ============ */
.ai { position: relative; padding: 22svh 0; overflow: hidden; background: var(--bg); }
.ai-bg { position: absolute; inset: 0; opacity: .34; }
.ai-img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.ai-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 40%, transparent 62%, var(--bg) 100%);
}
.ai .wrap { position: relative; z-index: 2; }
.verb-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}
.verb-flow span {
  border: 1px solid rgba(244, 241, 234, .2);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  letter-spacing: .08em;
  color: rgba(244, 241, 234, .9);
  background: rgba(4, 16, 32, .5);
  position: relative;
  transition: border-color .4s ease, box-shadow .4s ease;
}
.verb-flow span:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 176, 58, .55);
  font-size: .8em;
}
.verb-flow span.hot {
  border-color: rgba(255, 122, 40, .75);
  box-shadow: 0 0 24px rgba(255, 90, 31, .25), inset 0 0 14px rgba(255, 90, 31, .12);
}

/* ============ Questions ============ */
.questions { padding: 20svh 0; background: linear-gradient(180deg, var(--bg), var(--bg-2) 55%, var(--bg)); }
.q-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 54px;
}
.q-card {
  border: 1px solid rgba(244, 241, 234, .12);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(9, 22, 44, .75), rgba(2, 6, 13, .6));
  padding: 42px 30px 46px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.01em;
  position: relative;
  overflow: hidden;
}
.q-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: var(--ember);
  opacity: .8;
}
.q-card:nth-child(2) { transition-delay: .12s; }
.q-card:nth-child(3) { transition-delay: .24s; }
.questions .lead { margin-top: 54px; }

/* ============ Process ============ */
.process { padding: 20svh 0; }
.moves { list-style: none; display: flex; flex-direction: column; }
.move {
  display: flex;
  align-items: baseline;
  gap: clamp(18px, 4vw, 48px);
  padding: clamp(30px, 5vh, 52px) 0;
  border-bottom: 1px solid rgba(244, 241, 234, .1);
}
.move:first-child { border-top: 1px solid rgba(244, 241, 234, .1); }
.move-num {
  font-size: clamp(1.6rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.16;
  background: var(--ember);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}
.move-title {
  font-size: clamp(1.6rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.16;
}
html[lang="ja"] .move-title { letter-spacing: 0; line-height: 1.32; }
.move:nth-child(2) { transition-delay: .1s; }
.move:nth-child(3) { transition-delay: .2s; }
.coda {
  margin-top: 64px;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 600;
  color: var(--ink);
}

/* ============ Essence ============ */
.essence { position: relative; min-height: 150svh; display: flex; align-items: center; overflow: hidden; }
.essence-media { position: absolute; inset: 0; }
.essence-img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.essence-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(2, 6, 13, .18) 30%, rgba(2, 6, 13, .5) 72%, var(--bg) 100%);
}
.essence-copy {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-left));
  width: 100%;
  text-align: center;
}
.essence-title {
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
  text-shadow: 0 4px 44px rgba(2, 6, 13, .9);
}
html[lang="ja"] .essence-title { letter-spacing: 0; line-height: 1.28; }
.essence-title .reveal:nth-child(3) { transition-delay: .18s; }
.essence-copy .lead { margin: 34px auto 0; }

/* ============ Footer ============ */
.footer {
  padding: 16svh 24px max(8svh, env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(180deg, var(--bg), #010409);
}
.footer-note {
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -.01em;
  background: var(--ember);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 60px auto 40px;
  opacity: .95;
}
.dock-slot {
  width: min(146px, 30vw);
  aspect-ratio: 539 / 253;
  margin-bottom: min(13px, 2.7vw);
  position: relative;
}
.dock-static { width: 100%; height: auto; display: block; }
body.swim-active .dock-static { visibility: hidden; }
.footer-wordmark { width: min(300px, 62vw); height: auto; display: block; }

/* scroll-driven swimming fish */
.swim-fish {
  position: fixed;
  left: 0;
  top: 0;
  width: clamp(72px, 9vw, 120px);
  height: auto;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 26px rgba(0, 24, 67, .6));
}
body.swim-active .hero-mark { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .swim-fish { display: none !important; }
}
.footer-fine { font-size: 12.5px; letter-spacing: .08em; color: rgba(147, 163, 186, .75); }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .q-cards { grid-template-columns: 1fr; }
  .move { flex-direction: column; gap: 10px; }
  .nav-logo { height: 36px; }
  .origin { min-height: 118svh; }
  .essence { min-height: 130svh; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .rise { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; animation: none !important; }
  .scroll-cue, .cue-bar, .hero-glow { animation: none !important; opacity: .9; }
  .words .w { opacity: 1; }
  .embers { display: none; }
  .fire-flicker::before, .fire-flicker::after { animation: none !important; opacity: .55; }
  .manifesto { height: auto; padding: 24svh 0; }
  .pin { position: static; height: auto; }
  .origin-img, .ai-img, .essence-img { transform: none !important; }
}
