/* --- Variables --- */
:root {
  --bg: #F5F7FA;
  --bg-hero: #E8EDF5;
  --bg-section: #FFFFFF;
  --text: #1A2332;
  --text-muted: #4A5568;
  --accent: #0F52BA;
  --accent-hover: #0A3D8C;
  --accent-light: #3B7DD8;
  --accent-soft: #E3EDF8;
  --border: #D1D9E6;
  --border-light: #E8EDF5;
  --white: #fff;
  --sapphire-blue: #0F52BA;
  --sapphire-blue-dark: #0A3D8C;
  --sapphire-blue-light: #3B7DD8;
  --sapphire-blue-soft: #E3EDF8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --space: clamp(1.5rem, 4vw, 3rem);
  --container: min(90vw, 1100px);
  --header-height: 56px;
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-cubic: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-professional: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.6s;
  --duration-slow: 0.9s;
  --duration-hero: 1s;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--sapphire-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--sapphire-blue-dark); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Animations (respect reduced motion) --- */
@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translate3d(0, 24px, 0); 
  }
  to { 
    opacity: 1; 
    transform: translate3d(0, 0, 0); 
  }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes heroBgZoom {
  from { transform: translateZ(0) scale(1.08); }
  to { transform: translateZ(0) scale(1); }
}
@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

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

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space);
  padding-right: var(--space);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 247, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(15, 82, 186, 0.08);
  animation: fadeIn 0.6s var(--ease-out) 0.1s backwards;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.875rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.logo {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--sapphire-blue);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.logo:hover { color: var(--sapphire-blue-dark); }

.cta-header {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--sapphire-blue);
  border-radius: 4px;
  color: var(--sapphire-blue);
  transition: all 0.2s ease;
}
.cta-header:hover {
  background: var(--sapphire-blue);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(15, 82, 186, 0.25);
}

@media (max-width: 480px) {
  .header-inner { padding-left: 1rem; padding-right: 1rem; }
  .cta-header { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: min(85vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 8vw, 4rem) var(--space);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg-hero);
  /* Replace with your own: background-image: url('assets/images/hero-bg.jpg'); */
  background-image: url('assets/images/1ffee3e3-2af8-4d2e-a134-d00a14c9cf85.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transform: translateZ(0);
  animation: heroBgZoom 18s var(--ease-out-cubic) forwards;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 82, 186, 0.35) 0%,
    rgba(15, 82, 186, 0.5) 50%,
    rgba(10, 61, 140, 0.6) 100%
  );
  pointer-events: none;
  animation: fadeIn 1.2s var(--ease-out-cubic) 0.1s backwards;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.hero-content .hero-eyebrow,
.hero-content h1,
.hero-content .hero-lead,
.hero-content .btn-primary {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: fadeInUp var(--duration-hero) var(--ease-professional) forwards;
  animation-fill-mode: both;
}

.hero-content .hero-eyebrow {
  animation-delay: 0.1s;
}

.hero-content h1 {
  animation-delay: 0.25s;
}

.hero-content .hero-lead {
  animation-delay: 0.4s;
}

.hero-content .btn-primary {
  animation-delay: 0.55s;
}

