/* ===========================
   DREAMY - Design System
   =========================== */

:root {
  --color-primary: #1878EA;
  --color-background: #010713;
  --color-bg-secondary: #20223B;
  --color-secondary: #061939;
  --color-secondary-bright: #07245C;
  --color-btn-gradient-light: #2798F4;
  --color-btn-gradient-dark: #045BA2;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-tertiary: rgba(255, 255, 255, 0.38);
  --color-border: rgba(255, 255, 255, 0.54);
  --font-family: 'Nunito', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* ===========================
   Reset & Base
   =========================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

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

ul {
  list-style: none;
}

/* ===========================
   Utility
   =========================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  line-height: 1.3;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-btn-gradient-light), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--color-btn-gradient-light), var(--color-btn-gradient-dark));
  color: #fff;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(24, 120, 234, 0.4);
}

/* Scroll fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Starfield Background
   =========================== */

.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.starfield::before,
.starfield::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    25px 50px 0 0 rgba(255,255,255,0.3),
    100px 120px 0 0 rgba(255,255,255,0.2),
    200px 80px 0 0 rgba(255,255,255,0.4),
    350px 200px 0 0 rgba(255,255,255,0.15),
    500px 50px 0 0 rgba(255,255,255,0.25),
    600px 300px 0 0 rgba(255,255,255,0.3),
    750px 150px 0 0 rgba(255,255,255,0.2),
    900px 250px 0 0 rgba(255,255,255,0.35),
    1050px 80px 0 0 rgba(255,255,255,0.15),
    1200px 350px 0 0 rgba(255,255,255,0.25),
    150px 400px 0 0 rgba(255,255,255,0.2),
    300px 500px 0 0 rgba(255,255,255,0.3),
    450px 380px 0 0 rgba(255,255,255,0.15),
    650px 480px 0 0 rgba(255,255,255,0.25),
    800px 420px 0 0 rgba(255,255,255,0.4),
    950px 520px 0 0 rgba(255,255,255,0.2),
    1100px 450px 0 0 rgba(255,255,255,0.3),
    50px 600px 0 0 rgba(255,255,255,0.15),
    250px 650px 0 0 rgba(255,255,255,0.25),
    550px 620px 0 0 rgba(255,255,255,0.2);
  animation: twinkle 4s ease-in-out infinite alternate;
}

.starfield::after {
  width: 1px;
  height: 1px;
  box-shadow:
    80px 30px 0 0 rgba(255,255,255,0.2),
    160px 180px 0 0 rgba(255,255,255,0.15),
    280px 40px 0 0 rgba(255,255,255,0.3),
    420px 280px 0 0 rgba(255,255,255,0.1),
    560px 100px 0 0 rgba(255,255,255,0.2),
    700px 350px 0 0 rgba(255,255,255,0.25),
    840px 200px 0 0 rgba(255,255,255,0.15),
    980px 300px 0 0 rgba(255,255,255,0.3),
    1120px 120px 0 0 rgba(255,255,255,0.1),
    1300px 400px 0 0 rgba(255,255,255,0.2),
    50px 500px 0 0 rgba(255,255,255,0.15),
    200px 570px 0 0 rgba(255,255,255,0.25),
    380px 450px 0 0 rgba(255,255,255,0.1),
    520px 550px 0 0 rgba(255,255,255,0.2),
    700px 480px 0 0 rgba(255,255,255,0.3),
    880px 600px 0 0 rgba(255,255,255,0.15),
    1020px 530px 0 0 rgba(255,255,255,0.2),
    130px 700px 0 0 rgba(255,255,255,0.1),
    350px 680px 0 0 rgba(255,255,255,0.2),
    600px 720px 0 0 rgba(255,255,255,0.15);
  animation-delay: 2s;
}

