/* ═══════════════════════════════════════════════════════════════════════════
   EduCare — Landing page publik (www.educare.id)

   BERDIRI SENDIRI. Berkas ini sengaja TIDAK memakai tailwind.css/application.css
   milik aplikasi, karena keduanya mengunci html & body ke
   `height:100%; overflow:hidden` demi app shell sidebar-tetap
   (lihat docs/TABLE_STYLE.md §1) — halaman panjang seperti ini tidak akan bisa
   di-scroll di bawah aturan itu.

   Nilai warnanya DISALIN dari palet aplikasi (app/assets/tailwind/application.css)
   supaya landing page dan panel terlihat satu produk. Kalau hue brand diganti di
   sana, ganti juga --brand/--brand-bright/--brand-soft di sini.

   Semua prefiks kelas `lp-` (landing page) agar tidak mungkin bentrok dengan
   kelas aplikasi kalau suatu saat kedua stylesheet dimuat bersamaan.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --brand: #0369a1;
  --brand-bright: #0284c7;
  --brand-dark: #075985;
  --brand-soft: #deebf7;
  --ink: #1e293b;
  --ink-strong: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 30px -12px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -20px rgba(3, 105, 161, .30);
  --radius: 14px;
  --nav-h: 68px;
}

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

html {
  /* `scroll-padding-top` mencegah judul seksi tersembunyi di balik navbar yang
     sticky ketika pengguna mengeklik tautan #anchor di menu. */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

.lp-body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.lp-body img { max-width: 100%; height: auto; display: block; }
.lp-body h1, .lp-body h2, .lp-body h3, .lp-body h4, .lp-body p, .lp-body ul, .lp-body ol { margin: 0; }
.lp-body ul { list-style: none; padding: 0; }
.lp-body a { text-decoration: none; }

/* Warna tautan bawaan, DIBUNGKUS :where() supaya spesifisitasnya nol.
   Ditulis polos sebagai `.lp-body a` nilainya (0,1,1) dan itu mengalahkan
   setiap aturan komponen berkelas tunggal (0,1,0) yang menimpanya —
   .lp-btn--primary jadi teks --brand di atas latar --brand alias tombol
   kosong, .lp-logo kehilangan --ink-strong, .locale-switch__item kehilangan
   --muted. Dengan :where(), warna di sini murni default: kalah dari apa pun
   yang menyebut warna secara eksplisit, tanpa perlu menaikkan spesifisitas
   komponen satu per satu. */
:where(.lp-body a) { color: var(--brand); }
:where(.lp-body a:hover) { color: var(--brand-bright); }

/* Fokus keyboard harus terlihat di SELURUH kontrol. Landing page adalah halaman
   pertama yang disentuh pembaca layar & pengguna keyboard; outline default
   browser dihapus banyak reset, jadi dikembalikan secara eksplisit di sini. */
.lp-body :focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.lp-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Lompat-ke-konten untuk pengguna keyboard; tersembunyi sampai difokus. */
.lp-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.lp-skip:focus { left: 0; color: #fff; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.lp-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.lp-nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.lp-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-strong); }
.lp-logo:hover { color: var(--ink-strong); }
.lp-logo__mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand-dark));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px -4px rgba(3, 105, 161, .55);
}
.lp-logo__mark svg { width: 19px; height: 19px; }
.lp-logo__text { font-size: 1.16rem; font-weight: 750; letter-spacing: -.02em; }
.lp-logo__text b { font-weight: 750; color: var(--brand); }

.lp-nav__links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.lp-nav__links a { color: var(--muted); font-size: .92rem; font-weight: 550; }
.lp-nav__links a:hover { color: var(--ink); }

.lp-nav__actions { display: flex; align-items: center; gap: 12px; }

/* ── Tombol ──────────────────────────────────────────────────────────────── */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font-size: .93rem; font-weight: 650; line-height: 1.2; white-space: nowrap;
  cursor: pointer; font-family: inherit; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.lp-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.lp-btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -8px rgba(3, 105, 161, .8); }
