/* ═══════════════════════════════════════════════════════════════════════════
   ACOPODO — Landing Page
   Aesthetic: Japanese editorial modernism — ink, washi, red seal
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ──────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Core palette */
  --red:        #E10A17;
  --red-dark:   #B80812;
  --red-glow:   #FF3040;
  --ink:        #1A1A1A;
  --ink-light:  #3A3A3A;
  --cream:      #FAF7F2;
  --washi:      #F5F0E8;
  --white:      #FFFFFF;
  --gray-200:   #E8E4DD;
  --gray-400:   #B0A99E;
  --gray-600:   #6B6560;

  /* Typography */
  --font-display: 'Playfair Display', 'Noto Serif JP', serif;
  --font-jp:      'Noto Sans JP', sans-serif;
  --font-jp-display: 'Noto Serif JP', serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --section-pad: clamp(80px, 12vw, 160px);
  --gutter:      clamp(20px, 4vw, 48px);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ── Shared ─────────────────────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.6rem;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 1rem; height: 2px;
  background: var(--red);
  transform: translateY(-50%);
}
.section-label--light { color: var(--white); }
.section-label--light::before { background: var(--white); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-title--light { color: var(--white); }

.text-accent { color: var(--red); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 100px;
  transition: all 0.35s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 24px rgba(225, 10, 23, 0.35);
}
.btn--primary:hover {
  background: var(--red-dark);
  box-shadow: 0 6px 32px rgba(225, 10, 23, 0.5);
  transform: translateY(-2px);
}
.btn--ghost {
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--white);
  transform: translateY(-2px);
}
.btn--large {
  padding: 1.1rem 2.6rem;
  font-size: 1.05rem;
}
.btn__icon { font-size: 0.8em; }

/* ── Section Nav Dots ──────────────────────────────────────────────────── */
.section-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 998;
  opacity: 0;
  transition: opacity 0.4s;
}
.section-nav.visible {
  opacity: 1;
}
.section-nav__dot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  text-decoration: none;
}
.section-nav__dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--gray-400);
  background: transparent;
  transition: all 0.3s var(--ease-out-expo);
  flex-shrink: 0;
}
.section-nav__dot span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray-400);
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.25s var(--ease-out-expo);
  pointer-events: none;
  white-space: nowrap;
}
.section-nav__dot:hover span {
  opacity: 1;
  transform: translateX(0);
}
.section-nav__dot:hover::after {
  border-color: var(--ink);
  background: var(--ink);
}
.section-nav__dot.active::after {
  border-color: var(--red);
  background: var(--red);
  transform: scale(1.25);
}
.section-nav__dot.active span {
  color: var(--red);
}

/* Invert dots on dark sections */
.section-nav.on-dark .section-nav__dot::after {
  border-color: rgba(255, 255, 255, 0.4);
}
.section-nav.on-dark .section-nav__dot span {
  color: rgba(255, 255, 255, 0.5);
}
.section-nav.on-dark .section-nav__dot:hover::after {
  border-color: var(--white);
  background: var(--white);
}
.section-nav.on-dark .section-nav__dot:hover span {
  color: var(--white);
}
.section-nav.on-dark .section-nav__dot.active::after {
  border-color: var(--red);
  background: var(--red);
}
.section-nav.on-dark .section-nav__dot.active span {
  color: var(--red-glow);
}

@media (max-width: 768px) {
  .section-nav { display: none; }
}

/* ── Scroll margin for all anchored sections ───────────────────────────── */
#news, #kanji, #languages, #download {
  scroll-margin-top: 120px;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 var(--gutter);
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
}
.nav__logo-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-jp-display);
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 8px;
}
.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-light);
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--red); }
.nav__cta {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.4rem !important;
  border-radius: 100px;
  font-weight: 700 !important;
  transition: background 0.25s, transform 0.25s !important;
}
.nav__cta:hover {
  background: var(--red-dark) !important;
  transform: translateY(-1px);
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  z-index: 1002;
  position: relative;
}
.nav__burger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 165px var(--gutter) clamp(40px, 6vw, 60px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(225, 10, 23, 0.04), transparent),
    var(--cream);
}

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

.hero__bg-kanji {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1rem;
  font-family: var(--font-jp-display);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.2;
  color: rgba(26, 26, 26, 0.06);
  user-select: none;
  pointer-events: none;
  word-break: break-all;
  letter-spacing: 0.15em;
  -webkit-text-stroke: 0.5px rgba(26, 26, 26, 0.04);
}

