:root {
  --bg: #040a14;
  --bg-soft: #09172b;
  --bg-card: rgba(10, 24, 42, 0.78);
  --line: rgba(170, 202, 236, 0.2);
  --text: #eef5ff;
  --muted: #a9bfd9;
  --gold: #ffc96f;
  --gold-strong: #ffb833;
  --cyan: #37d8ff;
  --danger: #ff7676;
  --ok: #4ee38f;
  --shadow: 0 25px 55px rgba(4, 13, 25, 0.45);
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 100% 0%, rgba(55, 216, 255, 0.14), transparent 58%),
    radial-gradient(900px 500px at 0% 100%, rgba(255, 201, 111, 0.12), transparent 55%),
    linear-gradient(130deg, #030811 0%, #071225 45%, #061325 100%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.48) 1px, transparent 0);
  background-size: 3px 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 5vw;
  background: rgba(7, 15, 29, 0.75);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

.brand small {
  color: var(--muted);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  font-size: 0.82rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
  border-color: rgba(55, 216, 255, 0.5);
}

main {
  display: grid;
  gap: 58px;
  padding: 34px 5vw 60px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 16px;
}

.hero-copy,
.hero-card,
.catalog,
.course-card,
.step-card,
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card,
.catalog {
  border-radius: var(--radius-lg);
}

.hero-copy {
  padding: clamp(24px, 4vw, 44px);
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -110px;
  top: -95px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 216, 255, 0.27), transparent 66%);
  filter: blur(10px);
}

.eyebrow {
  display: inline-block;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 8px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 1.1;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin-bottom: 10px;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy p + p {
  margin-top: 8px;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.72rem 1.05rem;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-gold {
  color: #171003;
  background: linear-gradient(115deg, var(--gold-strong), var(--gold));
  box-shadow: 0 9px 28px rgba(255, 184, 51, 0.3);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(10, 22, 38, 0.66);
}

.hero-card {
  padding: 24px;
  display: grid;
  gap: 10px;
  align-content: center;
}

.hero-card h3 {
  font-size: 1.55rem;
}

.hero-card ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.hero-card li {
  color: var(--muted);
}

.hero-note {
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.academy-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.academy-pillars article {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 14px;
}

.academy-pillars h3 {
  font-size: 1.34rem;
  margin-bottom: 6px;
}

.head p {
  max-width: 720px;
  margin-top: 6px;
}

.catalog {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.head h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  margin-top: 4px;
}

.filters {
  display: grid;
  gap: 10px;
}

#searchInput {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 16, 28, 0.9);
  border-radius: 999px;
  color: var(--text);
  padding: 0.78rem 1rem;
}

#searchInput:focus {
  outline: none;
  border-color: rgba(55, 216, 255, 0.55);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 22, 38, 0.85);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.86rem;
  cursor: pointer;
}

.chip.is-active {
  color: #1e1200;
  border-color: transparent;
  background: linear-gradient(120deg, var(--gold), #ffdca2);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.course-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.course-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.course-card:hover,
.course-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(55, 216, 255, 0.55);
}

.course-card:hover img,
.course-card:focus-within img {
  transform: scale(1.03);
}

.course-body {
  padding: 0 12px 12px;
  display: grid;
  gap: 8px;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.2rem 0.55rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.course-body h3 {
  font-size: 1.28rem;
  line-height: 1.1;
}

.course-body p {
  font-size: 0.9rem;
}

.price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
}

.old-price {
  color: rgba(173, 194, 216, 0.85);
  font-size: 0.8rem;
  text-decoration: line-through;
}

.price {
  color: var(--gold);
  font-size: 1.08rem;
  font-weight: 800;
}

.course-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

.store-assurance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.store-assurance article {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 14px;
}

.store-assurance h3 {
  font-size: 1.28rem;
  margin-bottom: 6px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(2, 8, 15, 0.74);
}

.hidden {
  display: none !important;
}

.drawer {
  position: fixed;
  top: 0;
  right: -560px;
  width: min(560px, 100%);
  height: 100vh;
  z-index: 50;
  background: linear-gradient(145deg, rgba(5, 13, 23, 0.98), rgba(8, 19, 35, 0.98));
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.4);
  transition: right 0.28s ease;
  display: grid;
  grid-template-rows: auto 1fr;
}

.drawer.is-open {
  right: 0;
}

.drawer-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.drawer-head h3 {
  font-size: 1.45rem;
}

.drawer-head p {
  font-size: 0.82rem;
}

.close-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 19, 33, 0.85);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.drawer-body {
  padding: 16px;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.summary-card {
  border-radius: var(--radius-md);
  padding: 10px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.summary-card img {
  width: 100%;
  height: 100%;
  min-height: 90px;
  object-fit: cover;
  border-radius: 10px;
}

.summary-card h4 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.summary-card strong {
  color: var(--gold);
}

.step-card {
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.step-card h4 {
  font-size: 1.22rem;
}

label {
  color: var(--muted);
  font-size: 0.8rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 22, 38, 0.95);
  color: var(--text);
  padding: 0.64rem 0.72rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(55, 216, 255, 0.6);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.payment-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pay-tab {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.56rem;
  background: rgba(8, 20, 34, 0.85);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.pay-tab.is-active {
  color: #181000;
  border-color: transparent;
  background: linear-gradient(120deg, var(--gold), #ffdc9d);
}

.full {
  width: 100%;
}

.inline-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qr {
  width: 180px;
  border-radius: 12px;
  border: 1px solid var(--line);
  justify-self: center;
}

.info {
  color: var(--muted);
  font-size: 0.84rem;
}

.error {
  color: #ffcbcb;
  min-height: 18px;
  margin: 0;
  font-size: 0.82rem;
}

.success {
  border-color: rgba(78, 227, 143, 0.45);
  background: linear-gradient(145deg, rgba(11, 31, 42, 0.95), rgba(6, 32, 26, 0.95));
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.access-grid > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: rgba(7, 21, 35, 0.8);
}

.access-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 3px;
}

.access-grid strong {
  font-size: 0.84rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1180px) {
  .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .academy-pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .store-assurance {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: start;
  }

  .topnav {
    width: 100%;
  }

  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .academy-pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .course-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    grid-template-columns: 1fr;
  }

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