.hero-content.is-visible .hero-eyebrow,
.hero-content.is-visible h1,
.hero-content.is-visible .hero-lead,
.hero-content.is-visible .btn-primary {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.hero-eyebrow {
  font-family: "Berkshire Swash", var(--serif);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  /* text-transform: uppercase; */
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 1.25rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-lead {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 1.75rem;
  line-height: 1.6;
}

/* Base primary button (hero + CTA) */
.btn-primary {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.85rem 1.75rem;
  background: var(--sapphire-blue);
  color: var(--white);
  border: 2px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 82, 186, 0.2);
}
.btn-primary:hover {
  background: var(--sapphire-blue-dark);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(15, 82, 186, 0.35);
  transform: translateY(-1px);
}

/* Hero: make CTA stand out clearly on dark overlay */
.hero .btn-primary {
  font-size: clamp(1rem, 2vw, 1.125rem);
  padding: 1rem 2rem;
  background: var(--white);
  color: var(--sapphire-blue);
  border-color: var(--white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.hero .btn-primary:hover {
  background: var(--sapphire-blue);
  color: var(--white);
  border-color: var(--sapphire-blue);
  box-shadow: 0 6px 32px rgba(15, 82, 186, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
  .hero { min-height: min(80vh, 520px); padding-left: 1rem; padding-right: 1rem; }
}

/* --- Section scroll animations --- */
.animate-section .section-heading {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration) var(--ease-out-expo), transform var(--duration) var(--ease-out-expo);
}
.animate-section.is-visible .section-heading {
  opacity: 1;
  transform: translateY(0);
}

.bio.animate-section .bio-main,
.bio.animate-section .bio-photo-wrap {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration) var(--ease-out-expo), transform var(--duration) var(--ease-out-expo);
}
.bio.animate-section.is-visible .bio-main {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}
.bio.animate-section.is-visible .bio-photo-wrap {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.gallery.animate-section .gallery-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.gallery.animate-section.is-visible .gallery-item { opacity: 1; transform: translateY(0); }
.gallery.animate-section.is-visible .gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery.animate-section.is-visible .gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery.animate-section.is-visible .gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery.animate-section.is-visible .gallery-item:nth-child(4) { transition-delay: 0.2s; }
.gallery.animate-section.is-visible .gallery-item:nth-child(5) { transition-delay: 0.25s; }
.gallery.animate-section.is-visible .gallery-item:nth-child(6) { transition-delay: 0.3s; }
.gallery.animate-section.is-visible .gallery-item:nth-child(7) { transition-delay: 0.35s; }
.gallery.animate-section.is-visible .gallery-item:nth-child(8) { transition-delay: 0.4s; }

.recommendations.animate-section .carousel {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration) var(--ease-out-expo), transform var(--duration) var(--ease-out-expo);
}
.recommendations.animate-section.is-visible .carousel {
  opacity: 1;
  transform: translateY(0);
}

.cta-section.animate-section .cta-inner .section-heading,
.cta-section.animate-section .cta-inner p,
.cta-section.animate-section .cta-inner .btn-primary {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.cta-section.animate-section.is-visible .cta-inner .section-heading { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.cta-section.animate-section.is-visible .cta-inner p { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.cta-section.animate-section.is-visible .cta-inner .btn-primary { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }

/* --- Bio --- */
.bio {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background: var(--bg);
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: start;
}
@media (min-width: 720px) {
  .bio-grid {
    grid-template-columns: 1fr minmax(280px, 380px);
    gap: clamp(2rem, 4vw, 3rem);
  }
  .bio-photo-wrap { 
    position: sticky; 
    /* top: calc(var(--header-height) + 1.5rem);  */
  }
}

.bio h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 500;
  margin: 0 0 1.25rem;
  color: var(--text);
  position: relative;
  padding-bottom: 0.75rem;
}
.bio h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(to right, var(--sapphire-blue), var(--sapphire-blue-light));
  border-radius: 2px;
}

.bio-text p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}
.bio-text p:last-child { margin-bottom: 0; }

.bio-photo-wrap {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 3 / 4;
  max-height: 480px;
}

.bio-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-photo-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text-muted);
  background: var(--border);
}

@media (max-width: 719px) {
  .bio-grid { grid-template-columns: 1fr; }
  .bio-photo-wrap { max-width: 320px; margin: 0 auto; }
}

/* --- Gallery --- */
.gallery {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background: var(--bg-section);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.gallery h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 500;
  margin: 0 0 1.75rem;
  color: var(--text);
  position: relative;
  padding-bottom: 0.75rem;
  text-align: center;
}
.gallery h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3px;
  background: linear-gradient(to right, var(--sapphire-blue), var(--sapphire-blue-light));
  border-radius: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1.25rem, 3vw, 1.75rem);
}

@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}

.gallery-item {
  margin: 0;
  padding: 0;
  text-align: left;
  border-radius: 4px;
  overflow: visible;
}

