:root {
  --navy: #07162f;
  --navy-2: #0c2147;
  --navy-3: #102b5a;
  --gold: #d7b46a;
  --gold-2: #f2d992;
  --white: #ffffff;
  --muted: #cbd5e1;
  --ink: #132238;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.13);
  --border: rgba(215, 180, 106, 0.36);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  --transition: 280ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", Arial, sans-serif;
  background: var(--navy);
  color: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.page-pattern {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 16%, rgba(215, 180, 106, 0.16), transparent 26rem),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.07), transparent 24rem),
    linear-gradient(135deg, var(--navy), #051022 55%, var(--navy-2));
}

.page-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(30deg, rgba(215, 180, 106, 0.35) 12%, transparent 12.5%, transparent 87%, rgba(215, 180, 106, 0.35) 87.5%, rgba(215, 180, 106, 0.35)),
    linear-gradient(150deg, rgba(215, 180, 106, 0.35) 12%, transparent 12.5%, transparent 87%, rgba(215, 180, 106, 0.35) 87.5%, rgba(215, 180, 106, 0.35)),
    linear-gradient(30deg, rgba(215, 180, 106, 0.35) 12%, transparent 12.5%, transparent 87%, rgba(215, 180, 106, 0.35) 87.5%, rgba(215, 180, 106, 0.35)),
    linear-gradient(150deg, rgba(215, 180, 106, 0.35) 12%, transparent 12.5%, transparent 87%, rgba(215, 180, 106, 0.35) 87.5%, rgba(215, 180, 106, 0.35));
  background-position: 0 0, 0 0, 42px 74px, 42px 74px;
  background-size: 84px 148px;
}

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

.section {
  position: relative;
  padding: 96px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 22, 47, 0.72);
  border-bottom: 1px solid rgba(215, 180, 106, 0.18);
  backdrop-filter: blur(18px);
}

.navbar {
  width: min(1240px, calc(100% - 28px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(215, 180, 106, 0.22));
}

.brand-text {
  display: grid;
  line-height: 1.35;
}

.brand-text strong {
  font-size: 0.98rem;
  font-weight: 800;
}

.brand-text small {
  color: var(--gold-2);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 12px;
  left: 12px;
  bottom: 5px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-2);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--gold-2);
  transition: var(--transition);
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: center;
  padding-top: 86px;
}

.hero-frame {
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(215, 180, 106, 0.32);
  pointer-events: none;
  opacity: 0.75;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.75;
}

.hero-frame::before {
  top: -1px;
  right: -1px;
  border-width: 3px 3px 0 0;
}

.hero-frame::after {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 3px 3px;
}

.hero-orbit {
  position: absolute;
  left: 8%;
  top: 18%;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(215, 180, 106, 0.24);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}

.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px dashed rgba(215, 180, 106, 0.35);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 60px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-2);
  font-weight: 800;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  margin: 22px 0 10px;
  font-size: clamp(2.6rem, 7vw, 6.3rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  color: var(--muted);
  font-weight: 700;
}

.hero-subtitle span {
  color: var(--gold-2);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 34px 0;
}

.hero-meta div {
  min-width: 180px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.hero-meta strong,
.hero-meta small {
  display: block;
}

.hero-meta strong {
  color: var(--white);
  font-size: 1.1rem;
}

.hero-meta small {
  color: var(--gold-2);
}

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

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  color: #07162f;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 14px 32px rgba(215, 180, 106, 0.24);
}

.btn-outline {
  color: var(--gold-2);
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.visual-card {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at 50% 38%, rgba(215, 180, 106, 0.18), transparent 18rem);
  box-shadow: var(--shadow);
}

.visual-card::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(215, 180, 106, 0.34);
  border-radius: 22px;
}

.visual-card p {
  position: absolute;
  right: 32px;
  left: 32px;
  bottom: 28px;
  margin: 0;
  color: var(--gold-2);
  text-align: center;
  font-weight: 800;
}

.hero-family-image {
  position: relative;
  z-index: 2;
  width: min(82%, 390px);
  max-height: 370px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(215, 180, 106, 0.2));
  animation: float 5s ease-in-out infinite;
}

.section-heading h2 {
  margin: 12px 0 0;
  max-width: 780px;
  font-size: clamp(1.8rem, 3.8vw, 3.3rem);
  line-height: 1.25;
}

.section-heading p {
  color: var(--muted);
  max-width: 620px;
}

.center {
  text-align: center;
}

.center h2 {
  margin-inline: auto;
}

.center .section-kicker::before {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: start;
}

.about-panel,
.rules-list,
.registration-form,
.contact-panel,
.premium-card,
.track-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.about-panel {
  padding: 34px;
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.86);
}

.about-panel p {
  margin: 0;
}

.about-panel p + p {
  margin-top: 18px;
}

.stats-band {
  padding: 42px 0;
  background: linear-gradient(90deg, rgba(215, 180, 106, 0.14), rgba(255, 255, 255, 0.04), rgba(215, 180, 106, 0.14));
  border-block: 1px solid rgba(215, 180, 106, 0.2);
}

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

.stat {
  min-height: 130px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid rgba(215, 180, 106, 0.24);
  border-radius: var(--radius);
  background: rgba(7, 22, 47, 0.42);
  text-align: center;
}

