/* =========================================================
   TTVR - hybrid dark/light theme
   - Hero: dark (VR atmosphere)
   - Sections: light, airy, readable
   ========================================================= */

:root {
  /* dark zone (hero / accents) */
  --dark-bg: #0e0a24;
  --dark-bg-2: #1a1342;
  --dark-ink: #fbfaff;
  --dark-muted: rgba(251, 250, 255, 0.74);
  --dark-line: rgba(255, 255, 255, 0.14);

  /* light zone (body) */
  --bg: #f7f5fb;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --ink: #1a1535;
  --ink-soft: #3a3458;
  --muted: #6a6588;
  --line: rgba(26, 21, 53, 0.1);
  --line-strong: rgba(26, 21, 53, 0.18);

  /* accents (shared) */
  --primary: #5b6bff;        /* electric blue */
  --primary-deep: #3d4ce0;
  --pink: #ff5a8a;           /* coral pink */
  --pink-deep: #e54173;
  --gold: #ffc845;
  --mint: #2dd4bf;

  /* effects */
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 28px rgba(26, 21, 53, 0.08);
  --shadow-card-hover: 0 14px 40px rgba(26, 21, 53, 0.14);
  --shadow-dark: 0 24px 70px rgba(0, 0, 0, 0.4);

  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- header (light, sticky) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.1rem; color: var(--ink);
}
.brand-logo {
  width: clamp(112px, 16vw, 156px);
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(14, 10, 36, 0.18));
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  object-fit: cover; border: 1px solid var(--line);
}
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; font-size: 0.9rem; font-weight: 600; }
.site-header nav a {
  padding: 8px 12px; border-radius: var(--radius-pill);
  color: var(--ink-soft);
  transition: background-color .18s ease, color .18s ease;
}
.site-header nav a:hover { background: var(--bg); color: var(--primary); }

/* ---------- hero (dark) ---------- */
.hero {
  position: relative;
  min-height: 78svh;
  padding: clamp(72px, 12vw, 140px) 20px clamp(80px, 14vw, 160px);
  display: grid; align-content: center;
  overflow: hidden;
  background: var(--dark-bg);
  color: var(--dark-ink);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(91, 107, 255, 0.45), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 90, 138, 0.32), transparent 50%),
    linear-gradient(160deg, var(--dark-bg-2) 0%, var(--dark-bg) 60%, #060418 100%);
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("../img/ttvr-stage-hero.png");
  background-position: center;
  background-size: cover;
  opacity: 0.22;
  mix-blend-mode: screen;
}
.hero h1 {
  max-width: 18ch;
  margin: 18px 0 22px;
  font-size: clamp(2.2rem, 6.5vw, 4.4rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero-logo {
  width: clamp(190px, 28vw, 320px);
  margin: 0 0 18px;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.42));
}
.hero h1 .hl {
  background: linear-gradient(120deg, var(--gold) 0%, var(--pink) 70%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero > p:not(.label) {
  max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--dark-muted);
  line-height: 1.9;
  margin: 0 0 28px;
}
.hero .label { color: var(--gold); }
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 8px;
}

/* stage decoration (subtle & dynamic) */
.stage {
  position: absolute; right: -4%; bottom: 0;
  display: flex; align-items: end; gap: 8px;
  width: min(640px, 68vw); height: 180px;
  opacity: 0.32;
  z-index: -1;
}
.stage span {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(91, 107, 255, 0.5), rgba(255, 90, 138, 0.2));
  backdrop-filter: blur(6px);
  transform-origin: bottom;
  will-change: transform;
}
@keyframes fluctuate {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.35); }
}
.stage span:nth-child(1) { height: 48%; animation: fluctuate 3.2s ease-in-out infinite; }
.stage span:nth-child(2) { height: 70%; animation: fluctuate 4.2s ease-in-out infinite 0.3s; }
.stage span:nth-child(3) { height: 48%; animation: fluctuate 2.8s ease-in-out infinite 0.7s; }
.stage span:nth-child(4) {
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 200, 69, 0.55), rgba(255, 90, 138, 0.18));
  animation: fluctuate 3.8s ease-in-out infinite 0.1s;
}
.stage span:nth-child(5) { height: 70%; animation: fluctuate 4.6s ease-in-out infinite 0.5s; }
.stage span:nth-child(6) { height: 48%; animation: fluctuate 3.0s ease-in-out infinite 0.9s; }
.stage span:nth-child(7) { height: 70%; animation: fluctuate 3.5s ease-in-out infinite 0.2s; }

