/* Ultimate Kami — ink, bone paper, electric blue (from the icon), torii vermilion. */
:root {
  --ink: #070708;
  --ink-2: #0e0f12;
  --bone: #ece6da;
  --bone-2: #ddd5c4;
  --paper-ink: #16130f;
  --blue: #3fb8ff;
  --blue-deep: #0a6cff;
  --blue-glow: rgba(63, 184, 255, 0.5);
  --red: #ff3b1f;
  --muted: #8b8b93;
  --line: rgba(236, 230, 218, 0.12);

  --f-display: "Big Shoulders Display", "Impact", "Arial Narrow Bold", sans-serif;
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --f-kanji: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -0.01em; }
::selection { background: var(--blue); color: var(--ink); }

/* ---------- Shared type ---------- */
.display {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(3.2rem, 9vw, 9rem); line-height: 0.86; letter-spacing: -0.01em; margin: 0;
}
.display em { color: var(--blue); font-size: 1.04em; }
[data-section="light"] .display em { color: var(--blue-deep); }

/* ---------- Grain + cursor ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(4%, -8%); }
  60% { transform: translate(-8%, -2%); } 80% { transform: translate(6%, 6%); } 100% { transform: translate(0, 0); }
}
.cursor {
  position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--bone); mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), background .3s;
  opacity: 0;
}
.cursor.ready { opacity: 1; }
.cursor.big { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--blue); mix-blend-mode: normal; }
.cursor-label { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity .2s; font-weight: 600; }
.cursor.big .cursor-label { opacity: 1; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--ink);
  display: grid; place-items: center;
}
html:not(.js) .loader { display: none; }
.loader-kanji {
  font-family: var(--f-kanji); font-weight: 800; font-size: clamp(8rem, 26vw, 18rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--blue);
  background: linear-gradient(0deg, var(--blue) 0 var(--fill, 0%), transparent var(--fill, 0%));
  -webkit-background-clip: text; background-clip: text;
}
.loader-count { position: absolute; bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px)); right: var(--gutter); font-family: var(--f-display); font-weight: 900; font-size: clamp(3rem, 8vw, 6rem); line-height: 1; }
.loader-line { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) / 2 + env(safe-area-inset-bottom, 0px)); height: 1px; background: var(--line); }
.loader-line span { display: block; height: 100%; width: var(--fill, 0%); background: var(--blue); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) 18px;
  mix-blend-mode: difference; color: #fff;
}
.nav-mark { display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 900; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em; }
.nav-glyph { font-family: var(--f-kanji); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.nav-links { display: flex; gap: 36px; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.nav-links a { display: flex; gap: 8px; align-items: baseline; opacity: .75; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-links i { font-style: normal; font-family: var(--f-kanji); }
.nav-cta {
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  padding: 12px 20px; border: 1px solid currentColor; border-radius: 99px;
  transition: background .3s, color .3s;
}
.nav-cta:hover { background: #fff; color: #000; }

/* ---------- App Store badge ---------- */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 26px 14px 20px; border-radius: 16px;
  background: var(--bone); color: var(--ink);
  font-weight: 700; position: relative; overflow: hidden; isolation: isolate;
}
.store-badge::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue); transform: translateY(101%); transition: transform .5s var(--ease);
}
.store-badge:hover::before { transform: none; }
.store-badge svg { width: 28px; height: 28px; fill: currentColor; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.32rem; letter-spacing: -.01em; }
.store-badge small { font-size: .7rem; font-weight: 500; letter-spacing: 0; }
.store-xl { padding: 20px 36px 20px 28px; border-radius: 20px; }
.store-xl span { font-size: 1.8rem; }
.store-xl svg { width: 38px; height: 38px; }

/* ---------- Rotato placeholders ----------
   Each .rotato has data-video="videos/name". script.js swaps in
   videos/name.webm or videos/name.mp4 as soon as one exists. */