.stat span {
  color: var(--gold-2);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.stat small {
  color: var(--muted);
  font-weight: 700;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 42px;
}

.premium-card {
  position: relative;
  min-height: 220px;
  padding: 28px;
  border-radius: 20px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.premium-card::after {
  content: "";
  position: absolute;
  inset: auto 24px 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.premium-card:hover,
.track-card:hover {
  transform: translateY(-8px);
  border-color: rgba(242, 217, 146, 0.8);
}

.premium-card:hover::after {
  opacity: 1;
}

.goal-card span {
  color: rgba(242, 217, 146, 0.26);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
}

.goal-card p {
  position: relative;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.tracks {
  background: rgba(255, 255, 255, 0.025);
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 42px;
}

.track-card {
  position: relative;
  min-height: 470px;
  padding: 30px;
  border-radius: 24px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.track-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(215, 180, 106, 0.2);
  border-radius: 18px;
  pointer-events: none;
}

.track-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-weight: 900;
  font-size: 1.4rem;
}

.track-card h3 {
  margin: 0 0 18px;
  color: var(--gold-2);
  font-size: 1.3rem;
  line-height: 1.45;
}

.track-card ul {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.track-card li {
  position: relative;
  padding-right: 22px;
  color: rgba(255, 255, 255, 0.86);
}

.track-card li::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(215, 180, 106, 0.8);
}

.rules-list {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
}

.rule-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(7, 22, 47, 0.42);
  transition: background var(--transition), transform var(--transition);
}

.rule-item:hover {
  transform: translateX(-5px);
  background: rgba(255, 255, 255, 0.08);
}

.rule-item span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-2);
  font-weight: 900;
}

.rule-item p {
  margin: 0;
}

.timeline {
  position: relative;
  width: min(900px, 100%);
  margin: 52px auto 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 50%;
  width: 2px;
  background: linear-gradient(var(--gold), rgba(215, 180, 106, 0.08));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 28px;
}

.timeline-item:nth-child(even) > div {
  grid-column: 1;
  text-align: left;
}

.timeline-item:nth-child(odd) > div {
  grid-column: 2;
}

.timeline-dot {
  position: absolute;
  top: 22px;
  right: calc(50% - 10px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 8px rgba(215, 180, 106, 0.18), 0 0 26px rgba(215, 180, 106, 0.55);
}

.timeline-item > div {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.timeline time {
  color: var(--gold-2);
  font-weight: 900;
}

.timeline h3 {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.registration {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.035), transparent);
}

.registration-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 50px;
  align-items: start;
}

.registration-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--gold-2);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(215, 180, 106, 0.28);
  border-radius: 14px;
  background: rgba(7, 22, 47, 0.62);
  color: var(--white);
  padding: 13px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold-2);
  background: rgba(7, 22, 47, 0.82);
  box-shadow: 0 0 0 4px rgba(215, 180, 106, 0.12);
}

textarea {
  resize: vertical;
}

.file-label input {
  cursor: pointer;
}

.form-submit {
  width: fit-content;
  min-width: 190px;
  border: 0;
}

.form-note {
  min-height: 28px;
  margin: 0;
  color: var(--gold-2);
  font-weight: 700;
}

.contact-panel {
  padding: 34px;
  border-radius: 26px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.contact-grid a,
.contact-grid div {
  min-height: 136px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(215, 180, 106, 0.25);
  border-radius: 18px;
  background: rgba(7, 22, 47, 0.46);
  transition: transform var(--transition), border-color var(--transition);
}

.contact-grid a:hover,
.contact-grid div:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.contact-grid span {
  color: var(--gold-2);
  font-weight: 800;
}

.contact-grid strong {
  overflow-wrap: anywhere;
}

.footer {
  padding: 42px 0 24px;
  border-top: 1px solid rgba(215, 180, 106, 0.2);
  background: rgba(3, 9, 20, 0.55);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer h2 {
  margin: 0 0 8px;
  color: var(--gold-2);
}

.footer p {
  margin: 4px 0;
  color: var(--muted);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.64);
  text-align: center;
  font-size: 0.92rem;
}

.back-to-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 120ms;
}

.delay-2 {
  transition-delay: 220ms;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@media (max-width: 1040px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 78px;
    right: 16px;
    left: 16px;
    display: grid;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(7, 22, 47, 0.96);
    box-shadow: var(--shadow);
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hero-grid,
  .split-section,
  .registration-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

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

@media (max-width: 720px) {
  .section {
    padding: 70px 0;
  }

  .navbar {
    min-height: 70px;
  }

  .brand-text strong {
    font-size: 0.82rem;
  }

  .brand-text small {
    font-size: 0.72rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .nav-links {
    top: 70px;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-frame {
    inset: 16px;
  }

  .hero-actions,
  .hero-meta {
    display: grid;
  }

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

  .visual-card {
    min-height: 430px;
    border-radius: 20px;
  }

  .hero-family-image {
    width: min(84%, 300px);
    max-height: 300px;
  }

  .goals-grid,
  .tracks-grid,
  .contact-grid,
  .stats-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .track-card {
    min-height: auto;
  }

  .timeline::before {
    right: 10px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) > div,
  .timeline-item:nth-child(odd) > div {
    display: block;
    text-align: right;
    padding-right: 24px;
  }

  .timeline-dot {
    right: 0;
  }

  .footer-grid {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
