/* ============================================================
   LEARNIME.COM — shared stylesheet for all pages
   Deep-space dark theme · warm accents · phone + desktop
   ============================================================ */

:root {
  --bg:        #0a0e1c;   /* deep space background */
  --bg-soft:   #131a33;   /* slightly lighter panels */
  --ink:       #f2efe9;   /* main text */
  --muted:     #b9b3c9;   /* secondary text */
  --amber:     #ffc266;
  --coral:     #ff8a70;
  --gold:      #ffd76e;
  --turquoise: #5fe3d0;
  --maxwidth:  920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.06rem;
  line-height: 1.65;
}

/* ---------- HEADER ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 28, 0.95);
  border-bottom: 1px solid #232a4a;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--gold);
  margin-right: auto;
}

/* pure-CSS phone menu (no JavaScript) */
.nav-toggle { display: none; }

.nav-toggle-label {
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
  padding: 0 0.4rem;
  user-select: none;
}

.nav-menu {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 0.4rem;
}

.nav-toggle:checked ~ .nav-menu { display: flex; }

.nav-menu a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
}

.nav-menu a:hover,
.nav-menu a:focus { background: var(--bg-soft); color: var(--gold); }

.nav-menu a.current { color: var(--turquoise); font-weight: 700; }

.nav-menu a.cta {
  background: linear-gradient(90deg, var(--coral), var(--amber));
  color: #1a1030;
  font-weight: 800;
  text-align: center;
  margin-top: 0.3rem;
}

/* desktop: menu always visible in one row */
@media (min-width: 940px) {
  .nav-toggle-label { display: none; }
  .nav-menu {
    display: flex !important;
    width: auto;
    flex-direction: row;
    align-items: center;
    padding-top: 0;
  }
  .nav-menu a.cta { margin-top: 0; margin-left: 0.4rem; }
}

/* ---------- LAYOUT ---------- */

main {
  max-width: var(--maxwidth);
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem;
}

.section { margin: 3rem 0; }

h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.2;
  margin: 0.4rem 0;
  background: linear-gradient(90deg, var(--gold), var(--coral), var(--turquoise));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  color: var(--amber);
  margin: 0 0 0.8rem;
}

h3 { color: var(--turquoise); margin: 1.4rem 0 0.5rem; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--turquoise);
  font-size: 0.85rem;
}

.lead { font-size: 1.15rem; color: var(--ink); }

.note { color: var(--muted); font-size: 0.95rem; }

blockquote {
  border-left: 4px solid var(--coral);
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
  background: var(--bg-soft);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  font-style: italic;
}

/* ---------- IMAGES ---------- */

.figure { margin: 1.5rem 0; }

.figure img,
.hero-img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  border: 1px solid #232a4a;
}

.figure figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  padding-top: 0.5rem;
  font-style: italic;
}

/* ---------- BUTTONS ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.2rem 0; }

.btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--gold);
  border: 1px solid #2c3560;
}

.btn:hover, .btn:focus { border-color: var(--gold); }

.btn.primary {
  background: linear-gradient(90deg, var(--coral), var(--amber));
  color: #1a1030;
  border: none;
}

/* ---------- SERIES CARDS (home page) ---------- */

.cards { display: grid; gap: 1.3rem; grid-template-columns: 1fr; margin: 1.5rem 0; }

@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--bg-soft);
  border: 1px solid #232a4a;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img { width: 100%; height: auto; display: block; }

.card .card-body { padding: 1rem 1.1rem 1.3rem; display: flex; flex-direction: column; flex: 1; }

.card h3 { margin: 0 0 0.2rem; }

.card .genre { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.6rem; }

.card p { flex: 1; margin: 0 0 1rem; }

/* ---------- "EXPLAIN THAT WORD" (tap-based, built into browser) ---------- */

details.explain {
  display: inline;
}

details.explain summary {
  display: inline;
  cursor: pointer;
  color: var(--turquoise);
  text-decoration: underline dotted;
  list-style: none;
}

details.explain summary::-webkit-details-marker { display: none; }

details.explain .explain-text {
  display: block;
  background: var(--bg-soft);
  border: 1px solid #2c3560;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  margin: 0.4rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- PROGRESS DISPLAYS ---------- */

.progress {
  background: var(--bg-soft);
  border: 1px solid #232a4a;
  border-radius: 14px;
  padding: 1rem 1.3rem;
  margin: 1.2rem 0;
}

.progress ul { list-style: none; padding: 0; margin: 0.4rem 0; }

.progress li { padding: 0.35rem 0; border-bottom: 1px dashed #232a4a; }

.progress li:last-child { border-bottom: none; }

/* ---------- SONGS / YOUTUBE ---------- */

.video-wrap {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid #232a4a;
  border-radius: 14px;
  overflow: hidden;
  margin: 0.8rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.video-wrap iframe { width: 100%; height: 100%; border: 0; }

.lyrics {
  background: var(--bg-soft);
  border: 1px solid #232a4a;
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin: 1rem 0 2rem;
  line-height: 1.85;
  color: var(--muted);
  font-size: 0.95rem;
}

.lyrics h4 {
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.2rem 0 0.3rem;
}

.lyrics h4:first-child { margin-top: 0; }

/* ---------- FOOTER ---------- */

.site-footer {
  border-top: 1px solid #232a4a;
  background: #070a15;
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.9;
}

.site-footer .foot-title { color: var(--gold); font-weight: 800; }

.site-footer .foot-quote { color: var(--turquoise); font-style: italic; }

.site-footer a { color: var(--amber); text-decoration: none; }

.site-footer a:hover, .site-footer a:focus { text-decoration: underline; }

/* ---------- FOOTER SOCIAL ICONS ---------- */

.footer-social {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  margin: 20px 0 24px;
}
.social-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  outline: none;
}
.social-icon img {
  width: 34px;
  height: 34px;
  display: block;
  transition: transform 0.18s ease;
}
.social-icon:hover img,
.social-icon:focus-visible img {
  transform: translateY(-3px) scale(1.14);
}
.social-label {
  display: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

/* Desktop / mouse: tooltip bubble on hover or keyboard focus */
@media (hover: hover) {
  .social-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--bg-soft);
    color: var(--ink);
    padding: 6px 11px;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
  }
  .social-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 6px solid transparent;
    border-top-color: var(--bg-soft);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
  }
  .social-icon:hover::after,
  .social-icon:focus-visible::after,
  .social-icon:hover::before,
  .social-icon:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Touch / smartphones: show label under every icon */
@media (hover: none) {
  .social-label {
    display: block;
  }
  .footer-social {
    gap: 16px 22px;
  }
}