/* ============================================================
   DESIGN TOKENS — agent may adjust these per person/deployment
   ============================================================ */
:root {
  /* Palette — warm ivory, dusty rose, deep slate */
  --color-bg:           #f5f0eb;
  --color-bg-warm:      #ede6dd;
  --color-surface:      #faf7f4;
  --color-border:       #d9cfc4;
  --color-text:         #2e2a26;
  --color-text-muted:   #7a6e63;
  --color-accent:       #8c6e5d;
  --color-accent-light: #c9a98e;
  --color-candle:       #e8c97a;
  --color-candle-glow:  rgba(232, 201, 122, 0.25);

  /* Typography */
  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Jost', system-ui, sans-serif;

  /* Spacing */
  --max-width:     720px;
  --max-width-wide: 1100px;
  --space-xs:      0.5rem;
  --space-sm:      1rem;
  --space-md:      2rem;
  --space-lg:      4rem;
  --space-xl:      7rem;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   TEXTURE OVERLAY — subtle linen feel on body
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 240, 235, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo .candle-icon {
  width: 18px;
  height: 24px;
  flex-shrink: 0;
}

nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
}

nav a {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
  color: var(--color-accent);
  text-decoration: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-text);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
}

.hero__portrait {
  width: 320px;
  max-width: 80vw;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid var(--color-border);
  box-shadow:
    0 0 0 8px var(--color-bg),
    0 0 0 10px var(--color-border),
    0 20px 60px rgba(0,0,0,0.08);
  margin-bottom: var(--space-md);
  animation: portraitReveal 1.4s ease forwards;
  opacity: 0;
}

@keyframes portraitReveal {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.hero__dates {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  animation: fadeUp 1s 0.4s ease forwards;
  opacity: 0;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  animation: fadeUp 1s 0.6s ease forwards;
  opacity: 0;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto var(--space-lg);
  animation: fadeUp 1s 0.8s ease forwards;
  opacity: 0;
}

.hero__divider {
  width: 60px;
  height: 1px;
  background: var(--color-accent-light);
  margin: 0 auto var(--space-md);
  animation: fadeUp 1s 1s ease forwards;
  opacity: 0;
}

.hero__intro {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  animation: fadeUp 1s 1.1s ease forwards;
  opacity: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Decorative corner flourishes on hero */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}
.hero::before {
  top: 8%;
  left: 4%;
  box-shadow: 60px 80px 0 0 transparent, 60px 80px 0 -1px var(--color-border);
}
.hero::after {
  bottom: 8%;
  right: 4%;
  width: 160px;
  height: 160px;
  box-shadow: -50px -60px 0 0 transparent, -50px -60px 0 -1px var(--color-border);
}

/* ============================================================
   CANDLE COMPONENT
   ============================================================ */
.candle-section {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background-color: var(--color-bg-warm);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.candle-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.candle {
  position: relative;
  width: 28px;
}

.candle__body {
  width: 28px;
  height: 80px;
  background: linear-gradient(to right, #e8dcc8, #f5edd8, #e8dcc8);
  border-radius: 3px 3px 1px 1px;
  position: relative;
}

.candle__wick {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 14px;
  background: #5a4a3a;
  border-radius: 1px;
}

.candle__flame {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 22px;
  background: radial-gradient(ellipse at bottom, var(--color-candle) 0%, #f5a623 50%, transparent 100%);
  border-radius: 50% 50% 30% 30%;
  animation: flicker 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px var(--color-candle));
  transition: opacity 0.4s ease;
}

@keyframes flicker {
  0%, 100% { transform: translateX(-50%) scaleX(1)   scaleY(1)    rotate(-1deg); opacity: 1; }
  20%       { transform: translateX(-50%) scaleX(0.93) scaleY(1.04) rotate(1.5deg); opacity: 0.95; }
  40%       { transform: translateX(-50%) scaleX(1.04) scaleY(0.97) rotate(-0.5deg); opacity: 1; }
  60%       { transform: translateX(-50%) scaleX(0.97) scaleY(1.03) rotate(1deg);  opacity: 0.93; }
  80%       { transform: translateX(-50%) scaleX(1.02) scaleY(0.98) rotate(-1.5deg); opacity: 1; }
}

.candle__glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--color-candle-glow) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2.5s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.2); }
}

.candle-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* ============================================================
   TYPOGRAPHY — PROSE
   ============================================================ */
.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  margin-top: var(--space-lg);
}

.prose h1 { font-size: 2.6rem; font-weight: 300; line-height: 1.15; }
.prose h2 { font-size: 1.7rem; font-weight: 300; letter-spacing: 0.01em; }
.prose h3 { font-size: 1.2rem; font-style: italic; color: var(--color-text-muted); }

.prose p {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.prose > p:first-child {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-style: italic;
}

/* Pull quote */
.pullquote {
  border-left: 2px solid var(--color-accent-light);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 300;
  color: var(--color-accent);
  line-height: 1.6;
}

/* Ornamental divider */
.ornament {
  text-align: center;
  color: var(--color-accent-light);
  font-size: 1rem;
  letter-spacing: 0.4em;
  margin: var(--space-lg) 0;
  user-select: none;
}

/* ============================================================
   PAGE TITLE COMPONENT (reusable across pages)
   ============================================================ */
.page-title {
  text-align: center;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.page-title__eyebrow {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.page-title__heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.15;
}

.page-title__sub {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 0 var(--space-md) var(--space-xl);
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  background: var(--color-bg-warm);
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: saturate(0.85);
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: saturate(1);
}

.gallery-item__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm);
  background: linear-gradient(to top, rgba(46,42,38,0.7) 0%, transparent 100%);
  color: #fff;
  font-size: 0.8125rem;
  font-family: var(--font-display);
  font-style: italic;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-item__caption {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 14, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox__close:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  background-color: var(--color-bg-warm);
}

.site-footer__text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.9;
}