/* Ink splash decoration */
.hero__ink-splash {
  position: absolute;
  width: 600px; height: 600px;
  top: 10%; right: -10%;
  background: radial-gradient(circle, rgba(225, 10, 23, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
  animation: pulseGlow 6s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.hero__eyebrow {
  font-family: var(--font-jp-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 900;
  color: var(--red);
  margin-bottom: 1.2rem;
  letter-spacing: 0.18em;
  -webkit-text-stroke: 0.5px var(--red-dark);
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.2s forwards;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.4s forwards;
}
.hero__title-accent {
  color: var(--red);
  position: relative;
}
.hero__title-accent::after {
  content: '';
  position: absolute;
  bottom: 0.05em; left: 0;
  width: 100%; height: 0.08em;
  background: var(--red);
  opacity: 0.25;
  border-radius: 4px;
}
.hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.6s forwards;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.8s forwards;
}
.hero__stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 1s forwards;
}
.hero__stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}
.hero__stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero__stat-sep {
  width: 1px; height: 32px;
  background: var(--gray-200);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 40px;
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 2;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 1.2s forwards;
}
.hero__scroll-hint span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-400);
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); transform-origin: top; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Ticker ─────────────────────────────────────────────────────────────── */
.ticker {
  background: var(--red);
  overflow: hidden;
  padding: 0.6rem 0 0.5rem;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 999;
}
.ticker ruby {
  ruby-align: center;
}
.ticker rt {
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.75);
}
.ticker::before,
.ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(to right, var(--red), transparent); }
.ticker::after  { right: 0; background: linear-gradient(to left, var(--red), transparent); }

.ticker__track {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
}
.ticker__track span {
  font-family: var(--font-jp-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.05em;
  padding-right: 2rem;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── News & Updates ────────────────────────────────────────────────────── */
.news {
  padding: clamp(40px, 6vw, 60px) var(--gutter);
  background: var(--washi);
  position: relative;
}
.news::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.news__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.news__header {
  margin-bottom: 3.5rem;
}
.news__grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card */
.news-card {
  display: flex;
  gap: 1.8rem;
  padding: 1.8rem 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(30px);
}
.news-card.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  border-color: rgba(225, 10, 23, 0.15);
}
.news-card--pinned {
  background: linear-gradient(135deg, var(--white), #FFF8F8);
  border-color: rgba(225, 10, 23, 0.12);
  border-left: 3px solid var(--red);
}

/* Date block */
.news-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  flex-shrink: 0;
}
.news-card__day {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
}
.news-card__month {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-400);
  margin-top: 0.2rem;
}

/* Body */
.news-card__body {
  flex: 1;
  min-width: 0;
}
.news-card__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 0.6rem;
}
.news-card__tag--new {
  color: var(--red);
  background: rgba(225, 10, 23, 0.07);
}
.news-card__tag--update {
  color: #0969DA;
  background: rgba(9, 105, 218, 0.07);
}
.news-card__tag--improvement {
  color: #1A7F37;
  background: rgba(26, 127, 55, 0.07);
}
.news-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.news-card__desc {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.65;
}

@media (max-width: 600px) {
  .news-card {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.4rem;
  }
  .news-card__date {
    flex-direction: row;
    gap: 0.5rem;
    justify-content: flex-start;
  }
  .news-card__day {
    font-size: 1.4rem;
  }
}

/* ── Features ───────────────────────────────────────────────────────────── */
.features {
  padding: clamp(40px, 6vw, 60px) var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
  scroll-margin-top: 120px;
}
.features__header {
  margin-bottom: 3.5rem;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.feature-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 2rem 1.8rem;
  transition: all 0.4s var(--ease-out-expo);
  overflow: hidden;
  /* Reveal animation */
  opacity: 0;
  transform: translateY(40px);
}
.feature-card.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
  border-color: rgba(225, 10, 23, 0.2);
}
.feature-card--hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, var(--white), #FFF8F8);
  border-color: rgba(225, 10, 23, 0.15);
}
.feature-card__glyph {
  font-family: var(--font-jp-display);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  transition: transform 0.4s var(--ease-out-expo);
  -webkit-text-stroke: 1px var(--red-dark);
}
.feature-card:hover .feature-card__glyph {
  transform: scale(1.1) rotate(-3deg);
}
.feature-card--hero .feature-card__glyph {
  font-size: 4.5rem;
}
.feature-card__content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.feature-card__content p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}
.feature-card__tag {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  background: rgba(225, 10, 23, 0.06);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
}
.feature-card--hero .feature-card__tag {
  position: relative;
  top: auto; right: auto;
  align-self: start;
}

