/* Homepage composition fix — Gate D HOMEPAGE-FIX-006
   Scoped to body.lfm-home so L01 / Mini App / cabinet keep their styles. */

html:has(body.lfm-home) {
  height: auto;
  min-height: 100%;
}
body.lfm-home {
  --ink: #2c2a28;
  --muted: #6e6860;
  --accent: #8a4f3a;
  --line: rgba(44, 42, 40, 0.12);
  --pearl: #f2f6fa;
  --paper: #fbfcfd;
  --white: #ffffff;
  --max: 1120px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, "Manrope", "Segoe UI", Arial, sans-serif;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.01em;
  background: var(--pearl);
  /* Soft page wash only — NOT a photo background */
  background-image:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(255,255,255,0.9), transparent 55%),
    linear-gradient(180deg, #f5f7fa 0%, var(--pearl) 40%, #eef2f6 100%);
  /* Fill viewport without phantom scroll after footer (PDF empty page ≠ HTML) */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body.lfm-home > main {
  flex: 1 0 auto;
}

body.lfm-home::before,
body.lfm-home::after {
  content: none !important;
  display: none !important;
}

body.lfm-home .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 252, 253, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
body.lfm-home .site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
body.lfm-home .brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
}
body.lfm-home .nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
body.lfm-home .nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
body.lfm-home .nav a:hover { color: var(--ink); }

/* High-contrast CTAs — primary ink on light; secondary solid border on white */
body.lfm-home .btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.2rem;
  border: 2px solid #1a1816;
  background: #1a1816;
  color: #faf8f5 !important;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 0;
  cursor: pointer;
}
body.lfm-home .btn:hover { background: #000; border-color: #000; }
body.lfm-home .btn.secondary {
  background: #fff;
  color: #1a1816 !important;
  border-color: #1a1816;
}
body.lfm-home .btn.secondary:hover { background: #f3f1ed; }
body.lfm-home .status-note {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ——— HERO: bounded composition, NOT page wallpaper ——— */
body.lfm-home .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.5rem;
  align-items: center;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.75rem 0 3.25rem;
  min-height: 520px;
  max-height: 720px;
  position: relative;
  background: transparent;
}
body.lfm-home .hero-copy {
  position: relative;
  z-index: 2;
  width: auto;
  margin: 0;
  padding: 0 !important;
  align-self: center;
  color: var(--ink);
}
body.lfm-home .hero-copy::before { display: none !important; content: none !important; }
body.lfm-home .hero-copy .tag {
  display: inline-block;
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
body.lfm-home .hero-copy h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--ink);
}
body.lfm-home .hero-copy .lede {
  max-width: 34rem;
  margin: 0 0 1.5rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
}
body.lfm-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Artwork as an object — never absolute fill of the page */
body.lfm-home .hero-art {
  position: relative !important;
  inset: auto !important;
  margin: 0;
  min-height: 0 !important;
  max-height: 640px;
  height: auto;
  overflow: hidden;
  background: #e4e9ef;
  box-shadow: 0 18px 48px rgba(44, 42, 40, 0.08);
}
body.lfm-home .hero-art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  object-position: center;
  min-height: 0 !important;
  filter: none;
}

/* ——— Sections with their own surfaces ——— */
body.lfm-home .home-section {
  padding: 4.25rem 0;
  border-top: 1px solid var(--line);
}
body.lfm-home .home-section--alt {
  background: rgba(255, 255, 255, 0.55);
}
body.lfm-home .home-section--soft {
  background: #eef2f6;
}
body.lfm-home .wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}
body.lfm-home .home-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  margin: 0 0 0.85rem;
  line-height: 1.15;
}
body.lfm-home .home-section .lead {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
body.lfm-home .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
body.lfm-home .grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
body.lfm-home .panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.35rem 1.4rem;
  backdrop-filter: none;
}
body.lfm-home .panel h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}
body.lfm-home .muted { color: var(--muted); }

body.lfm-home .portrait {
  margin: 0;
  background: #e4e9ef;
  overflow: hidden;
}
body.lfm-home .portrait img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  object-position: center top;
}

body.lfm-home .course-card.coming .btn,
body.lfm-home .course-card.locked-course .btn {
  display: none;
}

body.lfm-home .site-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.25rem;
  margin: 0;
  background: #e8edf2;
  color: var(--muted);
  font-size: 0.92rem;
}
body.lfm-home .site-footer p { margin: 0.25rem 0; }
body.lfm-home .site-footer::after { content: none; }

@media (max-width: 900px) {
  body.lfm-home .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0 2.25rem;
    min-height: 0;
    max-height: none;
  }
  body.lfm-home .hero-art {
    order: -1;
    max-height: 420px;
  }
  body.lfm-home .hero-art img { max-height: 420px; }
  body.lfm-home .grid-2,
  body.lfm-home .grid-3 {
    grid-template-columns: 1fr;
  }
  body.lfm-home .home-section { padding: 3rem 0; }
}