.lp-btn--primary:hover { background: var(--brand-bright); color: #fff; transform: translateY(-1px); }
.lp-btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.lp-btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--muted-2); }
.lp-btn--light { background: #fff; color: var(--brand-dark); }
.lp-btn--light:hover { background: var(--brand-soft); color: var(--brand-dark); transform: translateY(-1px); }
.lp-btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.lp-btn--outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lp-btn--lg { padding: 14px 26px; font-size: 1rem; }

/* ── Pemilih bahasa (shared/_locale_switcher.html.erb) ───────────────────────
   Kelasnya milik partial bersama, jadi TIDAK diberi prefiks lp-. Aturannya
   disalin dari application.css karena stylesheet itu tidak dimuat di sini. */
.locale-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.locale-switch__item {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 28px; padding: 0 10px; border-radius: 7px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  color: var(--muted); text-decoration: none;
}
.locale-switch__item:hover { background: var(--surface-2); color: var(--ink); }
.locale-switch__item--active { background: var(--brand); color: #fff; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.lp-hero {
  position: relative; overflow: hidden;
  padding: 84px 0 92px;
  background:
    radial-gradient(1000px 520px at 78% -10%, var(--brand-soft) 0%, rgba(222, 235, 247, 0) 62%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.lp-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}

.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.lp-eyebrow span {
  background: var(--brand); color: #fff; border-radius: 999px;
  padding: 2px 9px; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
}

.lp-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1.12; letter-spacing: -.03em; font-weight: 780; color: var(--ink-strong);
}
.lp-hero h1 em { font-style: normal; color: var(--brand); }
.lp-hero__lead { margin-top: 20px; font-size: 1.08rem; color: var(--muted); max-width: 52ch; }
.lp-hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.lp-hero__note { margin-top: 18px; font-size: .85rem; color: var(--muted-2); }
.lp-hero__note code {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 7px; font-size: .82rem; color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Pratinjau panel — murni CSS/HTML, bukan tangkapan layar.
   Alasannya praktis: tangkapan layar akan basi setiap kali UI panel berubah,
   dan tidak ada yang mengingatkan saat itu terjadi. */
.lp-preview {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.lp-preview__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.lp-preview__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.lp-preview__url {
  margin-left: 8px; flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 10px; font-size: .74rem; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lp-preview__body { display: grid; grid-template-columns: 116px minmax(0, 1fr); min-height: 300px; }
.lp-preview__side { border-right: 1px solid var(--line); padding: 14px 12px; background: var(--surface); }
.lp-preview__side i {
  display: block; height: 8px; border-radius: 4px; background: var(--surface-2); margin-bottom: 11px;
}
.lp-preview__side i.is-on { background: var(--brand-soft); }
.lp-preview__side i:nth-child(1) { width: 78%; }
.lp-preview__side i:nth-child(2) { width: 58%; }
.lp-preview__side i:nth-child(3) { width: 70%; }
.lp-preview__side i:nth-child(4) { width: 50%; }
.lp-preview__side i:nth-child(5) { width: 66%; }
.lp-preview__side i:nth-child(6) { width: 44%; }
.lp-preview__main { padding: 16px; background: var(--bg); }
.lp-preview__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lp-preview__stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
.lp-preview__stat b { display: block; font-size: 1.16rem; font-weight: 750; color: var(--ink-strong); line-height: 1.2; }
.lp-preview__stat span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lp-preview__chart {
  margin-top: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 12px 10px;
}
.lp-preview__bars { display: flex; align-items: flex-end; gap: 6px; height: 108px; }
.lp-preview__bars i {
  flex: 1; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  opacity: .85;
}

/* ── Strip angka ─────────────────────────────────────────────────────────── */
.lp-stats { border-bottom: 1px solid var(--line); background: var(--surface); }
.lp-stats__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.lp-stats__item { background: var(--surface); padding: 30px 24px; text-align: center; }
.lp-stats__item b {
  display: block; font-size: 1.85rem; font-weight: 780; color: var(--brand); letter-spacing: -.02em;
}
.lp-stats__item span { font-size: .87rem; color: var(--muted); }

/* ── Seksi umum ──────────────────────────────────────────────────────────── */
.lp-section { padding: 88px 0; }
.lp-section--alt { background: var(--bg); border-block: 1px solid var(--line); }

.lp-head { max-width: 620px; margin: 0 auto 52px; text-align: center; }
.lp-head--left { margin-left: 0; text-align: left; }
.lp-head__kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand);
}
.lp-head h2 {
  margin-top: 12px; font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.22; letter-spacing: -.025em; font-weight: 760; color: var(--ink-strong);
}
.lp-head p { margin-top: 14px; font-size: 1.02rem; color: var(--muted); }

/* ── Kartu fitur ─────────────────────────────────────────────────────────── */
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.lp-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.lp-card:hover { border-color: var(--brand-soft); box-shadow: var(--shadow); transform: translateY(-2px); }
.lp-card__icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 18px;
}
.lp-card__icon svg { width: 21px; height: 21px; }
.lp-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink-strong); }
.lp-card p { margin-top: 8px; font-size: .93rem; color: var(--muted); }