/* ---------- common section ---------- */
.section, .form-section { padding: clamp(64px, 9vw, 104px) 20px; }
.section { background: var(--bg); }
.section.alt { background: var(--bg-soft); }
.section.dark {
  background: linear-gradient(180deg, var(--dark-bg-2), var(--dark-bg));
  color: var(--dark-ink);
}
.section.dark p { color: var(--dark-muted); }
.section.dark .label { color: var(--gold); }

/* ---------- typography ---------- */
.label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(91, 107, 255, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section.dark .label { background: rgba(255, 200, 69, 0.16); }

h1, h2, h3 { margin-top: 0; color: inherit; }
h2 {
  max-width: 22ch;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  font-weight: 800;
}
h3 { font-size: 1.05rem; font-weight: 700; }

p { margin: 0 0 16px; line-height: 1.85; color: var(--ink-soft); }
.section p { max-width: 64ch; }

/* ---------- info-grid ---------- */
.info-grid {
  display: grid; gap: 16px;
  margin-top: 36px;
}
.info-grid article {
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.info-grid article:hover {
  transform: translateY(-5px);
  border-color: rgba(91, 107, 255, 0.3);
  box-shadow: 0 14px 40px rgba(91, 107, 255, 0.12);
}
.info-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.info-grid span { display: block; color: var(--ink); font-weight: 600; line-height: 1.7; }

/* ---------- steps (dark on dark) ---------- */
.steps {
  display: grid; gap: 14px;
  padding: 0; margin: 36px 0 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 26px 22px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  counter-increment: step;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.steps li:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 200, 69, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 16px; right: 18px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.steps strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  color: var(--dark-ink);
  font-weight: 700;
}
.steps span { display: block; color: var(--dark-muted); font-size: 0.95rem; line-height: 1.75; }

/* ---------- buttons ---------- */
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.96rem;
  text-align: center;
  box-shadow: 0 10px 26px rgba(91, 107, 255, 0.32);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  cursor: pointer;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(91, 107, 255, 0.4);
  filter: saturate(1.08);
}
.button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
}
.button.secondary:hover { color: var(--primary); border-color: var(--primary); }

.button.ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--dark-ink);
  border: 1px solid var(--dark-line);
  box-shadow: none;
}
.button.ghost-dark:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--gold);
  border-color: var(--gold);
}

/* ---------- link-panel ---------- */
.link-panel {
  display: grid; gap: 12px;
  margin-top: 26px;
}
.link-panel a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease, border-color 0.25s ease;
}
.link-panel a::after {
  content: "→";
  color: var(--primary);
  font-weight: 800;
  transition: transform .18s ease;
}
.link-panel a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  color: var(--primary);
  border-color: var(--primary);
}
.link-panel a:hover::after { transform: translateX(4px); }

