/* ============================================
   CompassWithChai — Modern Minimal Travel Blog
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-text-light: #999999;
  --color-accent: #c8553d;
  --color-accent-light: #e8745e;
  --color-border: #e8e8e8;
  --color-overlay: rgba(0, 0, 0, 0.5);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--color-border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav .nav-logo {
  color: #fff;
}

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

.logo-icon {
  font-size: 1.4rem;
}

.logo-accent {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: var(--transition);
  position: relative;
}

.nav .nav-links a {
  color: rgba(255, 255, 255, 0.85);
}

.nav.scrolled .nav-links a {
  color: var(--color-text-secondary);
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: var(--transition);
}

.nav.scrolled .nav-toggle span {
  background: var(--color-text);
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 700px;
  padding: 0 24px;
}

.hero-subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-accent {
  color: var(--color-accent-light);
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.8;
  opacity: 0.85;
  margin-bottom: 36px;
  font-weight: 300;
}

.hero-cta {
  display: inline-block;
  padding: 14px 36px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.hero-cta:hover {
  background: #fff;
  color: var(--color-text);
  border-color: #fff;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

/* --- Section Styles --- */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

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

/* --- Overview --- */
.overview {
  padding: 100px 0 60px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.overview-intro {
  max-width: 700px;
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-top: 16px;
}

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

.overview-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  display: block;
}

.overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.overview-card:hover img {
  transform: scale(1.08);
}

.overview-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: var(--transition);
}

.overview-card:hover .overview-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.overview-card-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
}

.overview-card-tag {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  letter-spacing: 0.03em;
}

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

@media (max-width: 640px) {
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .overview {
    padding: 60px 0 40px;
  }
}

/* --- Destinations --- */
.destinations {
  padding: 120px 0 80px;
}

.destination {
  margin-bottom: 120px;
}

.destination:last-child {
  margin-bottom: 0;
}

.destination-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.destination-number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  color: var(--color-border);
  line-height: 1;
  flex-shrink: 0;
}

.destination-name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 4px;
}

.destination-tagline {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  font-style: italic;
}

.destination-description {
  max-width: 700px;
  margin-bottom: 40px;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

/* --- Photo Grid --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.photo-grid--large {
  grid-template-columns: repeat(3, 1fr);
}

.photo-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-surface);
}

.photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
}

.photo-card:hover::after {
  opacity: 1;
}

.photo-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-card--featured {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-card--featured img {
  height: 100%;
  min-height: 576px;
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1;
  transform: translateY(10px);
  opacity: 0;
  transition: var(--transition);
}

.photo-card:hover .photo-caption {
  transform: translateY(0);
  opacity: 1;
}

/* --- About --- */
.about {
  padding: 100px 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  margin-top: 20px;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.about-text .section-title {
  margin-top: 0;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-left: 40px;
  border-left: 1px solid var(--color-border);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--color-text);
  display: block;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

/* --- Footer --- */
.footer {
  padding: 60px 0;
  background: var(--color-text);
  color: #fff;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 12px 0;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-top: 16px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  padding: 12px;
  transition: var(--transition);
  z-index: 10;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  font-size: 2.5rem;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--color-accent-light);
}

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

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

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

  .photo-card--featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .photo-card--featured img {
    min-height: 300px;
  }

  .photo-card img {
    height: 220px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-stats {
    flex-direction: row;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding-top: 40px;
    justify-content: space-around;
  }

  .destinations {
    padding: 80px 0 60px;
  }

  .destination {
    margin-bottom: 80px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links.open a {
    color: var(--color-text) !important;
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .photo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .photo-card--featured {
    grid-column: span 1;
  }

  .photo-card--featured img {
    min-height: 250px;
  }

  .photo-card img {
    height: 240px;
  }

  .photo-caption {
    opacity: 1;
    transform: translateY(0);
  }

  .photo-card::after {
    opacity: 1;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .destination-number {
    font-size: 2rem;
  }

  .about-stats {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .stat-number {
    font-size: 2.2rem;
  }

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