/* ============================================
   AYAMI HOSHIORI — MAIN STYLESHEET
   ============================================ */

/* --- TOKENS --- */
:root {
  --hair-main:    #A9D6FF;
  --hair-shadow:  #7EB8F5;
  --hair-deep:    #4F84C4;
  --eye-main:     #7C8FFF;
  --eye-grad:     #5ABEFF;
  --outfit-dark:  #243B7A;
  --gold:         #FFD966;
  --white:        #FFFFFF;
  --silver:       #C6CDD8;
  --skin:         #FFE8D9;

  --bg-deep:      #080c1a;
  --bg-mid:       #0d1021;
  --bg-card:      #111428;
  --bg-card-hover:#161b35;
  --border:       rgba(169, 214, 255, 0.12);
  --border-gold:  rgba(255, 217, 102, 0.3);

  --text-primary: #e8eeff;
  --text-secondary:#9ba8cc;
  --text-muted:   #5a6380;

  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    36px;

  --shadow-glow:  0 0 30px rgba(124, 143, 255, 0.15);
  --shadow-card:  0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-gold:  0 0 20px rgba(255, 217, 102, 0.25);

  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Quicksand', sans-serif;
  --font-body:    'Nunito', sans-serif;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- STARS CANVAS --- */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--outfit-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--eye-main); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 1.5rem;
  height: 70px;
  display: flex;
  align-items: center;
  background: rgba(8, 12, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(8, 12, 26, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.nav-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  flex-shrink: 0;
}
.logo-star {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--gold));
  animation: twinkle 2.5s ease-in-out infinite;
}
.logo-text {
  background: linear-gradient(135deg, var(--hair-main), var(--eye-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--hair-main);
  background: rgba(169, 214, 255, 0.08);
}
.nav-cta {
  margin-left: 0.5rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--hair-main);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, var(--eye-main), var(--hair-deep));
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(124, 143, 255, 0.35);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 143, 255, 0.5);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--hair-main);
  border: 1.5px solid rgba(169, 214, 255, 0.35);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-secondary:hover {
  background: rgba(169, 214, 255, 0.08);
  border-color: var(--hair-main);
  transform: translateY(-2px);
}
.btn-icon { font-size: 1rem; }
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--gold), #e8c020);
  color: #1a1200;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(255, 217, 102, 0.45);
}

/* ============================================
   SECTION UTILITY
   ============================================ */
.section {
  position: relative;
  z-index: 1;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.9rem;
  background: rgba(255, 217, 102, 0.1);
  border-radius: 50px;
  border: 1px solid var(--border-gold);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 1rem;
}
.section-title .highlight {
  background: linear-gradient(135deg, var(--hair-main), var(--eye-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(169, 214, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   FADE-IN ANIMATION
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg-mid);
  padding: 4rem 1.5rem 0;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 240px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hair-main);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--hair-main); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--eye-main), var(--hair-deep));
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(124, 143, 255, 0.4);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 143, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(124, 143, 255, 0.6); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: rgba(8, 12, 26, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
    margin-left: 0;
  }
  .nav-menu.open {
    max-height: 500px;
  }
  .nav-link {
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }
  .nav-cta {
    margin: 0.75rem 0 0;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
  }
}

@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
}

@media (min-width: 1440px) {
  .container { max-width: 1320px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .fade-in { opacity: 1; transform: none; }
}
