/* flj-quality.css — premium polish: calm layout, restrained motion, consistency */

/* Homepage: full-bleed hero under fixed nav */
.site-main--home {
  padding-top: 0;
  min-height: 0;
}

body.flj-home {
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--flj-nav-h);
}

/* Homepage: each major block = one full-screen “page” when scrolling */
body.flj-home #main-content > section,
body.flj-home #main-content > .rank-cards-section {
  scroll-snap-align: start;
  box-sizing: border-box;
}
body.flj-home #magnet-section .section-wrap,
body.flj-home #learning-path-section .section-wrap,
body.flj-home #quiz-section .section-wrap,
body.flj-home #tools-section .section-wrap,
body.flj-home .rank-cards-section .section-wrap,
body.flj-home #structured-promo .promo-inner,
body.flj-home #cta-section .cta-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Hero: one viewport tall, grows if content needs it ── */
body.flj-home #hero {
  min-height: var(--flj-vh);
  box-sizing: border-box;
  padding: calc(var(--flj-nav-h) + 10px) 40px 16px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
body.flj-home #hero .hero-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 12px);
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
body.flj-home #hero .hero-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
}
body.flj-home #hero .hero-brand {
  margin-bottom: clamp(6px, 1vh, 12px);
}
body.flj-home #hero .hero-method {
  margin-bottom: clamp(6px, 1vh, 14px);
  padding: 10px 14px;
}
body.flj-home #hero .hero-title {
  font-size: clamp(1.85rem, 5.2vh, 3.5rem);
}
body.flj-home #hero .hero-subtitle {
  font-size: clamp(0.8rem, 1.7vh, 0.95rem);
  line-height: 1.5;
  margin: clamp(6px, 1vh, 12px) 0 clamp(10px, 1.6vh, 18px);
}
body.flj-home #hero .hero-btns {
  gap: 10px;
}
body.flj-home #hero .btn-hero-primary,
body.flj-home #hero .btn-hero-ghost {
  padding: 11px 22px;
  font-size: 0.88rem;
}
body.flj-home #hero .hero-stats {
  margin-top: clamp(10px, 1.8vh, 20px);
  gap: clamp(14px, 2vw, 24px);
}
body.flj-home #hero .hero-stat-num {
  font-size: clamp(1.35rem, 3vh, 1.85rem);
  line-height: 1.1;
  margin-bottom: 3px;
}
body.flj-home #hero .hero-stat-lbl {
  color: #a8b0c8;
  font-size: 0.62rem;
  display: block;
}
body.flj-home #hero .hero-img {
  max-height: calc(var(--flj-fill-h) - 120px);
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}
body.flj-home #hero .hero-copy {
  min-height: 0;
  overflow: visible;
}

/* Quick Track — slim bar inside hero */
.hero-quick-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 8px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 101, 132, 0.35);
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.12), rgba(0, 245, 212, 0.06));
  box-shadow: 0 0 24px rgba(230, 57, 70, 0.1);
  flex-shrink: 0;
}
.hero-quick-track-kanji {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  color: var(--red, #e63946);
  text-shadow: 0 0 16px rgba(230, 57, 70, 0.45);
}
.hero-quick-track-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}
.hero-quick-track-msg {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c8d0e8;
}
.hero-quick-track-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.hero-quick-track-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}
.hero-quick-track-step--primary {
  border-color: rgba(230, 57, 70, 0.45);
  background: rgba(230, 57, 70, 0.15);
}
.hero-quick-track-step--primary .hero-quick-track-num {
  background: var(--red, #e63946);
}
.hero-quick-track-step:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 245, 212, 0.4);
}
.hero-quick-track-arrow {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 800;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  body.flj-home #hero {
    min-height: var(--flj-vh);
    padding: calc(var(--flj-nav-h) + 8px) 20px 32px;
  }
  body.flj-home #hero .hero-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  body.flj-home #hero .hero-img {
    max-height: min(42vh, 380px);
    margin: 0 auto;
    object-fit: cover;
  }
  .hero-quick-track {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .hero-quick-track-arrow {
    transform: rotate(90deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.flj-home { scroll-snap-type: none; }
}

.flj-home .site-main::before,
.flj-home .site-main::after {
  display: none;
}

/* Section headings — no inline styles needed */
.section-head {
  text-align: center;
  margin-bottom: 0;
}

.section-head .section-eyebrow {
  justify-content: center;
}

.section-head .section-title {
  text-align: center;
}

.section-head .section-sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-head--spaced {
  margin-bottom: 48px;
}

/* Refined hero typography */
.hero-title {
  letter-spacing: -0.03em;
}

.hero-title-line {
  display: block;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--red) 0%, var(--sakura) 45%, var(--gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 8s ease infinite;
}

/* Logged-in nav stats chip — hide when empty */
.nav-gamification--empty,
.nav-stats-chip.nav-gamification--empty {
  display: none !important;
}

/* Homepage scroll — never trap the document */
html,
body.flj-home {
  overflow-y: auto !important;
  height: auto !important;
}
body.flj-home .page-wrap,
body.flj-home .site-main--home {
  overflow: visible;
  min-height: 0;
}

/* Inner pages: subtle accent only — no arcade overlays */
body:not(.flj-home)::before,
body:not(.flj-home)::after {
  display: none !important;
}

body:not(.flj-home) .site-main::after {
  opacity: 0.35 !important;
  width: 480px !important;
  height: 480px !important;
}

/* Tools section header layout */
.tools-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}

.tools-section-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Quiz results utilities */
.quiz-results-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.quiz-result-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.quiz-results[hidden],
.quiz-results.is-hidden {
  display: none !important;
}

/* CTA block */
.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-title-large {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 16px;
}

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

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn-large {
  font-size: 1.05rem;
  padding: 16px 36px;
}

/* Mobile: keep primary CTA visible */
@media (max-width: 768px) {
  .nav-right .btn-nav-red {
    display: inline-flex !important;
  }

  .nav-right .btn-nav-ghost#nav-signin-btn {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title-accent {
    animation: none !important;
  }
}