/* ── Alur kerja ──────────────────────────────────────────────────────────── */
.lp-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: langkah; }
.lp-flow__step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px;
}
.lp-flow__step::before {
  counter-increment: langkah; content: counter(langkah, decimal-leading-zero);
  display: block; font-size: .8rem; font-weight: 750; color: var(--brand);
  letter-spacing: .08em; margin-bottom: 12px;
}
.lp-flow__step h3 { font-size: 1rem; font-weight: 700; color: var(--ink-strong); }
.lp-flow__step p { margin-top: 7px; font-size: .9rem; color: var(--muted); }

/* ── Peran ───────────────────────────────────────────────────────────────── */
.lp-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.lp-role {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px; border-top: 3px solid var(--brand);
}
.lp-role h3 { font-size: 1rem; font-weight: 700; color: var(--ink-strong); }
.lp-role p { margin-top: 8px; font-size: .9rem; color: var(--muted); }

/* ── Seksi mobile ────────────────────────────────────────────────────────── */
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.lp-checklist { margin-top: 26px; display: grid; gap: 13px; }
.lp-checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; color: var(--ink); }
.lp-checklist svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--ok); }

/* Ilustrasi telepon — CSS murni, sama alasannya dengan .lp-preview. */
.lp-phone-stage { display: flex; justify-content: center; }
.lp-phone {
  width: 262px; border-radius: 34px; padding: 12px;
  background: linear-gradient(160deg, var(--ink-strong), #334155);
  box-shadow: var(--shadow-lg);
}
.lp-phone__screen { background: var(--surface); border-radius: 24px; overflow: hidden; }
.lp-phone__top {
  background: linear-gradient(135deg, var(--brand-bright), var(--brand-dark));
  color: #fff; padding: 26px 20px 22px;
}
.lp-phone__top small { font-size: .72rem; opacity: .85; letter-spacing: .04em; }
.lp-phone__top strong { display: block; margin-top: 3px; font-size: 1.06rem; font-weight: 700; }
.lp-phone__list { padding: 14px; display: grid; gap: 10px; }
.lp-phone__row {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; background: var(--surface);
}
.lp-phone__avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; font-size: .76rem; font-weight: 750; flex-shrink: 0;
}
.lp-phone__meta { flex: 1; min-width: 0; }
.lp-phone__meta i { display: block; height: 7px; border-radius: 4px; background: var(--surface-2); }
.lp-phone__meta i:first-child { width: 74%; margin-bottom: 6px; background: #e2e8f0; }
.lp-phone__meta i:last-child { width: 46%; }
.lp-phone__badge {
  font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); white-space: nowrap;
}

/* ── Tanya jawab ─────────────────────────────────────────────────────────────
   Buka-tutupnya murni <details>/<summary> bawaan browser — tidak ada satu baris
   JavaScript pun di halaman ini, dan tidak perlu ada. */
