/* Homepage hero — premium layout (stable, no wildcard span rules) */

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

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

@keyframes heroRingSpin {
  to { transform: rotate(360deg); }
}

@keyframes heroScrollPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.65); }
  50% { opacity: 1; transform: scaleY(1); }
}

body.flj-home #hero {
  --hero-sakura: #ff6b9d;
  --hero-mint: #00f5d4;
  --hero-gold: #f5a623;
  --hero-violet: #b794f6;
  --hero-glass: rgba(14, 16, 28, 0.72);
  --hero-line: rgba(255, 255, 255, 0.09);
}

/* Disable duplicate gradient ring from flj-wow.css */
html.flj-dark body.flj-home #hero .hero-img-wrap::before {
  display: none !important;
}

/* ── Staggered entrance ── */
body.flj-home #hero .hero-quick-track { animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both; }
body.flj-home #hero .hero-brand { animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both; }
body.flj-home #hero .hero-method { animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
body.flj-home #hero .hero-title { animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both; }
body.flj-home #hero .hero-subtitle { animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both; }
body.flj-home #hero .hero-btns { animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both; }
body.flj-home #hero .hero-stats { animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.44s both; }
body.flj-home #hero .hero-right { animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }

/* ── Quick Track bar ── */
body.flj-home #hero .hero-quick-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 107, 157, 0.22);
  background:
    linear-gradient(120deg, rgba(230, 57, 70, 0.14) 0%, transparent 42%),
    linear-gradient(300deg, rgba(0, 245, 212, 0.08) 0%, transparent 38%),
    var(--hero-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

body.flj-home #hero .hero-qt-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.flj-home #hero .hero-qt-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.flj-home #hero .hero-quick-track-kanji {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, rgba(230, 57, 70, 0.55), rgba(230, 57, 70, 0.2));
  border: 1px solid rgba(255, 107, 157, 0.35);
  box-shadow: 0 0 24px rgba(230, 57, 70, 0.25);
  text-shadow: none;
}

body.flj-home #hero .hero-quick-track-label {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}

body.flj-home #hero .hero-quick-track-msg {
  font-family: 'Nunito', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.3;
}

body.flj-home #hero .hero-qt-divider {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  flex-shrink: 0;
}

body.flj-home #hero .hero-qt-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.flj-home #hero .hero-quick-track-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--hero-line);
  background: rgba(0, 0, 0, 0.32);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.25s;
}

body.flj-home #hero .hero-quick-track-step:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 245, 212, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.flj-home #hero .hero-quick-track-step--primary {
  border-color: rgba(230, 57, 70, 0.45);
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.28), rgba(230, 57, 70, 0.1));
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.12);
}

body.flj-home #hero .hero-quick-track-num {
  flex-shrink: 0;
}

body.flj-home #hero .hero-quick-track-text {
  font-family: 'Nunito', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  white-space: nowrap;
}

body.flj-home #hero .hero-quick-track-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.48);
  margin-left: 3px;
}

body.flj-home #hero .hero-quick-track-arrow {
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.95rem;
  font-weight: 800;
}

/* ── Copy column accent ── */
body.flj-home #hero .hero-copy {
  position: relative;
  padding-left: 18px;
}

body.flj-home #hero .hero-copy::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--hero-sakura) 0%, var(--hero-gold) 45%, var(--hero-mint) 100%);
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.35);
}

/* ── Brand ── */
body.flj-home #hero .hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(10px, 1.4vh, 16px) !important;
}

body.flj-home #hero .hero-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(230, 57, 70, 0.35), rgba(230, 57, 70, 0.08));
  border: 1px solid rgba(255, 107, 157, 0.3);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.18);
  flex-shrink: 0;
}

body.flj-home #hero .hero-brand-kanji {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--hero-sakura);
  margin: 0;
}

body.flj-home #hero .hero-brand-text {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(0.95rem, 1.7vw, 1.12rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

body.flj-home #hero .hero-brand-accent {
  color: var(--hero-sakura);
}

/* ── One-a-Day method ── */
body.flj-home #hero .hero-method {
  margin-bottom: clamp(10px, 1.5vh, 18px) !important;
  padding: 14px 16px !important;
  border-radius: 18px;
  border: 1px solid var(--hero-line);
  background:
    radial-gradient(ellipse 90% 80% at 0% 0%, rgba(230, 57, 70, 0.1), transparent 55%),
    rgba(18, 20, 38, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.flj-home #hero .hero-method-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

body.flj-home #hero .hero-method-badge {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--hero-sakura);
  background: rgba(255, 107, 157, 0.12);
  border: 1px solid rgba(255, 107, 157, 0.2);
}