.rotato {
  position: relative; aspect-ratio: 9 / 19.5; width: 100%;
  border-radius: 13% / 6%;
  background:
    radial-gradient(120% 60% at 30% 10%, rgba(63,184,255,.35), transparent 60%),
    radial-gradient(90% 50% at 80% 100%, rgba(10,108,255,.35), transparent 60%),
    linear-gradient(170deg, #111a26, #06090e);
  border: 9px solid #15181d;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 60px 120px -40px rgba(10,108,255,.6);
  overflow: hidden; display: grid; place-items: center;
}
.rotato::before {
  content: ""; position: absolute; top: 2.4%; left: 50%; translate: -50% 0;
  width: 32%; height: 3.6%; border-radius: 99px; background: #000; z-index: 2;
}
.rotato::after {
  content: attr(data-label); position: absolute; left: 0; right: 0; bottom: 6%;
  text-align: center; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(160, 220, 255, .55);
}
.rotato > .shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.08) 50%, transparent 65%);
  background-size: 250% 100%; animation: shine 4s linear infinite;
}
@keyframes shine { from { background-position: 150% 0; } to { background-position: -150% 0; } }
.rotato-mark { width: 52%; border-radius: 26%; box-shadow: 0 20px 70px -10px var(--blue-glow); }
.rotato.has-video { background: none; border: 0; box-shadow: none; border-radius: 0; }
.rotato.has-video::before, .rotato.has-video::after, .rotato.has-video > :not(video) { display: none; }
.rotato video { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 640px;
  overflow: hidden; display: grid; place-items: center;
}
.hero-kanji {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  font-family: var(--f-kanji); font-weight: 800; font-size: min(92vh, 88vw); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(63,184,255,.35);
  pointer-events: none; user-select: none;
}
.hero-vertical {
  position: absolute; right: var(--gutter); top: 36%; translate: 0 -50%; margin: 0;
  writing-mode: vertical-rl; font-family: var(--f-kanji); font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.4rem);
  letter-spacing: .5em; color: var(--blue);
}

.hero-title {
  position: absolute; inset: 0; margin: 0; pointer-events: none; z-index: 1;
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(5.5rem, 21vw, 22rem); line-height: .8; letter-spacing: -.02em;
}
.hero-title-ghost { z-index: 3; color: transparent; -webkit-text-stroke: 1.5px var(--bone); }
.hero-title-ghost .ht-2 { color: transparent; -webkit-text-stroke-color: var(--blue); }
.ht-row { position: absolute; overflow: hidden; padding: .04em .02em 0; }
.ht-1 { top: 18%; left: var(--gutter); }
.ht-2 { bottom: 17%; right: var(--gutter); color: var(--blue); }
.split { display: inline-block; }
.split .ch { display: inline-block; will-change: transform; }

.hero-device { position: relative; z-index: 2; width: clamp(180px, min(21vw, 25vh), 300px); margin-top: -4vh; }
.hero-foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; z-index: 3;
}
.hero-line { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.3rem, 2.2vw, 2rem); line-height: .95; }
.hero-line em { color: var(--blue); }
.scroll-hint { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.scroll-hint span { width: 1px; height: 46px; background: var(--line); position: relative; overflow: hidden; }
.scroll-hint span::after { content: ""; position: absolute; inset: 0; background: var(--blue); animation: drip 2s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(120px, 20vh, 220px) var(--gutter); max-width: 1500px; margin: 0 auto; }
.manifesto-text {
  margin: 0; font-family: var(--f-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.2rem, 5.6vw, 5.6rem); line-height: .98; letter-spacing: -.005em;
}
.manifesto-text strong { color: var(--blue); font-weight: 900; }
.js .scrub .w { opacity: .14; transition: opacity .25s linear; }
.js .scrub .w.lit { opacity: 1; }

/* ---------- Purification ---------- */
.purge { padding: 40px var(--gutter) clamp(120px, 18vh, 200px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 64px; align-items: start; }
.purge-head { position: sticky; top: 120px; }
.purge-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: p; }
.purge-list li {
  counter-increment: p; position: relative; border-bottom: 1px solid var(--line);
  padding: 30px 0 30px 56px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
}
.purge-list li::before { content: "0" counter(p); position: absolute; left: 0; top: 40px; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.pl-word { position: relative; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.4rem, 5.5vw, 5rem); line-height: .9; }
.pl-word::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: .09em; background: var(--red);
  transform: scaleX(var(--strike, 0)); transform-origin: left; transition: transform .8s var(--ease);
}
html:not(.js) .pl-word::after, .purge-list li.struck .pl-word::after { --strike: 1; }
.purge-list li.struck .pl-word { color: rgba(236,230,218,.4); transition: color .6s .2s; }
.pl-why { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.15rem, 1.6vw, 1.5rem); color: var(--bone); max-width: 22ch; }

/* ---------- Vows (paper) ---------- */
[data-section="light"] { background: var(--bone); color: var(--paper-ink); color-scheme: light; }
.vows { padding: clamp(110px, 16vh, 180px) var(--gutter) 60px; border-radius: 40px 40px 0 0; position: relative; z-index: 1; }
.vows-intro { margin-bottom: 80px; }
.vows-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6vw; }
.vows-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; }
.vows-kanji { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.vows-kanji span {
  grid-area: 1 / 1; font-family: var(--f-kanji); font-weight: 800; font-size: min(70vh, 40vw); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(10,108,255,.35); opacity: 0; transform: scale(.9); transition: opacity .7s var(--ease), transform .9s var(--ease);
}
.vows-kanji span.on { opacity: 1; transform: none; }
.vows-phones { position: relative; width: min(300px, 70%); display: grid; }
.vows-phones .rotato { grid-area: 1 / 1; opacity: 0; transform: translateY(40px) rotate(-4deg) scale(.96); transition: opacity .6s var(--ease), transform .9s var(--ease); }
.vows-phones .rotato.on { opacity: 1; transform: none; }
.vows-chapters { padding-block: 10vh 30vh; }
.vow { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.vow h3 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.8rem, 5.6vw, 5.4rem); line-height: .88; margin: 0 0 28px; }
.vow p { font-size: 1.18rem; max-width: 34ch; margin: 0; color: #3b352d; }
.rotato-inline { display: none; }

/* ---------- Tabs (horizontal) ---------- */
.tabs { position: relative; background: var(--ink); }
.tabs-pin { height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.tabs-track { display: flex; gap: 4vw; padding-inline: var(--gutter); will-change: transform; }
.tabs-panel { flex: none; }
.tabs-title { width: min(640px, 80vw); align-self: center; }
.tabs-sub { color: var(--muted); font-size: 1.15rem; max-width: 34ch; margin-top: 28px; }
.tab {
  width: min(560px, 80vw); height: min(78vh, 720px);
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 32px; align-items: end;
  padding: 36px; border: 1px solid var(--line); border-radius: 28px; position: relative;
  background: radial-gradient(100% 70% at 0% 100%, rgba(10,108,255,.18), transparent 60%), var(--ink-2);
}
.tab .rotato { align-self: center; }
.tab-n { position: absolute; top: 28px; right: 32px; font-family: var(--f-display); font-weight: 900; font-size: 5rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(236,230,218,.25); }
.tab h3 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(3rem, 5vw, 4.6rem); line-height: .85; margin: 0 0 14px; color: var(--blue); }
.tab p { margin: 0; color: #b9b5ad; }

/* ---------- Origin ---------- */
.origin { padding: clamp(120px, 20vh, 220px) var(--gutter); text-align: center; border-radius: 40px; margin: 0 clamp(8px, 1.4vw, 20px); }
.origin-quote { margin: 0 auto; max-width: 1200px; }
.origin-quote p { margin: 0; font-family: var(--f-serif); font-size: clamp(2.2rem, 5.4vw, 5.2rem); line-height: 1.02; letter-spacing: -.02em; }
.origin-note { margin: 40px auto 0; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: #6f675a; max-width: 50ch; }

/* ---------- Offering ---------- */
.offering { padding: clamp(120px, 18vh, 200px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4vw; align-items: center; }
.offering-big {
  font-family: var(--f-display); font-weight: 900; font-size: clamp(14rem, 38vw, 40rem); line-height: .75; letter-spacing: -.04em;
  color: var(--blue); text-shadow: 0 0 120px rgba(63,184,255,.35);
}
.offering-big span { color: transparent; -webkit-text-stroke: 2px var(--bone); font-size: .5em; vertical-align: top; }
.offering-list { list-style: none; padding: 0; margin: 48px 0; border-top: 1px solid var(--line); }
.offering-list li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.offering-list span { color: var(--muted); }
.offering-list b { font-weight: 600; color: var(--blue); }
.offering-list b.x { color: var(--red); }
.offering-list .price-row b { color: var(--bone); }

/* ---------- Temple ---------- */
.temple { position: relative; padding: clamp(120px, 18vh, 200px) var(--gutter); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4vw; }
.temple-kanji { font-family: var(--f-kanji); font-weight: 800; font-size: clamp(14rem, 34vw, 34rem); line-height: 1; color: var(--red); text-align: center; opacity: .9; }
.temple-copy p:last-child { color: #b9b5ad; font-size: 1.18rem; max-width: 40ch; margin: 32px 0 0; }

/* ---------- Finale ---------- */
.finale { position: relative; padding: clamp(120px, 20vh, 220px) var(--gutter) clamp(100px, 16vh, 180px); text-align: center; overflow: hidden; }
.finale::before {
  content: ""; position: absolute; left: 50%; top: 40%; width: min(1100px, 140vw); aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  background: radial-gradient(circle, rgba(10,108,255,.4), rgba(63,184,255,.08) 40%, transparent 65%); filter: blur(20px);
}
.finale-icon { margin: 0 auto 32px; border-radius: 34px; box-shadow: 0 30px 100px -10px var(--blue-glow); }
.finale-title { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(6rem, 24vw, 26rem); line-height: .8; letter-spacing: -.03em; overflow: hidden; padding-top: .04em; }
.finale-sub { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2.2rem); margin: 28px auto 48px; max-width: 30ch; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-marquee { overflow: hidden; white-space: nowrap; padding-block: 28px; border-bottom: 1px solid var(--line); }
.fm-track { display: inline-flex; animation: marquee 30s linear infinite; }
.fm-track span { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(3rem, 9vw, 8rem); line-height: .9; padding-right: 4vw; color: transparent; -webkit-text-stroke: 1px rgba(236,230,218,.4); }
.fm-track i { font-style: normal; font-family: var(--f-kanji); color: var(--blue); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 24px var(--gutter) 32px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.footer-row p { margin: 0; }
.to-top:hover { color: var(--blue); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .fm-track, .rotato > .shine, .scroll-hint span::after { animation: none; }
  .js .scrub .w { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-vertical { font-size: .9rem; }
  .ht-1 { top: 17%; }
  .hero-vertical { top: 50%; }
  .ht-2 { bottom: 24%; }
  .hero-device { width: min(46vw, 230px); }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 18px; }
  .scroll-hint { display: none; }

  .purge { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .purge-head { position: static; }
  .purge-list li { padding-left: 40px; }

  .vows-body { grid-template-columns: minmax(0, 1fr); }
  .vows-stage { display: none; }
  .vows-chapters { padding-block: 0; }
  .vow { min-height: 0; padding-block: 48px; }
  .rotato-inline { display: grid; width: min(260px, 70vw); margin: 40px auto 0; }

  .tabs-pin { height: auto; overflow: visible; display: block; padding-block: 100px 40px; }
  .tabs-track { flex-direction: column; gap: 28px; transform: none !important; }
  .tabs-title { width: auto; margin-bottom: 20px; }
  .tab { width: auto; height: auto; grid-template-columns: minmax(0, 1fr); padding: 28px 24px; }
  .tab .rotato { width: min(240px, 66vw); margin: 0 auto; }

  .offering, .temple { grid-template-columns: minmax(0, 1fr); }
  .offering-big { text-align: center; }
  .temple-kanji { order: -1; font-size: 12rem; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .nav-mark span { font-size: 1.1rem; }
  .nav-cta { padding: 10px 14px; letter-spacing: .1em; }
  }
