/* =========================================================
   HOMEPAGE LANDING  (visitors who are NOT logged in)
   File: homepage/landing/landing.css
   Everything is scoped under .landing so the site's header
   and footer are untouched.
========================================================= */

.landing {
  --ld-bg: #08080b;
  --ld-surface: #101014;
  --ld-line: rgba(255, 255, 255, 0.08);
  --ld-text: #f3f3f5;
  --ld-muted: #8e8e99;
  --ld-faint: #5b5b66;
  --ld-lime: #16a34a;
  --ld-violet: #9486ff;

  background: var(--ld-bg);
  color: var(--ld-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 20px;
}

.landing *,
.landing *::before,
.landing *::after { box-sizing: border-box; }

.landing a { color: inherit; text-decoration: none; }

.ld-wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.ld-ico { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ld-lime { color: var(--ld-lime); }
.ld-hidden { display: none !important; }

/* ---------- hero ---------- */

.ld-hero { position: relative; text-align: center; padding: 64px 0 36px; overflow: hidden; }
.ld-hero::before { content: ""; position: absolute; left: 50%; top: -220px; width: 620px; height: 620px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(22, 163, 74, 0.14), transparent); pointer-events: none; }
.ld-rings { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); width: 520px; height: 520px; pointer-events: none; opacity: 0.5; }
.ld-rings circle { fill: none; stroke: rgba(255, 255, 255, 0.05); }
.ld-kick { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.2em; color: var(--ld-muted); }
.ld-kick::before, .ld-kick::after { content: ""; width: 26px; height: 1px; background: var(--ld-faint); }
.ld-h1 { position: relative; margin: 22px auto 0; max-width: 13ch; font-family: Sora, Inter, sans-serif; font-weight: 300; font-size: clamp(40px, 8.2vw, 84px); line-height: 1.02; letter-spacing: -0.045em; color: var(--ld-text); }
.ld-h1 em { font-style: normal; font-weight: 700; color: var(--ld-lime); }
.ld-lead { position: relative; margin: 20px auto 0; max-width: none; white-space: nowrap; color: var(--ld-muted); font-size: clamp(15px, 2vw, 17px); }  /* one line (the landing always uses the desktop layout) */
.ld-btns { position: relative; display: flex; justify-content: center; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.ld-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 14px 22px; font-weight: 600; font-size: 14.5px; transition: transform 0.15s ease; }
.ld-btn:hover { transform: translateY(-2px); }
.ld-btn.ld-p { background: var(--ld-lime); color: #08080b; }
.ld-btn.ld-g { border: 1px solid rgba(255, 255, 255, 0.18); color: var(--ld-text); }

/* KPI strip */
.ld-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 44px; border-top: 1px solid var(--ld-line); border-bottom: 1px solid var(--ld-line); }
.ld-kpi { padding: 22px 10px; text-align: center; }
.ld-kpi:nth-child(odd) { border-right: 1px solid var(--ld-line); }
.ld-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--ld-line); }
.ld-kpi b { display: block; font-family: Sora, Inter, sans-serif; font-weight: 600; font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.04em; line-height: 1; }
.ld-kpi span { display: block; margin-top: 8px; font-size: 12.5px; color: var(--ld-muted); }
.ld-kpi i { font-style: normal; color: var(--ld-lime); font-size: 11.5px; }
.ld-kpi i.ld-down { color: var(--ld-muted); }

/* ticker */
.ld-ticker { margin: 26px auto 0; max-width: 560px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 999px; background: var(--ld-surface); border: 1px solid var(--ld-line); font-size: 13.5px; overflow: hidden; text-align: left; }
.ld-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ld-lime); flex: 0 0 auto; animation: ld-pl 1.8s ease-in-out infinite; }
@keyframes ld-pl { 0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } }
.ld-tk { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.35s ease, transform 0.35s ease; }
.ld-tk.ld-out { opacity: 0; transform: translateY(8px); }
.ld-tk b { font-weight: 600; }
.ld-tk em { font-style: normal; color: var(--ld-muted); }

/* ---------- sections ---------- */

.ld-sec { padding: 96px 0 0; }
.ld-sh { display: grid; gap: 10px; margin-bottom: 34px; }
.ld-num { font-family: Sora, Inter, sans-serif; font-size: 13px; color: var(--ld-lime); letter-spacing: 0.14em; }
.ld-num::after { content: ""; display: inline-block; width: 34px; height: 1px; background: var(--ld-lime); vertical-align: middle; margin-left: 10px; opacity: 0.6; }
.ld-h2 { margin: 0; font-family: Sora, Inter, sans-serif; font-weight: 300; font-size: clamp(30px, 5.4vw, 52px); line-height: 1.06; letter-spacing: -0.04em; max-width: 17ch; color: var(--ld-text); }
.ld-h2 em { font-style: normal; font-weight: 700; }
.ld-sh p { margin: 0; color: var(--ld-muted); max-width: 520px; }

/* steps */
.ld-steps { display: grid; gap: 14px; }
.ld-step { padding: 26px 22px; border-radius: 24px; background: var(--ld-surface); border: 1px solid var(--ld-line); }
.ld-n { font-family: Sora, Inter, sans-serif; font-weight: 300; font-size: 48px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35); }
.ld-step b { display: block; margin-top: 18px; font-size: 17px; font-weight: 600; }
.ld-step p { margin: 6px 0 0; color: var(--ld-muted); font-size: 14px; }