body.flj-home #hero .hero-method-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 !important;
}

body.flj-home #hero .hero-method-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

body.flj-home #hero .hero-method-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 100px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.2s, background 0.2s;
}

body.flj-home #hero .hero-method-chip:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

body.flj-home #hero .hero-method-glyph {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

body.flj-home #hero .hero-method-chip[data-skill="hira"] .hero-method-glyph { color: var(--hero-sakura); }
body.flj-home #hero .hero-method-chip[data-skill="kata"] .hero-method-glyph { color: #6eb3e8; }
body.flj-home #hero .hero-method-chip[data-skill="kanji"] .hero-method-glyph { color: var(--hero-gold); }
body.flj-home #hero .hero-method-chip[data-skill="word"] .hero-method-glyph { color: var(--hero-mint); }
body.flj-home #hero .hero-method-chip[data-skill="phrase"] .hero-method-glyph { color: var(--hero-violet); }
body.flj-home #hero .hero-method-chip[data-skill="sentence"] .hero-method-glyph { color: #22d3ee; }

body.flj-home #hero .hero-method-day {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(90deg, #e63946, #ff6584);
  border: none;
  padding: 6px 13px;
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.3);
}

/* ── Headline ── */
body.flj-home #hero .hero-title {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
  margin-bottom: 0;
}

body.flj-home #hero .hero-title-line {
  display: block;
}

body.flj-home #hero .hero-title-line:first-child {
  font-size: 0.92em;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
}

body.flj-home #hero .hero-hl {
  background: linear-gradient(120deg, #ff6b9d 0%, #f5a623 38%, #00f5d4 72%, #b794f6 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 10s ease infinite;
  filter: drop-shadow(0 0 28px rgba(255, 107, 157, 0.15));
}

body.flj-home #hero .hero-subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.84rem, 1.5vh, 0.98rem) !important;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.58) !important;
  line-height: 1.55 !important;
  max-width: 420px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.flj-home #hero .hero-free-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 100px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hero-mint);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.28);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.12);
}

/* ── Buttons ── */
body.flj-home #hero .hero-btns {
  gap: 12px;
}

body.flj-home #hero .btn-hero-primary {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 0.9rem !important;
  padding: 13px 26px !important;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #e63946 0%, #ff4d6a 100%);
  box-shadow:
    0 10px 32px rgba(230, 57, 70, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: none !important;
}

body.flj-home #hero .btn-hero-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 44px rgba(230, 57, 70, 0.5);
}

body.flj-home #hero .btn-hero-ghost {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem !important;
  padding: 13px 24px !important;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

body.flj-home #hero .btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 245, 212, 0.3);
  color: #fff;
}

/* ── Stat pills ── */
body.flj-home #hero .hero-stats,
body.flj-home #hero .hub-hero-shell--home .hero-stats {
  display: flex !important;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px !important;
  margin-top: clamp(16px, 2.2vh, 26px) !important;
  grid-template-columns: unset !important;
}

body.flj-home #hero .hero-stat-pill {
  flex: 1 1 0;
  min-width: 88px;
  max-width: 140px;
  padding: 14px 10px 12px;
  border-radius: 14px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--hero-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

body.flj-home #hero .hero-stat-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 2px;
  opacity: 0.85;
}

body.flj-home #hero .hero-stat-pill[data-stat="tools"]::before { background: var(--hero-sakura); box-shadow: 0 0 12px rgba(255, 107, 157, 0.5); }
body.flj-home #hero .hero-stat-pill[data-stat="cards"]::before { background: var(--hero-gold); box-shadow: 0 0 12px rgba(245, 166, 35, 0.45); }
body.flj-home #hero .hero-stat-pill[data-stat="course"]::before { background: #66e0a8; box-shadow: 0 0 12px rgba(102, 224, 168, 0.45); }
body.flj-home #hero .hero-stat-pill[data-stat="ranks"]::before { background: var(--hero-violet); box-shadow: 0 0 12px rgba(183, 148, 246, 0.45); }

body.flj-home #hero .hero-stat-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

body.flj-home #hero .hero-stat-pill .hub-stat-num,
body.flj-home #hero .hero-stat-pill .hero-stat-num {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.35rem, 2.6vh, 1.85rem) !important;
  font-weight: 800;
  line-height: 1.1;
  display: block;
}

