:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --bg-soft: #12121a;
  --bg-panel: rgba(18, 18, 26, 0.95);
  --bg-card: rgba(20, 20, 32, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8e6ed;
  --text-dim: rgba(232, 230, 237, 0.7);
  --muted: #8a8694;
  --accent: #c41e3a;
  --accent-glow: rgba(196, 30, 58, 0.4);
  --accent-2: #4a6fa5;
  --accent-3: #7b5ea7;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  --shadow-red: 0 0 80px rgba(196, 30, 58, 0.15);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.9; }
  97% { opacity: 1; }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(196, 30, 58, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(74, 111, 165, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #08080a 0%, var(--bg) 30%, #0d0d12 100%);
}

/* Noise overlay */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

/* Scanline effect */
.page::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.1), transparent);
  animation: scanline 8s linear infinite;
  pointer-events: none;
  z-index: 1001;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  padding: 36px clamp(20px, 4vw, 60px) 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(196, 30, 58, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(123, 94, 167, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.logo {
  font-family: "Shippori Mincho B1", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  text-shadow: 0 0 20px var(--accent-glow);
  animation: flicker 4s infinite;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links a {
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 100px);
  flex: 1;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy h1 {
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  margin: 20px 0 24px;
  background: linear-gradient(135deg, var(--text) 0%, rgba(232, 230, 237, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.hero-copy h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-top: 20px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: "Shippori Mincho B1", serif;
  letter-spacing: 0.3em;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(196, 30, 58, 0.1);
  box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px rgba(196, 30, 58, 0.05);
}

.lead {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  line-height: 2;
  max-width: 500px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 32px 0 16px;
}

.store {
  background: var(--bg-card);
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.store::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(196, 30, 58, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.store:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow), 0 0 30px var(--accent-glow);
}

.store:hover::before {
  opacity: 1;
}

.store img {
  position: relative;
  z-index: 1;
}

.lang {
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.note {
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(196, 30, 58, 0.08);
  border-left: 2px solid var(--accent);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}

/* Hero Art */
.hero-art {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.hero-art img {
  border-radius: 8px;
  box-shadow: var(--shadow), var(--shadow-red);
  border: 1px solid rgba(196, 30, 58, 0.2);
}

.glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(60px);
  opacity: 0.5;
  z-index: -1;
  animation: pulse-glow 4s ease-in-out infinite;
}

/* Section Styles */
.section {
  padding: 100px clamp(20px, 5vw, 80px);
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.section-title {
  max-width: 700px;
  margin-bottom: 48px;
}

.section-title h2 {
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 0.06em;
  position: relative;
  display: inline-block;
}

.section-title h2::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.section-title p {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.05em;
}

/* Screens Section */
.screens {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(196, 30, 58, 0.03) 30%,
    rgba(74, 111, 165, 0.03) 70%,
    transparent 100%
  );
}

.screen-frame {
  padding: 20px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.screen-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.05), transparent);
  pointer-events: none;
}

.screen-frame img {
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* Story Section */
.story {
  background: radial-gradient(ellipse at center, rgba(123, 94, 167, 0.05) 0%, transparent 60%);
}

.story-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.story-grid article,
.about-grid article {
  padding: 28px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  line-height: 1.9;
  color: var(--muted);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.story-grid article::before,
.about-grid article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.story-grid article:hover,
.about-grid article:hover {
  border-color: rgba(196, 30, 58, 0.3);
  box-shadow: var(--shadow), 0 0 40px var(--accent-glow);
}

.story-grid article:hover::before,
.about-grid article:hover::before {
  transform: scaleX(1);
}

.about-grid h3 {
  color: var(--text);
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-grid h3::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.about-grid p {
  margin: 0;
}

/* Trailer Section */
.trailer {
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 12, 0.8) 100%);
}

.trailer .video-frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), var(--shadow-red);
  background: var(--bg-card);
}

.trailer .video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(196, 30, 58, 0.2);
  border-radius: 12px;
  pointer-events: none;
  z-index: 10;
}

.trailer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact/Footer */
.contact {
  background: linear-gradient(180deg,
    var(--bg) 0%,
    rgba(18, 18, 26, 0.95) 50%,
    rgba(10, 10, 12, 1) 100%
  );
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: space-between;
  align-items: flex-start;
}

.contact-grid h2 {
  font-family: "Shippori Mincho B1", serif;
  letter-spacing: 0.15em;
  margin: 0 0 16px;
  font-size: 28px;
}

.contact-grid > div:first-child p {
  color: var(--muted);
  margin: 0 0 12px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 20px;
  background: rgba(196, 30, 58, 0.1);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: var(--accent);
  color: var(--text);
  box-shadow: 0 0 30px var(--accent-glow);
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.socials a {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.1em;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.socials a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
  padding-left: 12px;
}

.copyright {
  text-align: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* Reveal Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy h1::after {
    margin: 20px auto 0;
  }

  .lead {
    margin: 0 auto;
  }

  .cta {
    justify-content: center;
  }

  .hero-art {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    gap: 16px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 20px;
    font-size: 11px;
  }

  .cta {
    flex-direction: column;
    align-items: center;
  }

  .store {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .contact-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .socials {
    align-items: center;
  }

  .section-title h2::before {
    display: none;
  }
}