/* demand */
.ld-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.ld-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--ld-line); background: transparent; color: var(--ld-muted); font: inherit; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.ld-chip.ld-on { background: var(--ld-text); color: #08080b; border-color: var(--ld-text); }
.ld-demand, .ld-growth { display: grid; gap: 18px; }
.ld-card { padding: 22px; border-radius: 26px; background: var(--ld-surface); border: 1px solid var(--ld-line); }
.ld-chart { position: relative; height: 280px; }
.ld-side { display: grid; gap: 18px; align-content: center; }
.ld-big { font-family: Sora, Inter, sans-serif; font-weight: 600; font-size: clamp(46px, 8vw, 72px); line-height: 1; letter-spacing: -0.05em; }
.ld-side small { display: block; color: var(--ld-muted); font-size: 13px; margin-top: 6px; }
.ld-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 14px; }
.ld-bar i { display: block; height: 100%; width: 0; background: var(--ld-lime); border-radius: 999px; transition: width 1.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ld-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--ld-muted); margin-bottom: 12px; flex-wrap: wrap; }
.ld-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ld-legend i { width: 10px; height: 10px; border-radius: 50%; display: block; }

/* open tuitions */
.ld-tuitions { display: grid; gap: 12px; }
.ld-tu { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px; border-radius: 22px; background: var(--ld-surface); border: 1px solid var(--ld-line); }
.ld-sj { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-family: Sora, Inter, sans-serif; font-weight: 600; background: rgba(22, 163, 74, 0.1); color: var(--ld-lime); }
.ld-tu b { display: block; font-size: 15px; font-weight: 600; }
.ld-tu > div > span { display: block; font-size: 12.5px; color: var(--ld-muted); margin-top: 2px; }
.ld-tu > .ld-sj { display: grid; place-items: center; margin: 0; font-size: 15px; line-height: 1; }
.ld-tu a { font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); white-space: nowrap; }
.ld-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--ld-lime) !important; font-weight: 600; font-size: 14px; }

/* tutors: avatar, name + verified badge, experience */
.ld-tutors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ld-tt { padding: 22px 14px; border-radius: 24px; background: var(--ld-surface); border: 1px solid var(--ld-line); text-align: center; }
.ld-av { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-family: Sora, Inter, sans-serif; font-weight: 600; font-size: 20px; color: #08080b; }
.ld-name { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 14px; min-width: 0; }
.ld-name b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-badge { width: 18px; height: 18px; flex: 0 0 auto; color: #1d9bf0; }
/* the seal follows the tutor's subscription payment colour (blue when they have none) */
.ld-badge[data-tone="paid"]    { color: #16a34a; }
.ld-badge[data-tone="partial"] { color: #ffa15c; }
.ld-badge[data-tone="unpaid"]  { color: #ff6868; }
.ld-exp { display: block; margin-top: 4px; font-size: 13px; color: var(--ld-muted); }

/* CTA */
.ld-cta { margin-top: 100px; padding: 48px 22px; border-radius: 32px; text-align: center; background: var(--ld-lime); color: #08080b; position: relative; overflow: hidden; }
.ld-cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(8, 8, 11, 0.15); box-shadow: 0 0 0 40px rgba(8, 8, 11, 0.03), 0 0 0 80px rgba(8, 8, 11, 0.03); pointer-events: none; }
.ld-cta h3 { position: relative; margin: 0; font-family: Sora, Inter, sans-serif; font-weight: 300; font-size: clamp(30px, 6vw, 56px); line-height: 1.02; letter-spacing: -0.045em; color: #08080b; }
.ld-cta h3 b { font-weight: 700; }
.ld-cta .ld-btns { margin-top: 24px; }
.ld-cta .ld-btn.ld-p { background: #08080b; color: var(--ld-lime); }
.ld-cta .ld-btn.ld-g { border-color: rgba(8, 8, 11, 0.3); color: #08080b; }

/* reveal on scroll */
.ld-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s ease; }
.ld-reveal.ld-show { opacity: 1; transform: none; }

/* Desktop layout on EVERY screen - it never collapses to the
   phone layout (index.html also sets a 1200px-wide viewport for
   visitors, so phones and tablets show it scaled to fit). */
.ld-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ld-kpi { border-bottom: 0 !important; border-right: 1px solid var(--ld-line); }
.ld-kpi:nth-child(odd) { border-right: 1px solid var(--ld-line); }
.ld-kpi:last-child { border-right: 0; }
.ld-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ld-demand { grid-template-columns: 1.6fr 1fr; }
.ld-growth { grid-template-columns: 1fr 1.6fr; align-items: stretch; }
.ld-tutors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ld-chart { height: 320px; }
.landing { min-width: 1024px; }

/* No white edges: the page itself had the browser's default 8px
   white margin around it. */
html:has(body[data-page="home"]) { background: #08080b; }
body[data-page="home"] { margin: 0; background: #08080b; }

@media (prefers-reduced-motion: reduce) {
  .landing * { animation: none !important; transition: none !important; }
  .ld-reveal { opacity: 1; transform: none; }
}

/* tutors: place line (city left, PIN right) and the gentle swap while the cards rotate */
.ld-loc { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ld-line); font-size: 12px; color: var(--ld-muted); }
.ld-loc span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-loc span:only-child { margin: 0 auto; }
.ld-tutors { transition: opacity 0.45s ease; }
.ld-tutors.ld-swap { opacity: 0; }

/* verified seal sits on the profile circle; the full name goes under it */
.ld-avw { position: relative; width: 64px; margin: 0 auto; }
.ld-badge.ld-badge-av { position: absolute; right: -6px; bottom: -4px; width: 24px; height: 24px; filter: drop-shadow(0 0 0 #0f0f13); }
.ld-name b { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }

/* anything too long for its card is cut with "..." */
.ld-tt { min-width: 0; overflow: hidden; }
.ld-name { display: block; }
.ld-name b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-exp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