.gallery-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 0.625rem;
}
.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-caption {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  line-height: 1.6;
  font-weight: 400;
  text-align: center;
}

@media (max-width: 480px) {
  .gallery-caption { 
    font-size: 0.875rem;
    line-height: 1.5;
  }
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox[data-open="true"] {
  opacity: 1;
  visibility: visible;
}
.lightbox[hidden] { display: none !important; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 42, 40, 0.92);
  cursor: pointer;
}

.lightbox-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lightbox[data-open="true"] .lightbox-inner {
  animation: lightboxIn 0.35s var(--ease-out-expo) forwards;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--white);
  opacity: 0.9;
  transition: opacity 0.2s ease;
  border-radius: 2px;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-close:focus {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.lightbox-image-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 75vh;
  border-radius: 4px;
  overflow: hidden;
  background: #1a1918;
}
.lightbox-image {
  width: 100%;
  height: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-caption {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  max-width: 560px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .lightbox-inner { max-height: 85vh; }
  .lightbox-image-wrap, .lightbox-image { max-height: 65vh; }
  .lightbox-close { top: -2.25rem; right: 0.5rem; }
}

/* --- Carousel (Recommendations) --- */
.recommendations {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  text-align: center;
}

.recommendations h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 500;
  margin: 0 0 1.75rem;
  color: var(--text);
  text-align: center;
  position: relative;
  padding-bottom: 0.75rem;
}
.recommendations h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3px;
  background: linear-gradient(to right, var(--sapphire-blue), var(--sapphire-blue-light));
  border-radius: 2px;
}

.carousel {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.carousel-track-wrap {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s var(--ease-out-expo);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  padding: 0 0.5rem 0 0;
  border: none;
  min-width: 0;
}
.carousel-slide p {
  font-style: italic;
  color: var(--text);
  margin: 0 0 0.75rem;
  line-height: 1.75;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
}
.carousel-slide footer {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: normal;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.carousel-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--sapphire-blue);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  transition: all 0.2s ease;
  background: var(--white);
  padding-bottom: 0.5rem;
}
.carousel-btn:hover {
  background: var(--sapphire-blue);
  color: var(--white);
  border-color: var(--sapphire-blue);
  box-shadow: 0 2px 8px rgba(15, 82, 186, 0.25);
}
.carousel-btn:focus {
  outline: 2px solid var(--sapphire-blue);
  outline-offset: 2px;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border);
  padding: 0;
  transition: all 0.2s ease;
}
.carousel-dot:hover { background: var(--sapphire-blue-light); }
.carousel-dot[aria-selected="true"] {
  background: var(--sapphire-blue);
  transform: scale(1.25);
}
.carousel-dot:focus {
  outline: 2px solid var(--sapphire-blue);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .carousel-slide { padding: 0; }
  .carousel-controls { margin-top: 1.5rem; gap: 1rem; }
}

/* --- CTA section --- */
.cta-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background: linear-gradient(to bottom, var(--sapphire-blue-soft) 0%, var(--bg-hero) 100%);
  text-align: center;
  border-top: 1px solid var(--border-light);
}

.cta-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 500;
  margin: 0 0 0.5rem;
  color: var(--text);
  position: relative;
  padding-bottom: 0.75rem;
  display: inline-block;
}
.cta-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3px;
  background: linear-gradient(to right, var(--sapphire-blue), var(--sapphire-blue-light));
  border-radius: 2px;
}
.cta-section p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
}
.cta-section .btn-primary { margin: 0; }

/* --- Footer --- */
.site-footer {
  padding: clamp(1.5rem, 3vw, 2rem) var(--space);
  border-top: 1px solid var(--border-light);
  background: var(--bg);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.site-footer p { margin: 0.25rem 0; }
.site-footer a { 
  color: var(--sapphire-blue);
  transition: color 0.2s ease;
}
.site-footer a:hover { color: var(--sapphire-blue-dark); }

@media (max-width: 480px) {
  .site-footer { padding-left: 1rem; padding-right: 1rem; font-size: 0.8125rem; }
}