/* ── Kanji Showcase ─────────────────────────────────────────────────────── */
.kanji-showcase {
  position: relative;
  padding: clamp(40px, 6vw, 60px) var(--gutter);
  background: var(--ink);
  overflow: hidden;
}
.kanji-showcase__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.kanji-showcase__char {
  position: absolute;
  font-family: var(--font-jp-display);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  user-select: none;
  pointer-events: none;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.02);
}
.kanji-showcase__char--1 { font-size: 25vw; top: -5%; left: 5%; }
.kanji-showcase__char--2 { font-size: 20vw; top: 30%; right: 0; }
.kanji-showcase__char--3 { font-size: 30vw; bottom: -10%; left: 30%; }
.kanji-showcase__char--4 { font-size: 15vw; top: 10%; right: 25%; }
.kanji-showcase__char--5 { font-size: 18vw; bottom: 5%; left: -5%; }

.kanji-showcase__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.kanji-showcase__desc {
  font-size: 1.05rem;
  color: var(--gray-400);
  line-height: 1.7;
  margin: 1.5rem 0 2.5rem;
  max-width: 540px;
}
.kanji-showcase__grades {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.grade-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s var(--ease-out-expo);
  cursor: default;
}
.grade-pill:hover {
  background: rgba(225, 10, 23, 0.15);
  border-color: rgba(225, 10, 23, 0.4);
  transform: translateY(-2px);
}
.grade-pill__num {
  font-family: var(--font-jp-display);
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--red-glow);
}
.grade-pill__count {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

/* ── Battle Demo ────────────────────────────────────────────────────────── */
.battle-demo {
  padding: clamp(40px, 6vw, 60px) var(--gutter);
  background: var(--washi);
  position: relative;
}
/* Washi texture */
.battle-demo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.battle-demo__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.battle-demo__visual {
  display: flex;
  justify-content: center;
}

.battle-card {
  width: 320px;
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow:
    0 1px 0 rgba(225, 10, 23, 0.1),
    0 24px 64px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(225, 10, 23, 0.1);
  position: relative;
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease-out-expo);
}
.battle-card:hover {
  transform: rotate(0deg) translateY(-4px);
}
.battle-card__phase {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--red);
  margin-bottom: 1.5rem;
}
.battle-card__kanji {
  font-family: var(--font-jp-display);
  font-size: 5rem;
  font-weight: 900;
  text-align: center;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.8rem;
  position: relative;
  -webkit-text-stroke: 1px rgba(26, 26, 26, 0.15);
}
.battle-card__prompt {
  font-size: 0.85rem;
  color: var(--gray-600);
  text-align: center;
  margin-bottom: 1.2rem;
}
.battle-card__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.battle-option {
  padding: 0.7rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid transparent;
  transition: all 0.25s;
}
.battle-option:hover {
  border-color: var(--red);
  background: rgba(225, 10, 23, 0.04);
}
.battle-option.correct {
  border-color: #22C55E;
  background: rgba(34, 197, 94, 0.08);
  color: #16A34A;
}
.battle-option.wrong {
  border-color: var(--red);
  background: rgba(225, 10, 23, 0.06);
  color: var(--red);
  animation: shake 0.4s ease-in-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.battle-card__hp {
  text-align: center;
}
.battle-card__hp-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.battle-card__hp-fill {
  height: 100%;
  width: 75%;
  background: linear-gradient(90deg, var(--red), var(--red-glow));
  border-radius: 4px;
  transition: width 0.6s var(--ease-out-expo);
}
.battle-card__hp-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-400);
}

