/* =========================================================
   Elyse's Story — Modern Redesign
   Warm & Heartfelt Theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Nunito:wght@300;400;500;600;700&display=swap');

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

:root {
  --cream:      #FFF8F2;
  --cream-dark: #F5EDE2;
  --rose:       #C4768A;
  --rose-light: #EAB8C4;
  --rose-dark:  #9E5268;
  --sage:       #7A9E7E;
  --sage-light: #B8D4BB;
  --gold:       #C8974A;
  --gold-light: #EDD9A3;
  --brown:      #3D2B2B;
  --brown-light:#6B4F4F;
  --white:      #FFFFFF;
  --shadow:     rgba(61,43,43,0.10);
  --radius:     14px;
  --nav-h:      68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--brown);
  font-size: 17px;
  line-height: 1.75;
}

img { max-width: 100%; display: block; }
a   { color: var(--rose-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ── */
h1,h2,h3,h4,h5 {
  font-family: 'Lora', serif;
  color: var(--brown);
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: .5rem; }
h3 { font-size: 1.3rem; margin-bottom: .4rem; }
p  { margin-bottom: 1.1rem; }
blockquote {
  border-left: 4px solid var(--rose-light);
  padding: .6rem 1.2rem;
  font-style: italic;
  color: var(--brown-light);
  margin: 1.5rem 0;
  background: var(--cream-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,248,242,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rose-light);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1rem;
}
.site-nav .nav-brand {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rose-dark);
  white-space: nowrap;
  margin-right: auto;
}
.site-nav .nav-links {
  display: flex;
  gap: .25rem;
  list-style: none;
  flex-wrap: wrap;
}
.site-nav .nav-links a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--brown-light);
  padding: .4rem .7rem;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  background: var(--rose-light);
  color: var(--rose-dark);
  text-decoration: none;
}
/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: .3s;
}

/* ── Page layout ── */
.page-content {
  padding-top: var(--nav-h);
}

/* ── Hero ── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 60%, var(--gold-light) 100%);
  padding: 5rem 2rem 4rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(196,118,138,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(122,158,126,.10) 0%, transparent 55%);
}
.hero-inner {
  position: relative;
  max-width: 800px;
}
.hero-portrait {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--white);
  box-shadow: 0 8px 32px var(--shadow), 0 0 0 8px var(--rose-light);
  margin: 0 auto 2rem;
}
.hero-tag {
  display: inline-block;
  background: var(--rose-light);
  color: var(--rose-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--brown-light);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}
.hero-quote {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--brown-light);
  max-width: 560px;
  margin: 0 auto;
  opacity: .8;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.8rem;
  border-radius: 40px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--shadow); text-decoration: none; }
.btn-primary {
  background: var(--rose-dark);
  color: var(--white);
}
.btn-secondary {
  background: var(--white);
  color: var(--rose-dark);
  border: 2px solid var(--rose-light);
}
.btn-sage {
  background: var(--sage);
  color: var(--white);
}
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }

/* ── Sections ── */
.section {
  padding: 5rem 2rem;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  display: inline-block;
  background: var(--gold-light);
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.section-bg {
  background: var(--cream-dark);
}
.section-sage {
  background: linear-gradient(135deg, #EFF6F0 0%, #D4E8D6 100%);
}

/* ── Chapter Cards ── */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.chapter-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow);
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
  color: var(--brown);
  display: flex;
  flex-direction: column;
}
.chapter-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(61,43,43,.15); text-decoration: none; }
.chapter-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.chapter-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chapter-card-tag {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: .4rem;
}
.chapter-card h3 {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  margin-bottom: .5rem;
}
.chapter-card p {
  font-size: .9rem;
  color: var(--brown-light);
  margin-bottom: 0;
  flex: 1;
}

