/* ============================================================
   Celeste Sovereign — Component & Section Styles
   ------------------------------------------------------------
   tokens.css must be loaded BEFORE this file.
   ============================================================ */


/* ============================================================
   Smooth scroll for anchor navigation
   ============================================================ */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


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

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  min-height: 64px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.nav-logo:hover { color: var(--color-text); }

.nav-links {
  display: none;
  gap: var(--space-xl);
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--fs-nav);
  font-weight: var(--fw-ui);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-links a:hover { color: var(--color-accent); }


/* Hamburger button */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 18px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-bar { min-height: 72px; }
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--color-text);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}


/* Mobile overlay menu */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-bg);
  z-index: calc(var(--z-header) - 1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  text-align: center;
}

.nav-overlay-links a {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.nav-overlay-links a:hover { color: var(--color-accent); }

@media (min-width: 768px) {
  .nav-overlay { display: none; }
}

/* Prevent body scroll when overlay is open */
body.no-scroll { overflow: hidden; }


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

#hero .overline {
  margin-bottom: var(--space-lg);
}

#hero h1 {
  margin-bottom: var(--space-lg);
}

#hero .tagline {
  margin-bottom: var(--space-2xl);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-buttons {
    flex-direction: row;
    gap: var(--space-lg);
  }
}


/* ============================================================
   About
   ============================================================ */

#about p {
  margin-bottom: var(--space-lg);
}

#about p:last-child {
  margin-bottom: 0;
}


/* ============================================================
   My Passion
   ============================================================ */

.passion-intro {
  margin-bottom: var(--space-3xl);
}

.passion-intro h2 {
  margin-bottom: var(--space-md);
}

.passion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  text-align: center;
}

.passion-item h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--fs-h3);
  margin: 0;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .passion-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3xl) var(--space-xl);
  }
}


/* ============================================================
   Contact
   ============================================================ */

.contact-intro {
  margin-bottom: var(--space-2xl);
}

.contact-intro h2 {
  margin-bottom: var(--space-md);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.form-submit {
  display: flex;
  justify-content: center;
  margin-top: var(--space-md);
}


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

.section-footer {
  border-top: 1px solid var(--color-border);
}

.footer-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-social {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.footer-social a:hover {
  color: var(--color-accent);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.footer-link {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .footer-bar {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-meta {
    flex-direction: row;
    gap: var(--space-lg);
  }
}


/* ============================================================
   Reduced motion — disable fade-in delay
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
