/*
Theme Name: FYD Aetheria Learn
Theme URI: https://fyd.local/themes/fyd-aetheria-learn
Author: OpenAI Codex
Author URI: https://openai.com
Description: Aetheria-inspired WordPress theme for a custom homepage-first build.
Version: 0.4.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: fyd-mobile-learn
*/

:root {
  --bg: #07111f;
  --bg-soft: #101c2e;
  --panel: rgba(16, 26, 43, 0.76);
  --panel-strong: rgba(18, 30, 48, 0.92);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f6efe2;
  --muted: #bfc5d3;
  --gold: #ffd978;
  --cyan: #8ce9ff;
  --mint: #b8f4bf;
  --rose: #ffb0cb;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 28px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(94, 201, 255, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 168, 204, 0.16), transparent 28%),
    linear-gradient(135deg, #07111f 0%, #162238 52%, #251424 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

body.admin-bar .nav {
  top: 32px;
}

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(7, 12, 24, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 30%, #fff8cb 0 14%, transparent 15%),
    conic-gradient(from 15deg, #ffcf70, #8ce9ff, #ff9dc2, #ffcf70);
  box-shadow: 0 0 28px rgba(255, 217, 120, 0.24);
  flex-shrink: 0;
}

.brand-mark::after {
  content: "✦";
  color: #132136;
  font-size: 22px;
  font-weight: 900;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.97rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a,
.mobile-menu-links a {
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover,
.mobile-menu-links a:hover,
.mobile-menu-links a:focus-visible {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.menu-toggle:hover,
.btn:focus-visible,
.menu-toggle:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  color: #101828;
  background: linear-gradient(135deg, #ffd977, #fff0b3);
  box-shadow: 0 18px 36px rgba(255, 217, 120, 0.18);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: grid;
  align-items: start;
  background: transparent;
  padding: 12px 14px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  width: min(100%, 420px);
  margin-left: auto;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(18, 29, 46, 0.98), rgba(9, 15, 27, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  padding: 18px;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateY(0);
}

.mobile-menu-links {
  display: grid;
  gap: 8px;
}

.mobile-menu-links a {
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.mobile-menu-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.page-shell {
  position: relative;
  z-index: 1;
}

section {
  padding: 72px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 100px);
  padding-top: 44px;
}

.eyebrow,
.section-kicker,
.dialogue-box .name {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1,
.section-head h2,
.cta h2 {
  margin: 18px 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3rem, 9vw, 6.15rem);
  max-width: 10ch;
}

.gradient-text {
  background: linear-gradient(120deg, #ffd978, #ebf297 48%, #8ce9ff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description,
.section-head p,
.card p,
.chapter-content p,
.cta p,
.footer,
.dialogue-box p {
  color: var(--muted);
}

.hero-description,
.section-head p,
.cta p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.stats-grid,
.feature-grid,
.characters-grid,
.missions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.stat-card,
.card,
.chapter-preview,
.quest-box,
.dialogue-box,
.cta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    radial-gradient(circle at 50% 0%, rgba(140, 233, 255, 0.22), transparent 34%);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 20px;
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.showcase {
  position: relative;
  min-height: 700px;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(11, 17, 29, 0.08), rgba(7, 11, 22, 0.86)),
    radial-gradient(circle at 34% 30%, #ffffff, #fff4b8 10%, #8ce9ff 38%, rgba(140, 233, 255, 0.08) 70%);
  box-shadow: var(--shadow);
}

.quest-box,
.dialogue-box {
  position: absolute;
  backdrop-filter: blur(18px);
}

.quest-box {
  left: 28px;
  top: 28px;
  width: min(340px, calc(100% - 56px));
  padding: 22px;
}

.quest-box h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.quest-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quest-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.quest-item b {
  color: var(--text);
}

.orb {
  position: absolute;
  top: 210px;
  left: 50%;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95), transparent 26%),
    radial-gradient(circle at 50% 44%, rgba(255, 217, 120, 0.42), transparent 44%),
    linear-gradient(135deg, rgba(140, 233, 255, 0.86), rgba(255, 176, 203, 0.7));
  box-shadow: 0 0 60px rgba(140, 233, 255, 0.3);
}

.preview-character {
  position: absolute;
  right: 42px;
  bottom: 126px;
  width: 228px;
  height: 320px;
}

.cape,
.body,
.head,
.hair {
  position: absolute;
}

.cape {
  left: 48px;
  bottom: 26px;
  width: 130px;
  height: 180px;
  border-radius: 70px 70px 20px 20px;
  background: linear-gradient(180deg, #2c1720, #0c0710);
  transform: skewX(-8deg);
}

.body {
  left: 70px;
  bottom: 40px;
  width: 92px;
  height: 170px;
  border-radius: 44px 44px 18px 18px;
  background: linear-gradient(180deg, #ffe5bd, #d99f77);
  z-index: 2;
}

.head {
  top: 42px;
  left: 76px;
  width: 78px;
  height: 90px;
  border-radius: 42px 42px 36px 36px;
  background: linear-gradient(180deg, #fff6d8, #78dfff 48%, #26466b);
  z-index: 3;
}

.hair {
  top: 18px;
  left: 56px;
  width: 118px;
  height: 132px;
  border-radius: 52px 52px 46px 46px;
  background: linear-gradient(180deg, rgba(255, 143, 184, 0.92), rgba(80, 54, 140, 0.78));
  z-index: 1;
}

.eye {
  position: absolute;
  top: 44px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #10203a;
}

.eye.left {
  left: 20px;
}

.eye.right {
  right: 20px;
}

.dialogue-box {
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 20px 22px;
}

.dialogue-box .name {
  margin-bottom: 12px;
}

.dialogue-box p {
  margin: 0;
  max-width: 42ch;
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-kicker {
  margin-bottom: 12px;
}

.feature-grid,
.characters-grid,
.missions-grid {
  margin-top: 0;
}

.card {
  padding: 24px;
}

.card h3,
.chapter-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.28rem;
}

.card p {
  margin-bottom: 0;
}

.card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border-radius: 18px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(140, 233, 255, 0.58));
}

.world-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 18px;
}

.chapter-list {
  display: grid;
  gap: 18px;
}

.chapter-card {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.chapter-card:hover,
.chapter-card.active {
  transform: translateY(-2px);
  border-color: rgba(255, 217, 120, 0.44);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.chapter-preview {
  padding: 24px;
}

.chapter-map {
  position: relative;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 23% 28%, rgba(140, 233, 255, 0.28), transparent 13%),
    radial-gradient(circle at 78% 34%, rgba(255, 217, 120, 0.24), transparent 14%),
    radial-gradient(circle at 54% 78%, rgba(255, 176, 203, 0.22), transparent 18%),
    linear-gradient(135deg, rgba(13, 20, 36, 0.96), rgba(18, 42, 69, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chapter-path {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 58%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--rose));
}

.chapter-node {
  position: absolute;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #07111f;
  background: linear-gradient(135deg, var(--gold), #fff0b3);
  box-shadow: 0 10px 30px rgba(255, 217, 120, 0.22);
}

.chapter-node:nth-child(2) {
  left: 14%;
  top: 58%;
}

.chapter-node:nth-child(3) {
  left: 38%;
  top: 43%;
}

.chapter-node:nth-child(4) {
  left: 64%;
  top: 34%;
}

.chapter-node:nth-child(5) {
  left: 79%;
  top: 18%;
}

.chapter-content {
  padding-top: 20px;
}

.portrait {
  height: 220px;
  border-radius: 22px;
  margin-bottom: 20px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.95), transparent 13%),
    radial-gradient(circle at 50% 44%, rgba(255, 217, 120, 0.42), transparent 18%),
    linear-gradient(135deg, rgba(140, 233, 255, 0.18), rgba(255, 176, 203, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.missions-grid .card {
  position: relative;
  overflow: hidden;
}

.progress {
  width: 100%;
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
}

.cta {
  position: relative;
  margin-bottom: 84px;
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(255, 217, 120, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(18, 29, 46, 0.98), rgba(9, 15, 27, 0.98));
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 40px;
  font-size: 0.95rem;
}

.entry-shell {
  width: min(900px, calc(100% - 32px));
  margin: 56px auto 80px;
  padding: 36px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(18, 29, 46, 0.96), rgba(9, 15, 27, 0.94));
  box-shadow: var(--shadow);
}

.entry-shell h1,
.entry-shell h2,
.entry-shell h3 {
  font-family: "Space Grotesk", sans-serif;
}

.entry-shell p,
.entry-shell li,
.entry-shell blockquote {
  color: var(--muted);
}

@media (max-width: 900px) {
  body.admin-bar .nav {
    top: 46px;
  }

  .nav-inner {
    min-height: 74px;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
  }

  .world-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .feature-grid,
  .characters-grid,
  .missions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-inner,
  .page-shell {
    width: min(100%, calc(100% - 20px));
  }

  .brand-mark {
    display: none;
  }

  .brand-title {
    font-size: 1.06rem;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-subtitle {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .showcase {
    min-height: 620px;
    padding: 14px;
  }

  .quest-box {
    left: 24px;
    top: 24px;
    width: calc(100% - 48px);
  }

  .orb {
    top: 232px;
    left: 50%;
    width: 106px;
    height: 106px;
  }

  .preview-character {
    right: 20px;
    bottom: 118px;
    transform: scale(0.8);
    transform-origin: bottom right;
  }

  .dialogue-box {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  .dialogue-box p {
    max-width: 100%;
  }

  section {
    padding: 54px 0;
  }

  .cta {
    margin-bottom: 64px;
  }

  .footer {
    justify-content: center;
    text-align: center;
  }

  .entry-shell {
    padding: 28px 20px;
  }
}
