/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: var(--font-body);
  cursor: pointer;
}

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

/* =============================================
   LAYOUT UTILITIES
============================================= */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.section-label {
  display: block;
  font-size: clamp(10px, 1vw, 11px);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-vivid);
  margin-bottom: 14px;
}

.section-header {
  margin-bottom: 64px;
  text-align: center;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 600;
  color: var(--blue-vivid);
  line-height: 1.15;
  margin-bottom: clamp(8px, 1.6vw, 24px);
  margin-bottom: 18px;
}

.section-sub {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--text-dark);
  max-width: 500px;
  line-height: 1.7;
  margin: 0 auto;
}

/* =============================================
   NAV
============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: clamp(60px, 7vw, 80px);
  padding: 0 clamp(20px, 6vw, 96px);
  transition: background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.nav.scrolled {
  background: rgba(245, 249, 253, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(111, 151, 238, 0.08);
}

.nav-inner {
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo-sig {
  display: none;
  width: clamp(36px, 6vw, 52px);
  height: auto;
  object-fit: contain;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-logo:hover .nav-logo-text { opacity: 0.7; }

/* ── Links ── */
.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast), background var(--dur-fast);
  display: block;
}

.nav-links a:hover {
  color: var(--blue-vivid);
  background: rgba(93, 127, 219, 0.07);
}

.nav-links a[aria-current="page"] {
  color: var(--blue-vivid);
  background: rgba(93, 127, 219, 0.10);
  font-weight: 600;
}

/* ── CTA button ── */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-vivid);
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.nav-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}


/* ── Hamburger (mobile - 3 vertical dots) ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  color: var(--text-dark);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Mobile full-screen overlay ── */
.nav-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-image: url('../assets/images/Backgrounds/frosted_glass_mobile.png');
  background-size: cover;
  background-position: center;
  background-color: rgba(245, 249, 253, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

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

.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.nav-mobile-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-mobile-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.nav-mobile-link {
  font-size: 26px;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
  transition: color var(--dur-fast);
  display: block;
}

.nav-mobile-link:hover {
  color: var(--blue-vivid);
}

.nav-mobile-link[aria-current="page"] {
  color: var(--blue-vivid);
  font-weight: 600;
}

.nav-mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-vivid);
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  padding: 14px 40px;
  border-radius: var(--radius-pill);
  align-self: center;
  flex-shrink: 0;
  margin-bottom: 8px;
}

/* =============================================
   LIFE STORY INTRO
============================================= */
.life-story-intro {
  text-align: center;
  padding: var(--section-pad-v) var(--section-pad-h) clamp(40px, 5vw, 64px);
  background: transparent;
}

.life-story-intro .section-header {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

.life-story-intro .section-sub {
  margin: 0 auto;
}

/* =============================================
   SCROLL ANIMATIONS
============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

.fade-in--delay {
  transition-delay: 0.18s;
}

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

.slide-left {
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right.delay { transition-delay: 0.15s; }

/* =============================================
   IMAGE PLACEHOLDERS
   Shown when an image file is missing.
   JS (imgFail) adds .no-img to the parent and
   copies the alt text into data-label.
============================================= */
.no-img {
  background: linear-gradient(135deg, var(--blue-pale) 0%, var(--blue-soft) 100%);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* Preserve whatever size the container already has */
  min-height: inherit;
}

/* Camera icon via SVG data URI */
.no-img::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  opacity: 0.35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236F97EE'%3E%3Cpath d='M12 15.2A3.2 3.2 0 1 1 12 8.8a3.2 3.2 0 0 1 0 6.4zm0-8.4a5.2 5.2 0 1 0 0 10.4A5.2 5.2 0 0 0 12 6.8zM9 3l-1.83 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Label - uses the alt text stored in data-label */
.no-img::after {
  content: attr(data-label);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--blue-accent);
  opacity: 0.7;
  text-align: center;
  padding: 0 12px;
  /* Hide the pseudo if no label was set */
  display: block;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
  .nav-logo-sig {
    display: block;
    width: clamp(78px, 24vw, 108px);
    height: auto;
    max-height: 40px;
    object-fit: contain;
    object-position: left center;
  }

  .nav-logo-text {
    display: none;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
    align-items: center;
    height: 36px;
  }

  .section-header {
    margin-bottom: 44px;
  }
}
