/* EliLearn Apps - brand palette sampled from the original logo */
:root {
  --red: #BD0000;
  --red-dark: #8E0000;
  --red-soft: #FCEBEB;
  --link: #BD0000;
  --blue: #28A6DE;
  --orange: #F19537;
  --slate: #455865;

  --bg: #FFFFFF;
  --bg-alt: #F7F8FA;
  --card: #FFFFFF;
  --text: #1B2227;
  --text-muted: #5C6B76;
  --border: #E3E7EB;
  --shadow: 0 1px 2px rgba(27,34,39,.06), 0 8px 24px rgba(27,34,39,.06);
  --radius: 14px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181B;
    --bg-alt: #1B2024;
    --card: #1E2429;
    --text: #ECF0F3;
    --text-muted: #A3B0BA;
    --border: #2C343A;
    --red-soft: #2A1618;
    --link: #FF7A70;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #14181B;
  --bg-alt: #1B2024;
  --card: #1E2429;
  --text: #ECF0F3;
  --text-muted: #A3B0BA;
  --border: #2C343A;
  --red-soft: #2A1618;
  --link: #FF7A70;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 66px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; border-radius: 6px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--bg-alt); }
.nav a.current { color: var(--link); background: var(--red-soft); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff; padding: 84px 0 92px; text-align: center;
}
.hero h1 {
  margin: 0 auto 18px; max-width: 16ch;
  font-size: clamp(2rem, 5.2vw, 3.4rem); line-height: 1.12;
  font-weight: 800; letter-spacing: -.02em;
}
.hero p {
  margin: 0 auto; max-width: 62ch; font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.92);
}
.hero .cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: #fff; color: var(--red); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 {
  margin: 0 0 10px; font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 750; letter-spacing: -.015em;
}
.section-head p { margin: 0 auto; max-width: 58ch; color: var(--text-muted); }

/* ---------- app cards ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card-media {
  position: relative; background: var(--bg-alt); border-bottom: 1px solid var(--border);
  height: 210px; flex: 0 0 auto; overflow: hidden;
}
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 20px; border-radius: 10px;
}
.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.card-body h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; }
.card-body p { margin: 0 0 16px; color: var(--text-muted); font-size: 15px; }
.card-body .btn { margin-top: auto; padding: 9px 18px; font-size: 14px; background: var(--red); color: #fff; }

/* ---------- team ---------- */
.team {
  display: grid; gap: 34px; align-items: center;
  grid-template-columns: 220px 1fr; max-width: 820px; margin: 0 auto;
}
.team img {
  width: 220px; height: 220px; object-fit: cover; object-position: center 20%;
  border-radius: 50%; border: 5px solid var(--card); box-shadow: var(--shadow);
}
.team h3 { margin: 0 0 4px; font-size: 1.3rem; }
.team .role { margin: 0 0 14px; color: var(--link); font-weight: 600; font-size: 15px; }
.team p { margin: 0; color: var(--text-muted); }
@media (max-width: 660px) {
  .team { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.contact-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; text-align: center; box-shadow: var(--shadow);
}
.contact-item .ic { font-size: 26px; line-height: 1; margin-bottom: 12px; }
.contact-item .lbl {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); font-weight: 700; margin-bottom: 6px;
}
.contact-item a { color: var(--text); text-decoration: none; font-weight: 600; word-break: break-word; }
.contact-item a:hover { color: var(--link); text-decoration: underline; }
.contact-item span.static { font-weight: 600; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-alt);
  padding: 34px 0; color: var(--text-muted); font-size: 14px;
}
.site-footer .wrap {
  display: flex; gap: 14px; justify-content: space-between;
  align-items: center; flex-wrap: wrap;
}
.site-footer a { color: var(--text-muted); }

/* ---------- legal / policy page ---------- */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 54px 0; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.02em; }
.page-head .updated { margin: 0; color: var(--text-muted); font-size: 15px; }
.legal { max-width: 760px; margin: 0 auto; padding: 52px 20px 76px; }
.legal h2 {
  margin: 44px 0 12px; padding-top: 22px; border-top: 1px solid var(--border);
  font-size: 1.42rem; letter-spacing: -.01em;
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal h3 { margin: 30px 0 10px; font-size: 1.13rem; }
.legal h4 { margin: 22px 0 8px; font-size: 1rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; }
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 18px; padding-left: 22px; }
.legal li { margin-bottom: 10px; }
.legal a { word-break: break-word; }