.site-footer__name {
  font-size: 1rem;
  color: var(--color-accent);
  font-style: normal;
}

.site-footer__year {
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  font-family: var(--font-body);
  letter-spacing: 0.12em;
  margin-top: var(--space-sm);
  color: var(--color-border);
}

/* ============================================================
   DECORATIVE ELEMENTS
   ============================================================ */

/* Ornamental flourish under page titles */
.page-title::after {
  content: '';
  display: block;
  width: 200px;
  height: 24px;
  margin: var(--space-md) auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24'%3E%3Cpath d='M20,12 C32,3 48,3 60,12 C66,16 74,16 80,12 L95,12' stroke='%23c9a98e' fill='none' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M180,12 C168,3 152,3 140,12 C134,16 126,16 120,12 L105,12' stroke='%23c9a98e' fill='none' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M96,12 L100,7 L104,12 L100,17 Z' stroke='%23c9a98e' fill='none' stroke-width='0.8'/%3E%3Ccircle cx='20' cy='12' r='1.5' fill='none' stroke='%23c9a98e' stroke-width='0.8'/%3E%3Ccircle cx='180' cy='12' r='1.5' fill='none' stroke='%23c9a98e' stroke-width='0.8'/%3E%3C/svg%3E") no-repeat center;
  opacity: 0.6;
  pointer-events: none;
}

/* Soft botanical corner accent — top-right of prose sections */
.page-content.prose::before {
  content: '';
  display: block;
  width: 120px;
  height: 120px;
  float: right;
  margin: -1rem -0.5rem 0 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M110,10 C95,25 80,30 60,28 C75,35 85,50 80,70' stroke='%23d9cfc4' fill='none' stroke-width='0.8' stroke-linecap='round'/%3E%3Cpath d='M60,28 C55,22 58,14 65,12' stroke='%23d9cfc4' fill='none' stroke-width='0.7' stroke-linecap='round'/%3E%3Cpath d='M75,45 C70,38 73,30 80,28' stroke='%23d9cfc4' fill='none' stroke-width='0.7' stroke-linecap='round'/%3E%3Cpath d='M80,70 C82,58 90,52 100,55' stroke='%23d9cfc4' fill='none' stroke-width='0.7' stroke-linecap='round'/%3E%3Ccircle cx='110' cy='10' r='2' fill='%23d9cfc4' opacity='0.5'/%3E%3C/svg%3E") no-repeat center;
  opacity: 0.5;
  pointer-events: none;
  shape-outside: circle(50%);
}

/* Decorative double-line accent on candle section */
.candle-section::before {
  content: '';
  display: block;
  width: 140px;
  height: 8px;
  margin: 0 auto var(--space-md);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 8'%3E%3Cline x1='0' y1='2' x2='60' y2='2' stroke='%23d9cfc4' stroke-width='0.6'/%3E%3Cline x1='80' y1='2' x2='140' y2='2' stroke='%23d9cfc4' stroke-width='0.6'/%3E%3Cline x1='0' y1='6' x2='60' y2='6' stroke='%23d9cfc4' stroke-width='0.6'/%3E%3Cline x1='80' y1='6' x2='140' y2='6' stroke='%23d9cfc4' stroke-width='0.6'/%3E%3Cpath d='M66,4 L70,0 L74,4 L70,8 Z' stroke='%23c9a98e' fill='none' stroke-width='0.6'/%3E%3C/svg%3E") no-repeat center;
  opacity: 0.6;
}

/* Soft radial glow behind footer name */
.site-footer::before {
  content: '';
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto calc(-1 * var(--space-lg));
  background: radial-gradient(circle, var(--color-candle-glow) 0%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

/* Enhanced ornament dividers */
.ornament::before,
.ornament::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--color-accent-light);
  vertical-align: middle;
  opacity: 0.5;
}
.ornament::before { margin-right: 1rem; }
.ornament::after  { margin-left: 1rem; }

/* Subtle decorative border on pullquotes */
.pullquote::after {
  content: '';
  display: block;
  width: 40px;
  height: 16px;
  margin-top: var(--space-sm);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16'%3E%3Cpath d='M0,8 Q10,2 20,8 Q30,14 40,8' stroke='%23c9a98e' fill='none' stroke-width='0.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
  opacity: 0.45;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-center { text-align: center; }

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .site-header__inner { padding: 0 var(--space-sm); }

  nav { display: none; }
  nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
  }
  nav.is-open ul { flex-direction: column; gap: var(--space-md); }

  .nav-toggle { display: flex; }

  .hero { min-height: 80vh; }
  .hero::before, .hero::after { display: none; }
  .page-content { padding: var(--space-lg) var(--space-sm); }
  .page-content.prose::before { display: none; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .candle__flame, .candle__glow { animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