@keyframes twinkle {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ===========================
   Navigation
   =========================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background-color 0.3s, backdrop-filter 0.3s;
  background: rgba(1, 7, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.nav__logo img {
  height: 36px;
  width: auto;
}

.nav__logo span {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  text-decoration: none;
}

.nav__links a:hover {
  color: var(--color-text-primary);
}

.nav__cta {
  padding: 10px 24px !important;
  font-size: 0.9rem !important;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(1, 7, 19, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px 24px;
    gap: 24px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

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

  .nav__links a {
    font-size: 1.1rem;
  }
}

/* ===========================
   Hero
   =========================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  z-index: 1;
  overflow: hidden;
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
}

.hero__content {
  flex: 1;
  max-width: 600px;
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(24, 120, 234, 0.15);
  border: 1px solid rgba(24, 120, 234, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-btn-gradient-light);
  margin-bottom: 24px;
}

.hero__title {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero__badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__badges a {
  transition: transform 0.2s;
}

.hero__badges a:hover {
  transform: scale(1.05);
}

.hero__badges img {
  height: 52px;
  width: auto;
}

.hero__visual {
  flex: 0 0 auto;
  position: relative;
}

.hero__mascot {
  width: 360px;
  height: auto;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 60px rgba(24, 120, 234, 0.25));
}

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

/* Hero glow */
.hero__visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(24, 120, 234, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

@media (max-width: 900px) {
  .hero__inner {
    flex-direction: column;
    text-align: center;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__badges {
    justify-content: center;
  }

  .hero__mascot {
    width: 260px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1.05rem;
  }

  .hero__mascot {
    width: 200px;
  }
}

/* ===========================
   Features
   =========================== */

.features {
  position: relative;
  z-index: 1;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: rgba(32, 34, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(24, 120, 234, 0.3);
  box-shadow: 0 12px 40px rgba(24, 120, 234, 0.1);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(39, 152, 244, 0.2), rgba(4, 91, 162, 0.2));
  border-radius: 16px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.feature-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card__desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ===========================
   Statistics
   =========================== */

.stats {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.stats__inner {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-item__number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-btn-gradient-light), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-item__label {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-top: 8px;
}

@media (max-width: 600px) {
  .stats__inner {
    gap: 40px;
  }

  .stat-item__number {
    font-size: 2.25rem;
  }
}

/* ===========================
   Testimonials
   =========================== */

.testimonials {
  position: relative;
  z-index: 1;
}

.testimonials__carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
  scrollbar-width: none;
}

.testimonials__carousel::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  flex: 0 0 min(500px, 85vw);
  scroll-snap-align: center;
  background: rgba(32, 34, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.testimonial-card__stars {
  color: #FFC300;
  font-size: 1.2rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-card__text {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-card__author {
  font-weight: 700;
  font-size: 1rem;
}

.testimonial-card__role {
  color: var(--color-text-tertiary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ===========================
   FAQ
   =========================== */

.faq {
  position: relative;
  z-index: 1;
}

.faq__list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: rgba(32, 34, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq__item[open] {
  border-color: rgba(24, 120, 234, 0.3);
}

.faq__item summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  transition: color 0.2s;
}

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

.faq__item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-primary);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item summary:hover {
  color: var(--color-primary);
}

.faq__answer {
  padding: 0 24px 20px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ===========================
   CTA Section
   =========================== */

.cta {
  position: relative;
  z-index: 1;
  text-align: center;
}

.cta__inner {
  background: linear-gradient(135deg, rgba(24, 120, 234, 0.1), rgba(6, 25, 57, 0.5));
  border: 1px solid rgba(24, 120, 234, 0.2);
  border-radius: 32px;
  padding: 80px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.cta__title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.cta__subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.cta__badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.cta__badges a {
  transition: transform 0.2s;
}

.cta__badges a:hover {
  transform: scale(1.05);
}

.cta__badges img {
  height: 52px;
  width: auto;
}

.cta__mascot {
  width: 180px;
  margin: 0 auto;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(24, 120, 234, 0.2));
}

@media (max-width: 480px) {
  .cta__inner {
    padding: 60px 24px;
  }

  .cta__title {
    font-size: 1.75rem;
  }
}

/* ===========================
   Footer
   =========================== */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px 0;
  margin-top: 40px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__brand img {
  height: 28px;
  width: auto;
}

.footer__brand span {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--color-text-primary);
}

@media (max-width: 480px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===========================
   Legal Pages
   =========================== */

.legal {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 60px;
}

.legal__content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal__content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal__content .legal__updated {
  color: var(--color-text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal__content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal__content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
}

.legal__content p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal__content ul,
.legal__content ol {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
  list-style: disc;
}

.legal__content ol {
  list-style: decimal;
}

.legal__content li {
  margin-bottom: 8px;
}

.legal__content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal__content a:hover {
  color: var(--color-btn-gradient-light);
}

.legal__content strong {
  color: var(--color-text-primary);
  font-weight: 600;
}
