/* ============================================
   Rita & Untalis — Family Website
   Classic Warm Theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #8D6E63;
  --primary-dark: #6D4C41;
  --accent: #D4C4A8;
  --accent-light: #EDE8DF;
  --text-dark: #3E2723;
  --text-body: #5D4037;
  --text-light: #8D6E63;
  --bg-white: #FFFFFF;
  --bg-warm: #FAF8F5;
  --bg-cream: #F5F0E8;
  --shadow: 0 4px 20px rgba(62, 39, 35, 0.08);
  --shadow-hover: 0 8px 30px rgba(62, 39, 35, 0.15);
  --radius: 12px;
  --transition: 0.3s ease;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Lato', 'Segoe UI', sans-serif;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(141, 110, 99, 0.1);
  transition: all var(--transition);
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(62, 39, 35, 0.08);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--primary);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-body);
  position: relative;
  padding: 4px 0;
}

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

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

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

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

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 85vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/hero-couple.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(62, 39, 35, 0.25) 0%,
    rgba(62, 39, 35, 0.15) 50%,
    rgba(250, 248, 245, 0.6) 85%,
    rgba(250, 248, 245, 1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  margin-top: -40px;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 400;
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.15;
  letter-spacing: 2px;
}

.hero-content .hero-sub {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  margin-top: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.7;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Couple Section --- */
.couple-section {
  position: relative;
  z-index: 3;
  margin-top: -80px;
  padding: 0 20px;
}

.couple-strip {
  display: flex;
  justify-content: center;
  gap: 60px;
  max-width: 600px;
  margin: 0 auto;
}

.couple-card {
  text-align: center;
  transition: transform var(--transition);
}

.couple-card:hover {
  transform: translateY(-6px);
}

.couple-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--bg-white);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.couple-card:hover .couple-img {
  box-shadow: var(--shadow-hover);
}

.couple-name {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
}

.couple-role {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* --- Section Common --- */
.section {
  padding: 100px 40px;
}

.section-warm {
  background: var(--bg-warm);
}

.section-cream {
  background: var(--bg-cream);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.section-header .line {
  width: 50px;
  height: 2px;
  background: var(--primary);
  margin: 0 auto 20px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* --- Our Story Section --- */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.story-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.story-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.story-image:hover img {
  transform: scale(1.03);
}

.story-text {
  padding: 20px 0;
}

.story-text .line {
  width: 50px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 24px;
}

.story-text h2 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.story-text p {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.9;
  margin-bottom: 16px;
}

/* --- Journey / Timeline Section --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 50px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
  padding-right: calc(50% + 30px);
  text-align: right;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
  padding-left: calc(50% + 30px);
  text-align: left;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 3px solid var(--bg-white);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(141, 110, 99, 0.15);
  z-index: 1;
}

.timeline-year {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* --- Family Tree Teaser --- */
.tree-teaser {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-warm) 100%);
  position: relative;
  overflow: hidden;
}

.tree-teaser::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(141, 110, 99, 0.04) 0%, transparent 50%);
}

.tree-teaser-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.tree-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  opacity: 0.6;
}

.tree-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.5;
}

.tree-teaser h2 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.tree-teaser p {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 50px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(141, 110, 99, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* --- Gallery Preview --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(62, 39, 35, 0.5) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

/* --- Footer --- */
.footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 40px 30px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.footer-brand-sub {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-links h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: #FFFFFF;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Fade-in Animation --- */
.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) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-image img {
    height: 350px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .section-header h2,
  .story-text h2 {
    font-size: 2.2rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    flex-direction: row;
    padding-left: 50px;
    padding-right: 0;
    text-align: left;
  }

  .timeline-dot {
    left: 20px;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    padding: 14px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid rgba(141, 110, 99, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    height: 70vh;
    min-height: 400px;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-content .hero-sub {
    font-size: 0.85rem;
  }

  .couple-strip {
    gap: 30px;
  }

  .couple-img {
    width: 110px;
    height: 110px;
  }

  .section {
    padding: 60px 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