/* ── Photo Gallery Grid ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 2rem;
}
.photo-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--cream-dark);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.photo-item:hover img { transform: scale(1.07); }
.photo-item .photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(61,43,43,.85) 0%, transparent 100%);
  color: var(--white);
  font-size: .8rem;
  padding: .8rem .7rem .5rem;
  transform: translateY(100%);
  transition: transform .3s;
}
.photo-item:hover .photo-caption { transform: translateY(0); }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox-caption {
  color: #ddd;
  margin-top: 1rem;
  font-size: .95rem;
  text-align: center;
}
.lightbox-close {
  position: fixed;
  top: 1.2rem; right: 1.5rem;
  background: none; border: none;
  color: #fff; font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-nav {
  display: flex;
  gap: 2rem;
  margin-top: 1.2rem;
}
.lightbox-nav button {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: .5rem 1.4rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: .95rem;
  transition: background .2s;
}
.lightbox-nav button:hover { background: rgba(255,255,255,.3); }

/* ── Timeline ── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0;
  padding: 0 1rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--rose-light), var(--sage-light));
  transform: translateX(-50%);
}
.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 2.5rem);
  margin-bottom: 3rem;
  position: relative;
}
.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 2.5rem);
}
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 1.2rem;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  background: var(--rose);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--rose-light);
  z-index: 1;
}
.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 4px 16px var(--shadow);
  max-width: 360px;
  width: 100%;
}
.timeline-card .year-tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: .4rem;
}
.timeline-card h3 {
  font-size: 1.1rem;
  margin-bottom: .5rem;
}
.timeline-card p {
  font-size: .9rem;
  color: var(--brown-light);
  margin-bottom: 0;
}
.timeline-card img {
  width: 100%;
  border-radius: 8px;
  margin-top: .9rem;
  object-fit: cover;
  max-height: 180px;
}

/* ── Poem Cards ── */
.poem-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 4px 16px var(--shadow);
  margin-bottom: 2rem;
  border-left: 5px solid var(--rose-light);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.poem-card h3 {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  color: var(--rose-dark);
  margin-bottom: 1.2rem;
}
.poem-card pre {
  font-family: 'Nunito', sans-serif;
  font-size: .97rem;
  line-height: 1.9;
  white-space: pre-wrap;
  color: var(--brown);
}

/* ── Prose content ── */
.prose {
  max-width: 720px;
  margin: 0 auto;
}
.prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 1.8rem; color: var(--rose-dark); }
.lead {
  font-size: 1.15rem;
  color: var(--brown-light);
  margin-bottom: 2rem;
  font-style: italic;
}

/* ── Two column ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.two-col.reversed { direction: rtl; }
.two-col.reversed > * { direction: ltr; }
@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .two-col.reversed { direction: ltr; }
}

/* ── Info Card ── */
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 18px var(--shadow);
}
.info-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }

/* ── Decorative divider ── */
.divider {
  text-align: center;
  margin: 3rem 0;
  color: var(--rose-light);
  font-size: 1.2rem;
  letter-spacing: .4em;
}

/* ── Page Header (inner pages) ── */
.page-header {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding: 5rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--rose-light);
}
.page-header .section-label { margin-bottom: 1rem; }
.page-header h1 { margin-bottom: .8rem; }
.page-header .subtitle {
  font-size: 1.05rem;
  color: var(--brown-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Footer ── */
.site-footer {
  background: var(--brown);
  color: rgba(255,248,242,.7);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: .88rem;
}
.site-footer a { color: var(--rose-light); }
.site-footer .footer-name {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: .5rem;
}
.site-footer .footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 1rem 0;
}
.site-footer .footer-links a {
  color: rgba(255,248,242,.7);
  font-size: .85rem;
}
.site-footer .footer-links a:hover { color: var(--rose-light); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-nav { padding: 0 1.2rem; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--rose-light); padding: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .timeline::before { left: 1.5rem; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    padding-left: 4rem;
    padding-right: 0;
    justify-content: flex-start;
  }
  .timeline-dot {
    left: 1.5rem;
  }
  .timeline-card { max-width: 100%; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .section { padding: 3.5rem 1.2rem; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }
