/* Shinobi Fates — brand landing (built from the plotjutsu.com template by sites/build_channel_sites.py). Palette from the channel banner: night indigo, shadow-chakra violet,
   the amber light of the story scroll. Fonts: Inter, EB Garamond (both SIL OFL, files in /fonts). */
/* The hyphen of this Inter build is almost twice too wide ("what - if"), so the hyphen comes from the system font. */
@font-face { font-family: "Inter"; src: url("/fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-002C, U+002E-FFFF; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }

:root {
  --night: #150a0c;
  --dusk: #241214;
  --rule: #3d1c20;
  --ink: #f6ece6;
  --muted: #c4a49c;
  --violet: #d42a35;
  --amber: #f5b942;
  --amber-deep: #d98a1e;
  --parchment: #f1e4c6;
  --sepia: #35250f;
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--amber); color: #1e1204; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 12px; }

/* ---------- Top bar ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px 28px; background: linear-gradient(180deg, rgba(7,3,4,.75), rgba(7,3,4,0));
}
.topbar { transition: background-color .3s ease, box-shadow .3s ease; }
.topbar.solid { background: #120709; box-shadow: 0 1px 0 var(--rule); }
.topbar-mark img { width: 132px; height: auto; }
.topbar-links { display: flex; gap: 26px; }
.topbar-links a {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: #f3e6e0;
}
.topbar-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amber);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s ease;
}
.topbar-links a:hover { color: var(--amber); }
.topbar-links a.active { color: var(--amber); }
.topbar-links a.active::after { transform: scaleX(1); }
.nav-new {
  font-size: 10px; letter-spacing: .06em; line-height: 1; padding: 3px 5px 2px; border-radius: 3px;
  background: var(--amber); color: #1e1204; font-weight: 800;
}
@media (prefers-reduced-motion: no-preference) {
  .nav-new { animation: newpulse 2.4s ease-in-out infinite; }
  @keyframes newpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,185,66,.55); } 50% { box-shadow: 0 0 0 5px rgba(245,185,66,0); } }
}
section[id] { scroll-margin-top: 76px; }
@media (max-width: 1150px) { .topbar-links { gap: 18px; } .topbar-links a { font-size: 12px; letter-spacing: .05em; } }
@media (max-width: 980px) { .topbar-links a[data-spy="numbers"] { display: none; } }
.topbar-cta {
  justify-self: end; background: var(--amber); color: #1e1204; text-decoration: none; font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase; padding: 11px 20px 11px 22px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.topbar-cta:hover { background: #ffcf6a; }

/* ---------- Stage: a round hall of our own story screens, the mascot in the middle ----------
   Smooth scrolling: only transform and opacity change while scrolling (GPU), app.js eases the
   scroll position. Blur and violet tint are baked into the loop videos — no CSS filters on them. */
.stage { position: relative; height: 170vh; background: #070304; }
.scene { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.room {
  position: absolute; inset: 0; perspective: 52vw; perspective-origin: 50% 42%;
  --W: 50vw; --H: 30vw; --R: 68.7vw;
}
.ring, .sway { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.ring { left: 50%; top: 46%; will-change: transform; }
.sway { left: 0; top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .sway { animation: sway 26s ease-in-out infinite; }
  @keyframes sway { 0%, 100% { transform: rotateY(-5deg); } 50% { transform: rotateY(5deg); } }
}
.panel {
  position: absolute; width: var(--W); height: var(--H); left: calc(var(--W) / -2); top: calc(var(--H) / -2);
  transform: rotateY(calc(var(--i) * 40deg)) translateZ(calc(var(--R) * -1));
  backface-visibility: hidden; overflow: hidden; background: #2a0f14;
  box-shadow: 0 0 0 1.2vw #070304;
}
.panel:nth-child(1) { --i: -2; } .panel:nth-child(2) { --i: -1; } .panel:nth-child(3) { --i: 0; } .panel:nth-child(4) { --i: 1; } .panel:nth-child(5) { --i: 2; }
.panel video { width: 100%; height: 100%; object-fit: cover; display: block; }
.panel::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(rgba(7,3,4,.55) 1px, transparent 1.6px) 0 0 / 4px 4px,
    linear-gradient(180deg, rgba(7,3,4,.45), rgba(7,3,4,.15) 45%, rgba(7,3,4,.5));
}
.floor {
  position: absolute; width: calc(var(--R) * 2.6); height: calc(var(--R) * 2.6);
  left: calc(var(--R) * -1.3); top: calc(var(--R) * -1.3);
  transform: translateY(calc(var(--H) / 2)) rotateX(90deg);
  background: radial-gradient(circle at 50% 50%, rgba(212,42,53,.28) 0%, rgba(80,14,22,.55) 22%, rgba(12,4,6,.92) 48%);
}
.pedestal {
  position: absolute; width: 30vw; height: 30vw; left: -15vw; top: -15vw;
  transform: translateY(calc(var(--H) / 2 - 2px)) rotateX(90deg);
  border-radius: 50%;
  background: radial-gradient(circle, #0d0506 52%, #2a1014 60%, #0d0506 63%, transparent 64%);
  box-shadow: 0 0 0 .5vw rgba(245,185,66,.85), 0 0 4vw 1vw rgba(245,185,66,.45), inset 0 0 3vw rgba(212,42,53,.5);
}
.mascot-wrap {
  /* feet stay on the pedestal (its place depends on width); the head never rises above the menu:
     top = 46vh + 17.4vw - height >= 96px  ->  height <= 46vh + 17.4vw - 96px */
  position: absolute; left: 50%; bottom: calc(54% - 17.4vw); width: 0; height: min(74vh, 44vw, calc(46vh + 17.4vw - 96px));
  transform-origin: 0 100%; will-change: transform, opacity;
}
.mascot {
  position: absolute; left: 0; bottom: 0; height: 100%; width: auto; max-width: none;
  transform: translateX(-50%); filter: drop-shadow(0 0 2.2vw rgba(212,42,53,.55));
}
.scene-fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,3,4,.55) 0%, rgba(7,3,4,0) 18%, rgba(7,3,4,0) 78%, #070304 100%);
}
.scene-dim { position: absolute; inset: 0; pointer-events: none; background: #070304; opacity: 0; will-change: opacity; }

/* ---------- Statement ---------- */
.statement {
  position: relative; background: #070304 url("/img/lines.webp") center / 1100px auto repeat;
  padding: 120px 0 130px; text-align: center; margin-top: -1px;
}
.statement::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(7,3,4,.35), #070304 75%); }
.statement::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(180deg, rgba(21,10,12,0), var(--night)); }
.statement-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.statement-mark { width: 190px; height: auto; margin-bottom: 22px; }
.statement-title { margin: 0; display: flex; flex-direction: column; align-items: center; }
.st-line {
  font-family: var(--sans); font-weight: 900; text-transform: uppercase; color: #fbf3ee;
  font-size: clamp(52px, 9.4vw, 150px); line-height: .9; letter-spacing: -.035em;
}
.st-brush { width: min(88vw, 900px); height: auto; margin-top: .4vw; filter: drop-shadow(0 0 30px rgba(212,42,53,.38)); }
.statement-sub { color: #e0c9c0; font-size: 18px; max-width: 32em; margin: 34px 0 28px; }
.statement-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-latest { margin: 22px 0 0; font-size: 15px; color: var(--muted); }
.hero-latest a { color: var(--ink); text-decoration-color: rgba(245,185,66,.6); text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .stage { height: 100vh; }
}
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 4px;
  font-weight: 600; font-size: 16px; text-decoration: none; line-height: 1.2;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-amber { background: var(--amber); color: #1e1204; }
.btn-amber:hover { background: #ffcf6a; }
.btn-ghost { border: 1px solid rgba(246,236,230,.42); color: var(--ink); background: rgba(21,10,12,.35); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(21,10,12,.6); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-title { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; margin: 0 0 10px; }
.section-sub { color: var(--muted); margin: 0 0 40px; max-width: 34em; }

/* Newest story */
.newest { padding-top: 40px; }
.newest .section-title { margin-bottom: 28px; }
.newest { padding-bottom: 24px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.feature-media { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--dusk); }
.feature-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.feature-title { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
.feature-meta { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.feature-desc { color: #e4d0c8; margin: 0 0 24px; }
.text-link { color: var(--amber); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.loading { color: var(--muted); }
.skeleton { background: linear-gradient(100deg, var(--dusk) 40%, #3a171c 50%, var(--dusk) 60%) 0 0 / 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.4s linear infinite; } @keyframes shimmer { to { background-position: -200% 0; } } }

/* Video poster button (loads the YouTube player only on click) */
.lite-yt { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.lite-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s ease; }
.lite-yt:hover img { opacity: 1; }
.play {
  position: absolute; left: 50%; top: 50%; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%;
  background: rgba(21,10,12,.72); border: 2px solid var(--amber); box-shadow: 0 0 28px rgba(245,185,66,.45);
}
.play::after { content: ""; position: absolute; left: 31px; top: 24px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent var(--amber); }

/* Every story: the branching path */
.path-list { list-style: none; margin: 0; padding: 0 0 0 64px; position: relative; }
.path-list::before {
  content: ""; position: absolute; left: 20px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--amber) 0%, rgba(245,185,66,.55) 70%, rgba(245,185,66,0) 100%);
  box-shadow: 0 0 14px rgba(245,185,66,.55);
}
.path-item { position: relative; margin: 0 0 34px; }
.path-item::before {
  content: ""; position: absolute; left: -51px; top: calc(min(150px, 28vw) * .5 - 7px); width: 14px; height: 14px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 5px var(--night), 0 0 22px rgba(245,185,66,.9);
}
.path-item::after {
  content: ""; position: absolute; left: -37px; top: calc(min(150px, 28vw) * .5 - 1px); width: 29px; height: 2px;
  background: linear-gradient(90deg, var(--amber), rgba(245,185,66,.2));
}
.path-link { display: grid; grid-template-columns: min(267px, 50vw) minmax(0, 1fr); gap: 26px; align-items: center; text-decoration: none; }
.path-thumb { aspect-ratio: 16 / 9; height: min(150px, 28vw); border-radius: 5px; overflow: hidden; background: var(--dusk); outline: 1px solid var(--rule); }
.path-thumb img { width: 100%; height: 100%; object-fit: cover; }
.path-title { font-family: var(--serif); font-weight: 600; font-size: clamp(20px, 2vw, 25px); line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
.path-meta { color: var(--muted); font-size: 14.5px; margin: 0; }
.path-link:hover .path-title { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 4px; }
.path-link:hover .path-thumb { outline-color: var(--violet); }
.path-more { margin: 8px 0 0 64px; }
.path-more a { color: var(--amber); font-weight: 600; text-decoration: none; }
.path-more a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Numbers on a parchment scroll */
.scroll-band { padding: 40px 0; }
.scroll-inner {
  position: relative; color: var(--sepia); border-radius: 3px; padding: 44px 64px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  background:
    radial-gradient(120% 140% at 50% 50%, rgba(255,255,255,.0) 55%, rgba(120,80,30,.22) 100%),
    var(--parchment);
}
.scroll-inner::before, .scroll-inner::after {
  content: ""; position: absolute; top: -12px; bottom: -12px; width: 26px; border-radius: 13px;
  background: linear-gradient(90deg, #7a4a14, var(--amber-deep) 40%, #ffcf7f 55%, #a86218);
  box-shadow: 0 0 24px rgba(245,185,66,.35);
}
.scroll-inner::before { left: -13px; } .scroll-inner::after { right: -13px; }
.seal-fact { display: flex; flex-direction: column; gap: 4px; }
.fact-num { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 4.4vw, 58px); line-height: 1; }
.fact-label { font-size: 15px; line-height: 1.4; color: #5a4424; max-width: 18em; }

/* Max */
.max-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.max-video { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--dusk); }
.max-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.max-text p { margin: 0 0 14px; color: #e4d0c8; max-width: 32em; }
.max-actions { margin-top: 24px; }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
.foot-inner { display: grid; grid-template-columns: auto 1fr; gap: 12px 32px; align-items: center; }
.foot-mark img { width: 180px; height: auto; }
.foot-links { display: flex; gap: 22px; justify-self: end; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { color: var(--amber); }
.foot-note { grid-column: 1 / -1; margin: 6px 0 0; max-width: 60em; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 860px) {
  .feature, .max-grid { grid-template-columns: 1fr; gap: 24px; }
  .scroll-inner { grid-template-columns: 1fr; padding: 36px 40px; gap: 26px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar { padding: 12px 16px; grid-template-columns: 1fr auto; }
  .topbar-links { display: none; }
  .topbar-mark img { width: 112px; }
  .room { perspective: 100vw; perspective-origin: 50% 38%; --W: 86vw; --H: 104vw; --R: 118vw; }
  .ring { top: 42%; }
  .pedestal { width: 64vw; height: 64vw; left: -32vw; top: -32vw; }
  .mascot-wrap { height: min(50svh, 112vw); bottom: calc(58% - 52vw); }
  .st-line { font-size: 11.6vw; }
  .statement { padding: 90px 0 100px; }
  .statement-sub { font-size: 16px; }
  .statement-actions .btn { flex: 1 1 100%; justify-content: center; }
  section { padding: 64px 0; }
  .path-list { padding-left: 36px; }
  .path-list::before { left: 8px; }
  .path-item::before { left: -35px; top: 8px; }
  .path-item::after { display: none; }
  .path-link { grid-template-columns: 1fr; gap: 12px; }
  .path-thumb { height: auto; width: 100%; }
  .path-more { margin-left: 36px; }
  .foot-inner { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; }
}

/* ---------- Join (closing call to action; these sites have no host intro video) ---------- */
.join { text-align: center; padding: 84px 0 96px; }
.join-inner { display: flex; flex-direction: column; align-items: center; }
.join-avatar { width: 112px; height: 112px; border-radius: 50%; margin-bottom: 22px; box-shadow: 0 0 0 3px var(--amber), 0 0 34px rgba(245,185,66,.45); }
.join p { color: #e4d0c8; max-width: 30em; margin: 0 0 26px; }
.join .statement-actions { justify-content: center; }