.lp-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }

.lp-faq__item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0 22px;
  transition: border-color .18s, box-shadow .18s;
}
.lp-faq__item[open] { border-color: var(--brand-soft); box-shadow: var(--shadow); }

.lp-faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 19px 0; cursor: pointer; list-style: none;
}
/* Penanda segitiga bawaan diganti chevron sendiri. Perlu DUA aturan karena
   WebKit memakai pseudo-element miliknya sendiri sementara mesin lain membaca
   ::marker — melewatkan salah satunya menyisakan dua penanda di satu browser. */
.lp-faq__item summary::-webkit-details-marker { display: none; }
.lp-faq__item summary::marker { content: ""; }

.lp-faq__item summary h3 {
  font-size: 1.02rem; font-weight: 650; color: var(--ink-strong); line-height: 1.45;
}
.lp-faq__chevron { width: 19px; height: 19px; flex-shrink: 0; color: var(--brand); transition: transform .18s; }
.lp-faq__item[open] .lp-faq__chevron { transform: rotate(180deg); }

.lp-faq__item > p { padding-bottom: 21px; font-size: .95rem; color: var(--muted); max-width: 68ch; }

/* ── Pita ajakan ─────────────────────────────────────────────────────────── */
.lp-cta {
  padding: 76px 0;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, var(--brand-bright));
  color: #fff; text-align: center;
}
.lp-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 760;
  letter-spacing: -.025em; line-height: 1.25;
}
.lp-cta p { margin: 14px auto 0; max-width: 54ch; color: rgba(255, 255, 255, .88); font-size: 1.02rem; }
.lp-cta__actions { margin-top: 30px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.lp-footer { background: var(--ink-strong); color: #cbd5e1; padding: 56px 0 28px; }
.lp-footer a { color: #cbd5e1; }
.lp-footer a:hover { color: #fff; }
.lp-footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.lp-footer .lp-logo__text { color: #fff; }
.lp-footer .lp-logo__text b { color: #7dd3fc; }
.lp-footer__about { margin-top: 14px; font-size: .9rem; color: #94a3b8; max-width: 40ch; }
.lp-footer h4 {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; margin-bottom: 14px;
}
.lp-footer ul { display: grid; gap: 9px; font-size: .9rem; }
.lp-footer__bottom {
  padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between; align-items: center; font-size: .85rem; color: #94a3b8;
}

/* ── Responsif ───────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .lp-hero__grid, .lp-split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .lp-features, .lp-flow, .lp-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Fitur jumlahnya ganjil (9), jadi kartu terakhir dibentangkan penuh supaya
     barisnya tidak menyisakan satu lubang kosong di sebelahnya. Peran (6) genap
     dan tidak butuh ini — kalau salah satu jumlahnya berubah, tukar aturannya. */
  .lp-features > :last-child { grid-column: 1 / -1; }
  .lp-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* Menu anchor disembunyikan di layar sempit; tombol "Masuk Panel" tetap ada,
     dan itulah satu-satunya tautan yang benar-benar penting di sini. Lebih jujur
     daripada memasang menu hamburger yang hanya berisi empat anchor. */
  .lp-nav__links { display: none; }
}

@media (max-width: 639px) {
  .lp-wrap { padding: 0 18px; }
  .lp-hero { padding: 56px 0 64px; }
  .lp-section { padding: 60px 0; }
  .lp-features, .lp-flow, .lp-roles, .lp-stats__grid, .lp-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .lp-head { margin-bottom: 36px; }
  .lp-hero__cta .lp-btn, .lp-cta__actions .lp-btn { width: 100%; }
  .lp-preview__body { grid-template-columns: 84px minmax(0, 1fr); }
  .lp-nav__inner { gap: 12px; }
  /* Pemilih bahasa dilepas dari navbar di ponsel — ruangnya habis untuk tombol
     masuk. Salinannya tetap ada di footer. */
  .lp-nav__actions .locale-switch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lp-body *, .lp-body *::before, .lp-body *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important;
  }
}