/* ---------- archive search card ---------- */
.archive-search-card {
  max-width: 920px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.archive-search-card h3 {
  margin-bottom: 8px;
  color: var(--ink);
}
.archive-search-card p {
  margin-bottom: 16px;
  color: var(--ink-soft);
}
.archive-search-form {
  display: grid;
  gap: 10px;
}
.archive-search-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

/* ---------- entry-note (callout) ---------- */
.entry-note {
  margin-top: 28px;
  max-width: 980px;
  padding: 26px 28px;
  border: 1px solid rgba(255, 200, 69, 0.42);
  background: rgba(255, 200, 69, 0.1);
  border-radius: var(--radius-md);
}
.entry-note h3 {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  color: var(--dark-ink);
}
.entry-note h3::before {
  content: "!"; display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: var(--dark-bg);
  font-weight: 900; font-size: 0.85rem;
}
.entry-note p { margin: 0; color: var(--dark-muted); }
.entry-note ul { margin: 12px 0 0; padding: 0 0 0 0; list-style: none; color: var(--dark-muted); }
.entry-note ul li { position: relative; padding: 4px 0 4px 22px; line-height: 1.7; }
.entry-note ul li::before {
  content: ""; position: absolute; left: 4px; top: 14px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}

/* ---------- video embeds ---------- */
.video-embed, .feature-video {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin-top: 32px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow-dark);
  overflow: hidden;
}
.video-embed iframe, .feature-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.embed-note {
  max-width: 700px;
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- guide (light reskin) ---------- */
.guide-hero { min-height: 56svh; }
.guide-panel {
  max-width: 980px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-top: 36px;
}
.guide-panel p:last-child { margin-bottom: 0; }

.guide-list {
  display: grid; gap: 14px;
  padding: 0; margin: 36px 0 0;
  list-style: none;
  counter-reset: guidestep;
}
.guide-list li {
  position: relative;
  padding: 26px 22px 22px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  counter-increment: guidestep;
}
.guide-list li::before {
  content: counter(guidestep);
  position: absolute;
  top: 22px; left: 22px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}
.guide-list strong { display: block; margin-bottom: 6px; font-size: 1rem; color: var(--ink); }
.guide-list span { display: block; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.85; }

.guide-grid {
  display: grid; gap: 16px;
  margin-top: 36px;
}
.guide-grid article {
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.guide-grid h3 { color: var(--primary); margin-bottom: 10px; }
.guide-grid p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.85; }
.guide-grid.dark article { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--dark-line); }
.guide-grid.dark h3 { color: var(--gold); }
.guide-grid.dark p { color: var(--dark-muted); }

.mini-video {
  position: relative; width: 100%; max-width: 640px;
  aspect-ratio: 16/9;
  margin-top: 24px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.mini-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mini-video-link { margin-top: 14px; }
.mini-video-link a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-weight: 700;
}
.mini-video-link a:hover { color: var(--pink); }

/* ---------- form ---------- */
.form-section { background: var(--bg-soft); }
.google-form {
  width: 100%;
  min-height: 600px;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* ---------- footer (dark base) ---------- */
.site-footer {
  padding: 60px 20px 28px;
  background: var(--dark-bg);
  color: var(--dark-muted);
  border-top: 1px solid var(--dark-line);
}
.footer-grid {
  display: grid; gap: 36px;
  max-width: 1200px; margin: 0 auto;
}
.footer-col h4 {
  margin: 0 0 16px;
  font-size: 0.74rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-logo {
  width: 150px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.38));
}
.footer-icon {
  width: 46px; height: 46px;
  border-radius: 12px; object-fit: cover;
  border: 1px solid var(--dark-line);
}
.footer-brand strong { display: block; color: var(--dark-ink); font-size: 1.02rem; font-weight: 800; }
.footer-brand small { display: block; color: var(--dark-muted); font-size: 0.8rem; margin-top: 2px; }
.footer-copy { margin: 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a {
  display: inline-block;
  color: var(--dark-muted);
  font-size: 0.92rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.footer-links a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px;
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--dark-line);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer-bottom a { color: var(--dark-muted); transition: color .15s ease; }
.footer-bottom a:hover { color: var(--gold); }
.footer-bottom-links { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (min-width: 760px) {
  .site-header, .hero, .section, .form-section, .site-footer {
    padding-left: clamp(48px, 7vw, 96px);
    padding-right: clamp(48px, 7vw, 96px);
  }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .link-panel { grid-template-columns: repeat(2, 1fr); }
  .archive-search-form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 56px; }
}
@media (min-width: 1080px) {
  .info-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .link-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 759px) {
  .site-header { align-items: flex-start; }
  .brand-logo { width: 118px; height: 30px; }
  .site-header nav { font-size: 0.84rem; }
  .site-header nav a { padding: 6px 10px; }
  .button { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto; }
}

/* ---------- Scroll-triggered Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-100 { transition-delay: 100ms; }
.reveal-delay-200 { transition-delay: 200ms; }
.reveal-delay-300 { transition-delay: 300ms; }
.reveal-delay-400 { transition-delay: 400ms; }