body.flj-home #hero .hero-stat-pill[data-stat="tools"] .hub-stat-num { color: var(--hero-sakura) !important; }
body.flj-home #hero .hero-stat-pill[data-stat="cards"] .hub-stat-num { color: var(--hero-gold) !important; }
body.flj-home #hero .hero-stat-pill[data-stat="course"] .hub-stat-num { color: #66e0a8 !important; }
body.flj-home #hero .hero-stat-pill[data-stat="ranks"] .hub-stat-num { color: var(--hero-violet) !important; }

body.flj-home #hero .hero-stat-pill .hub-stat-lbl,
body.flj-home #hero .hero-stat-pill .hero-stat-lbl {
  font-family: 'Nunito', sans-serif;
  font-size: 0.58rem !important;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42) !important;
  margin-top: 4px;
  display: block;
  line-height: 1.25;
}

/* ── Hero image ── */
body.flj-home #hero .hero-img-wrap {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 560px;
  aspect-ratio: unset;
  height: auto;
  animation: heroImgFloat 7s ease-in-out infinite;
}

body.flj-home #hero .hero-img-wrap picture {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 0;
}

body.flj-home #hero .hero-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto !important;
  max-height: calc(var(--flj-fill-h) - 120px);
  aspect-ratio: 560 / 840;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(255, 107, 157, 0.08);
}

body.flj-home #hero .hero-img-ring {
  position: absolute;
  inset: -5px;
  border-radius: 22px;
  z-index: 0;
  pointer-events: none;
  padding: 2px;
  background: conic-gradient(
    from 0deg,
    var(--hero-sakura),
    var(--hero-gold),
    var(--hero-mint),
    var(--hero-violet),
    var(--hero-sakura)
  );
  animation: heroRingSpin 12s linear infinite;
  opacity: 0.7;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

body.flj-home #hero .hero-img-shine {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

body.flj-home #hero .hero-right {
  align-self: center;
}

/* ── Scroll hint ── */
body.flj-home #hero .hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.25s;
  flex-shrink: 0;
  animation: heroFadeUp 0.6s ease 0.7s both;
}

body.flj-home #hero .hero-scroll-hint:hover {
  opacity: 0.85;
}

body.flj-home #hero .hero-scroll-hint-line {
  display: block;
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5));
  border-radius: 1px;
  animation: heroScrollPulse 2s ease-in-out infinite;
  transform-origin: top center;
}

body.flj-home #hero .hero-scroll-hint-text {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  body.flj-home #hero .hero-quick-track {
    justify-content: center;
    text-align: center;
  }
  body.flj-home #hero .hero-qt-brand {
    flex: 1 1 100%;
    justify-content: center;
  }
  body.flj-home #hero .hero-qt-divider {
    display: none;
  }
  body.flj-home #hero .hero-qt-steps {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  body.flj-home #hero .hero-stat-pill {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
  }
  body.flj-home #hero .hero-qt-steps {
    flex-direction: column;
    width: 100%;
  }
  body.flj-home #hero .hero-quick-track-arrow {
    transform: rotate(90deg);
  }
  body.flj-home #hero .hero-quick-track-step {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  body.flj-home #hero .hero-stat-pill {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 10px 8px;
  }
}

@media (max-width: 900px) {
  body.flj-home #hero .hero-img {
    max-height: min(42vh, 380px);
    margin: 0 auto;
  }

  body.flj-home #hero .hero-copy {
    padding-left: 0;
  }
  body.flj-home #hero .hero-copy::before {
    display: none;
  }
  body.flj-home #hero .hero-scroll-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.flj-home #hero .hero-hl,
  body.flj-home #hero .hero-img-wrap,
  body.flj-home #hero .hero-img-ring,
  body.flj-home #hero .hero-scroll-hint-line {
    animation: none;
  }
  body.flj-home #hero .hero-quick-track,
  body.flj-home #hero .hero-brand,
  body.flj-home #hero .hero-method,
  body.flj-home #hero .hero-title,
  body.flj-home #hero .hero-subtitle,
  body.flj-home #hero .hero-btns,
  body.flj-home #hero .hero-stats,
  body.flj-home #hero .hero-right,
  body.flj-home #hero .hero-scroll-hint {
    animation: none;
  }
  body.flj-home #hero .hero-stat-pill:hover,
  body.flj-home #hero .hero-quick-track-step:hover {
    transform: none;
  }
}