.battle-demo__text p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-top: 1.5rem;
  max-width: 440px;
}
.battle-demo__phases {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem !important;
}
.phase-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.phase-tag--1 { background: #FEE2E2; color: #DC2626; }
.phase-tag--2 { background: #FEF3C7; color: #D97706; }
.phase-tag--3 { background: #DBEAFE; color: #2563EB; }
.phase-tag--4 { background: #D1FAE5; color: #059669; }

/* ── Languages ──────────────────────────────────────────────────────────── */
.languages {
  padding: clamp(40px, 6vw, 60px) var(--gutter);
  scroll-margin-top: 120px;
}
.languages__inner {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.languages__inner .section-label {
  padding-left: 0;
}
.languages__inner .section-label::before { display: none; }
.languages__desc {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 540px;
  margin: 1.5rem auto 3rem;
}
.languages__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}
.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  transition: all 0.3s var(--ease-out-expo);
  cursor: default;
}
.lang-chip:hover {
  border-color: var(--red);
  background: rgba(225, 10, 23, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* ── CTA ────────────────────────────────────────────────────────────────── */
.cta {
  position: relative;
  padding: var(--section-pad) var(--gutter);
  background: var(--red);
  overflow: hidden;
  text-align: center;
}
.cta__bg-chars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  pointer-events: none;
}
.cta__bg-chars span {
  font-family: var(--font-jp-display);
  font-size: clamp(6rem, 15vw, 18rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.08);
  user-select: none;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.03);
}
.cta__inner {
  position: relative;
  z-index: 1;
}
.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.1;
}
.cta__sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2.5rem;
}
.cta__buttons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Store badges */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.4rem 0.55rem 0.9rem;
  background: #000;
  color: #fff;
  border-radius: 10px;
  border: 1.5px solid #A6A6A6;
  transition: all 0.3s var(--ease-out-expo);
  text-decoration: none;
  min-width: 175px;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  background: #1a1a1a;
}
.store-badge__icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.store-badge__icon--play {
  width: 24px;
  height: 24px;
}
.store-badge__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.store-badge__label {
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #fff;
}
.store-badge__store {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: -0.01em;
  color: #fff;
}
.cta .btn--primary {
  background: var(--white);
  color: var(--red);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.cta .btn--primary:hover {
  background: var(--cream);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.cta .btn--ghost {
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}
.cta .btn--ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

/* ── Legal Pages ────────────────────────────────────────────────────────── */
.legal {
  padding: 140px var(--gutter) clamp(60px, 8vw, 100px);
  background: var(--cream);
}
.legal__inner {
  max-width: 720px;
  margin: 0 auto;
}
.legal__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.legal__updated {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 2.5rem;
}
.legal__inner h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2.2rem;
  margin-bottom: 0.6rem;
}
.legal__inner h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-light);
  margin-top: 1.4rem;
  margin-bottom: 0.4rem;
}
.legal__inner p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 0.8rem;
}
.legal__inner ul {
  list-style: none;
  padding-left: 1.2rem;
  margin-bottom: 0.8rem;
}
.legal__inner li {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.75;
  position: relative;
  padding-left: 1rem;
}
.legal__inner li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 0.5em;
  top: 0.55em;
}
.legal__inner a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal__inner a:hover {
  color: var(--red-dark);
}

/* ── Contact Form ──────────────────────────────────────────────────────── */
.contact-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.contact-form__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-light);
  letter-spacing: 0.02em;
}
.contact-form__input {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  -webkit-appearance: none;
}
.contact-form__input::placeholder {
  color: var(--gray-400);
}
.contact-form__input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225, 10, 23, 0.08);
}
.contact-form__textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}
.contact-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.8rem 2rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}
.contact-form__submit:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(225, 10, 23, 0.35);
}
.contact-form__status {
  font-size: 0.85rem;
  color: var(--gray-600);
  opacity: 0;
  transition: opacity 0.3s;
}
.contact-form__status.show {
  opacity: 1;
}
.contact-form__alt {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.contact-form__alt p {
  font-size: 0.88rem;
  color: var(--gray-600);
}
.contact-form__alt a {
  color: var(--red);
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) 2rem;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 240px;
}
.footer__logo-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-jp-display);
  font-weight: 900;
  font-size: 1rem;
  border-radius: 8px;
  margin-bottom: 0.2rem;
}
.footer__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
}
.footer__tagline {
  font-size: 0.85rem;
  color: var(--gray-400);
  line-height: 1.5;
  margin-top: 0.3rem;
}
.footer__columns {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer__col-title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.4rem;
}
.footer__col a {
  font-size: 0.88rem;
  color: var(--gray-400);
  transition: color 0.25s;
}
.footer__col a:hover {
  color: var(--white);
}
.footer__socials {
  display: flex;
  gap: 0.6rem;
}
.footer__socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray-400);
  font-size: 1.1rem;
  transition: all 0.3s var(--ease-out-expo);
}
.footer__socials a:hover {
  background: var(--red);
  color: var(--white);
  transform: translateY(-2px);
}
.footer__contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-400);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  transition: all 0.3s var(--ease-out-expo);
  width: fit-content;
}
.footer__contact-btn:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__copy {
  font-size: 0.78rem;
  color: var(--gray-600);
}
.footer__made {
  font-size: 0.78rem;
  color: var(--gray-600);
}
.footer__heart {
  color: var(--red);
}

@media (max-width: 768px) {
  .footer__top {
    flex-direction: column;
    gap: 2rem;
  }
  .footer__columns {
    flex-wrap: wrap;
    gap: 2rem;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav__inner { height: 64px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  /* Mobile menu — positioned below ticker */
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(24px);
    padding: 100px var(--gutter) 2rem;
    z-index: 1001;
    gap: 1.6rem;
    align-items: center;
    justify-content: flex-start;
    animation: fadeSlideUp 0.3s var(--ease-out-expo);
  }
  .nav__links.open a {
    font-size: 1.2rem;
    font-weight: 600;
  }
  .nav__links.open .nav__cta {
    font-size: 1rem !important;
    padding: 0.7rem 2rem !important;
  }

  /* Ticker */
  .ticker { top: 64px; padding: 0.5rem 0 0.4rem; }
  .ticker__track span {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
  }
  .ticker rt {
    font-size: 0.65em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
  }

  /* Hero */
  .hero {
    padding-top: 130px;
    min-height: 100svh;
    justify-content: center;
  }
  .hero__content {
    text-align: center;
    margin: 0 auto;
  }
  .hero__eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
  }
  .hero__title {
    font-size: clamp(2.8rem, 12vw, 5rem);
    margin-bottom: 1rem;
  }
  .hero__sub {
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    margin-bottom: 2rem;
    justify-content: center;
  }
  .hero__stats {
    justify-content: center;
  }
  .hero__bg-kanji {
    font-size: clamp(20px, 6vw, 36px);
    gap: 0.2rem;
    opacity: 0.6;
  }
  .hero__ink-splash {
    width: 300px; height: 300px;
    top: 20%; right: -20%;
  }
  .hero__scroll-hint { display: none; }

  /* News */
  .news__header { margin-bottom: 2rem; }

  /* Features */
  .features__header { margin-bottom: 2rem; }
  .features__grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .feature-card {
    padding: 1.5rem 1.3rem;
  }
  .feature-card--hero {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.3rem;
  }
  .feature-card--hero .feature-card__glyph {
    font-size: 2.8rem;
  }
  .feature-card--hero .feature-card__tag {
    position: absolute;
    top: 1.2rem; right: 1.2rem;
  }
  .feature-card__glyph { font-size: 2.2rem; }
  .feature-card__content h3 { font-size: 1.1rem; }
  .feature-card__content p { font-size: 0.85rem; }

  /* Kanji Showcase */
  .kanji-showcase__content {
    text-align: center;
    margin: 0 auto;
  }
  .kanji-showcase__desc {
    font-size: 0.95rem;
    margin-left: auto;
    margin-right: auto;
  }
  .kanji-showcase__grades {
    justify-content: center;
  }
  .grade-pill {
    padding: 0.55rem 0.9rem;
  }

  /* Battle Demo */
  .battle-demo__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .battle-demo__visual { order: -1; }
  .battle-card {
    transform: rotate(0deg);
    width: min(320px, 100%);
  }
  .battle-demo__text p { font-size: 0.92rem; }

  /* Languages */
  .languages__desc {
    font-size: 0.95rem;
    margin: 1rem auto 2rem;
  }
  .lang-chip {
    font-size: 0.8rem;
    padding: 0.5rem 0.9rem;
  }

  /* CTA */
  .cta__sub { font-size: 1rem; }
  .cta__buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  .store-badge {
    min-width: 200px;
    justify-content: center;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
  .footer__brand { max-width: none; align-items: center; }
  .footer__columns { justify-content: center; }
  .footer__col { align-items: center; }
  .footer__socials { justify-content: center; }
  .footer__contact-btn { align-self: center; }
}

@media (max-width: 480px) {
  .hero__title { font-size: clamp(2.2rem, 13vw, 3.5rem); }
  .hero__stats { flex-direction: column; gap: 0.8rem; }
  .hero__stat-sep { width: 32px; height: 1px; }
  .hero__stat-num { font-size: 1.5rem; }

  .section-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  .battle-card {
    width: 100%;
    padding: 1.5rem;
  }
  .battle-card__kanji { font-size: 3.8rem; }

  .news-card__title { font-size: 1.05rem; }

  .cta__title { font-size: clamp(2rem, 8vw, 3rem); }
  .cta__bg-chars span { font-size: clamp(4rem, 20vw, 10rem); }

  .lang-chip {
    font-size: 0.75rem;
    padding: 0.45rem 0.75rem;
  }
}
