/* ══════════════════════════════════════════════════════════════════════════
   Zahra · Forever & Always
   Design system · Full stylesheet
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  /* Garden greens */
  --g-deep:    #060e08;
  --g-dark:    #0a1510;
  --g-forest:  #112018;
  --g-mid:     #1a4a2e;
  --g-sage:    #4a8a5a;
  --g-light:   #7fb08a;
  --g-mist:    #b8d4be;

  /* Rose spectrum */
  --rose-deep:  #6a0a32;
  --rose-mid:   #b83264;
  --rose-soft:  #e89ab0;
  --rose-blush: #f5c8d5;
  --rose-petal: #fde8ef;

  /* Cream / ivory */
  --cream:  #f0e8d8;
  --ivory:  #fdf6ec;
  --warm:   #f8f0e2;

  /* Gold / moonstone */
  --gold:       #c8a84a;
  --gold-light: #e0cc80;
  --moon:       #aac4e0;
  --moon-glow:  rgba(170,196,224,.25);

  /* Text */
  --txt-light:  #f0e8d8;
  --txt-muted:  #9ab8a0;
  --txt-dark:   #1a2818;
  --txt-dmuted: #4a6848;

  /* Section backgrounds */
  --section-bg: #0e1c12;
  --mid-bg:     #13211a;
  --forever-bg: #05090a;

  /* Fonts */
  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-body:    'EB Garamond', Georgia, serif;
  --f-script:  'Dancing Script', cursive;
  --f-ui:      'Josefin Sans', sans-serif;

  /* Easing */
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background: var(--g-dark);
  color: var(--txt-light);
  font-family: var(--f-body);
  overflow-x: hidden;
  cursor: none;
}

::selection { background: rgba(200,168,74,.25); color: var(--gold-light); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 4px; }
::-webkit-scrollbar-track        { background: var(--g-dark); }
::-webkit-scrollbar-thumb        { background: var(--rose-mid); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover  { background: var(--rose-soft); }

/* ── Petal canvas ───────────────────────────────────────────────────────── */
#petalCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── Cursor glow ────────────────────────────────────────────────────────── */
#cursorGlow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(200,168,74,.05) 0%, rgba(184,50,100,.04) 40%, transparent 70%);
  transition: opacity .3s;
  transform: translate(-50%, -50%);
}

/* Dot cursor */
body::after {
  content: '';
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rose-soft);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform .1s, background .2s;
  top: var(--cy, 50%);
  left: var(--cx, 50%);
}

/* ── Loader ─────────────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g-deep);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.loader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.loader-arabic {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 300;
  color: var(--rose-soft);
  letter-spacing: .15em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s, transform .8s var(--ease-out);
}

.loader-name {
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  color: var(--txt-light);
  letter-spacing: .08em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s .3s, transform .8s .3s var(--ease-out);
  line-height: 1;
}

.loader-tagline {
  font-family: var(--f-script);
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: .04em;
  color: var(--gold);
  opacity: 0;
  animation: loaderTagFade 1s 1.2s forwards;
}
@keyframes loaderTagFade { to { opacity: 1; } }

.loader-bar {
  width: 160px;
  height: 1px;
  background: rgba(255,255,255,.1);
  border-radius: 1px;
  overflow: hidden;
  margin-top: .8rem;
}

.loader-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rose-mid), var(--gold));
  border-radius: 1px;
  transition: width .2s linear;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.5rem;
  transition: background .4s, padding .4s, backdrop-filter .4s;
}

#nav.nav-scrolled {
  background: rgba(6, 14, 8, .85);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  padding: 1rem 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.nav-brand {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--rose-soft);
  letter-spacing: .12em;
  cursor: pointer;
  transition: color .3s;
}
.nav-brand:hover { color: var(--rose-blush); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-family: var(--f-ui);
  font-size: .7rem;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--txt-muted);
  cursor: pointer;
  position: relative;
  padding-bottom: 4px;
  transition: color .3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .3s var(--ease-out);
}
.nav-link:hover,
.nav-link.active { color: var(--gold); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Scroll-reveal base ─────────────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.rv-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll offset for fixed nav ────────────────────────────────────────── */
section, #hero {
  scroll-margin-top: 72px;
}

/* ── Section shared ─────────────────────────────────────────────────────── */
.section {
  position: relative;
  padding: 6rem 2rem 7rem;
}

.section-dark { background: var(--section-bg); }
.section-mid  { background: var(--mid-bg); }
.section-light{ background: var(--ivory); }

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  transition-delay: .05s;
}

.section-ornament {
  display: block;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: .5em;
  margin-bottom: .8rem;
  animation: spinOrn 8s linear infinite;
}
@keyframes spinOrn {
  0%,100%{ transform: rotate(0deg) scale(1);   opacity:.7; }
  50%    { transform: rotate(180deg) scale(1.2);opacity:1; }
}

.section-header h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 300;
  color: var(--txt-light);
  letter-spacing: .04em;
  line-height: 1.15;
}

.section-dark  .section-header h2,
.section-mid   .section-header h2 { color: var(--txt-light); }
.section-light .section-header h2 { color: var(--txt-dark); }

.section-header h2 em {
  font-style: italic;
  color: var(--rose-soft);
}
.section-light .section-header h2 em { color: var(--rose-mid); }

.section-sub {
  font-family: var(--f-body);
  font-style: italic;
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: #b8d0be;  /* boosted from --txt-muted for WCAG AA */
  margin-top: .6rem;
}
.section-light .section-sub { color: var(--txt-dmuted); }

/* ── Wave dividers ──────────────────────────────────────────────────────── */
.div-wave { line-height: 0; overflow: hidden; }
.div-wave svg { width: 100%; display: block; }
.div-wave--to-section  { background: var(--g-dark); }
.div-wave--mid         { background: var(--section-bg); }
.div-wave--back-dark   { background: var(--mid-bg); }
.div-wave--to-light    { background: var(--section-bg); }
.div-wave--to-forever  { background: var(--ivory); height: 70px; position: relative; }
.div-wave--to-forever svg { position: absolute; inset: 0; height: 100%; }

/* ══ § 1 HERO ═══════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--g-dark);
}

/* Aurora orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(26,92,53,.55) 0%, transparent 70%);
  top: -15%; left: -10%;
  animation: orbFloat1 18s ease-in-out infinite;
}
.hero-orb-2 {
  width: 45vw; height: 45vw;
  background: radial-gradient(circle, rgba(184,50,100,.3) 0%, transparent 70%);
  bottom: -10%; right: -5%;
  animation: orbFloat2 22s ease-in-out infinite;
}
.hero-orb-3 {
  width: 35vw; height: 35vw;
  background: radial-gradient(circle, rgba(200,168,74,.18) 0%, transparent 70%);
  top: 40%; left: 45%;
  animation: orbFloat3 26s ease-in-out infinite;
}
@keyframes orbFloat1 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(4%,6%) scale(1.06)} 66%{transform:translate(-3%,3%) scale(.97)} }
@keyframes orbFloat2 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(-5%,-4%) scale(1.08)} 66%{transform:translate(3%,-2%) scale(.95)} }
@keyframes orbFloat3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-4%,5%) scale(1.1)} }

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 2rem;
}

.hero-meaning {
  font-family: var(--f-ui);
  font-size: clamp(.7rem, 1.8vw, .9rem);
  font-weight: 200;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--rose-soft);
  transition-delay: .1s;
}

.hero-name {
  font-family: var(--f-display);
  font-size: clamp(5rem, 18vw, 15rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: .88;
  color: var(--txt-light);
  margin: .2rem 0 .3rem;
  text-shadow: 0 0 120px rgba(184,50,100,.2), 0 0 60px rgba(26,92,53,.15);
  cursor: pointer;
  user-select: none;
  transition: text-shadow .4s;
}
.hero-name:hover {
  text-shadow: 0 0 140px rgba(184,50,100,.35), 0 0 80px rgba(200,168,74,.15);
}
.hero-name-glow {
  text-shadow: 0 0 80px var(--gold), 0 0 40px var(--gold-light) !important;
  animation: nameGlow .5s ease-in-out 4 alternate;
}
@keyframes nameGlow {
  from { text-shadow: 0 0 40px var(--gold); }
  to   { text-shadow: 0 0 120px var(--gold), 0 0 60px var(--gold-light); }
}

.hero-tagline {
  font-family: var(--f-script);
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: var(--gold);
  transition-delay: .15s;
}

.hero-date {
  font-family: var(--f-ui);
  font-size: clamp(.65rem, 1.5vw, .8rem);
  font-weight: 200;
  letter-spacing: .4em;
  color: var(--txt-muted);
  margin-top: .5rem;
  transition-delay: .2s;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2.5rem;
  font-family: var(--f-ui);
  font-size: .65rem;
  font-weight: 300;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--txt-muted);
  animation: heroScrollBob 2.4s ease-in-out infinite;
  transition-delay: .3s;
}
.hero-scroll svg { width: 10px; height: 18px; color: var(--rose-soft); }
@keyframes heroScrollBob {
  0%,100%{ transform: translateY(0); }
  50%    { transform: translateY(5px); }
}

/* Corner ornaments */
.hero-corner {
  position: absolute;
  width: 80px; height: 80px;
  opacity: .4;
  animation: cornerPulse 4s ease-in-out infinite;
}
.hero-corner-tl { top: 2rem; left: 2rem; }
.hero-corner-br { bottom: 2rem; right: 2rem; transform: scaleX(-1) scaleY(-1); }
@keyframes cornerPulse { 0%,100%{ opacity:.3; } 50%{ opacity:.7; } }

/* ══ § 2 MEMORY GARDEN ══════════════════════════════════════════════════ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.photo-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--g-forest);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .4s var(--ease-back), box-shadow .4s, border-color .3s;
  will-change: transform;
  aspect-ratio: 3/4;
}

/* Varied aspect ratios for visual rhythm */
.photo-card:nth-child(3n+1) { aspect-ratio: 3/4; }
.photo-card:nth-child(3n+2) { aspect-ratio: 4/5; }
.photo-card:nth-child(3n)   { aspect-ratio: 1/1; }

.photo-card:hover {
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(200,168,74,.2);
  border-color: rgba(200,168,74,.2);
}

.photo-card-inner {
  position: absolute;
  inset: 0;
}

.photo-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}
.photo-card:hover img { transform: scale(1.06); }

/* Placeholder gradient cards */
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}
.photo-ph-icon { font-size: 2rem; opacity: .6; }
.photo-ph-text {
  font-family: var(--f-ui);
  font-size: .6rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}

/* Overlay on hover */
.photo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,14,8,.9) 0%, rgba(6,14,8,.3) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .4s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  gap: .3rem;
}
.photo-card:hover .photo-card-overlay { opacity: 1; }

.photo-caption {
  font-family: var(--f-body);
  font-style: italic;
  font-size: .95rem;
  color: var(--txt-light);
  line-height: 1.4;
}
.photo-date, .photo-location {
  font-family: var(--f-ui);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Date badge */
.photo-badge {
  position: absolute;
  top: .8rem; right: .8rem;
  background: rgba(6,14,8,.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200,168,74,.3);
  color: var(--gold);
  font-family: var(--f-ui);
  font-size: .55rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  border-radius: 4px;
}

/* ── Photo Modal ────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}
.modal.modal-open {
  pointer-events: all;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,14,8,.88);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.modal-box {
  position: relative;
  z-index: 1;
  background: var(--g-forest);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow: hidden;
  max-width: 700px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  transform: scale(.94);
  transition: transform .4s var(--ease-back);
}
.modal.modal-open .modal-box { transform: scale(1); }

.modal-close {
  position: absolute;
  top: .8rem; right: .8rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(6,14,8,.7);
  color: var(--txt-light);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.modal-close:hover { background: var(--rose-mid); border-color: var(--rose-mid); }

.modal-media {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 65vh;
}
.modal-placeholder {
  display: none;
  width: 100%;
  height: 400px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.modal-info {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.modal-caption {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--txt-light);
  margin-bottom: .5rem;
}
.modal-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.modal-date, .modal-location {
  font-family: var(--f-ui);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ══ § 3 HER UNIVERSE ═══════════════════════════════════════════════════ */
.trait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.trait-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  transition: transform .4s var(--ease-back), box-shadow .4s, border-color .3s, background .3s;
  cursor: default;
  will-change: transform;
}
.trait-card:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(200,168,74,.25);
  box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 0 1px rgba(200,168,74,.1);
}

.trait-icon {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(200,168,74,.3));
}

.trait-title {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rose-blush);
  letter-spacing: .02em;
}

.trait-body {
  font-family: var(--f-body);
  font-size: .95rem;
  color: var(--txt-muted);
  line-height: 1.7;
  font-style: italic;
}

/* ══ § 4 THINGS THAT ARE YOU ════════════════════════════════════════════ */
.things-list {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  counter-reset: things;
}

.thing-item {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: border-color .3s;
}
.thing-item:hover { border-color: rgba(200,168,74,.15); }

.thing-num {
  font-family: var(--f-ui);
  font-size: .6rem;
  font-weight: 300;
  letter-spacing: .15em;
  color: var(--gold);
  opacity: .5;
  flex-shrink: 0;
  min-width: 2.2rem;
  transition: opacity .3s;
}
.thing-item:hover .thing-num { opacity: 1; }

.thing-text {
  font-family: var(--f-body);
  font-size: clamp(.95rem, 2vw, 1.15rem);
  font-style: italic;
  color: var(--txt-light);
  line-height: 1.5;
  transition: color .3s;
}
.thing-item:hover .thing-text { color: var(--rose-blush); }

/* ══ § 5 A LETTER ═══════════════════════════════════════════════════════ */
.section-light { position: relative; }

.letter-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
}

.letter-paper {
  background: var(--ivory);
  border-radius: 4px 4px 4px 4px;
  box-shadow:
    0 2px 0 rgba(0,0,0,.06),
    0 8px 32px rgba(0,0,0,.12),
    0 32px 80px rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(0,0,0,.04);
  padding: 4rem 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Paper texture lines */
.letter-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    rgba(100,140,100,.08) 31px,
    rgba(100,140,100,.08) 32px
  );
  pointer-events: none;
}

/* Left margin rule */
.letter-paper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 2.4rem;
  width: 1px;
  background: rgba(200,80,80,.12);
}

.letter-rose-wrap {
  position: absolute;
  top: 1.5rem; right: 1.8rem;
  width: 100px;
  opacity: .5;
  pointer-events: none;
}
.letter-rose-svg { width: 100%; height: auto; }

.letter-body { position: relative; z-index: 1; }

.letter-text {
  font-family: var(--f-display);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  font-weight: 400;
  color: var(--txt-dark);
  line-height: 2;
  min-height: 200px;
}
.letter-text p {
  margin-bottom: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: 2;
  color: inherit;
}
.letter-text p:empty::after,
.letter-text br {
  display: block;
  content: '';
  height: 1rem;
}

.letter-signature {
  font-family: var(--f-script);
  font-size: 1.6rem;
  color: var(--rose-mid);
  margin-top: 2.5rem;
  opacity: 0;
  animation: sigFade .8s 0s forwards paused;
}
.letter-signature.sig-visible {
  animation-play-state: running;
}
@keyframes sigFade { to { opacity: 1; } }

/* Typing cursor */
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--rose-mid);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink .7s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ══ § 6 FOREVER & ALWAYS ═══════════════════════════════════════════════ */
#forever {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--forever-bg);
}

#foreverCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.forever-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.forever-meaning {
  font-family: var(--f-ui);
  font-size: clamp(.65rem, 1.6vw, .8rem);
  font-weight: 200;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--rose-soft);
  transition-delay: .05s;
}

.forever-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 12vw, 10rem);
  font-weight: 700;
  line-height: .9;
  color: var(--txt-light);
  margin: .5rem 0;
  letter-spacing: -.01em;
}

.forever-word { transition-delay: .1s; }
.forever-amp  {
  font-style: italic;
  color: var(--rose-soft);
  font-size: .6em;
  transition-delay: .15s;
}

.forever-name {
  font-family: var(--f-script);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gold);
  margin-top: .6rem;
  transition-delay: .2s;
}

.forever-date {
  font-family: var(--f-ui);
  font-size: clamp(.6rem, 1.4vw, .75rem);
  font-weight: 200;
  letter-spacing: .4em;
  color: var(--txt-muted);
  margin-top: .6rem;
  transition-delay: .25s;
}

.forever-ornament {
  margin-top: 2.5rem;
  font-size: 1.2rem;
  color: var(--rose-soft);
  letter-spacing: .2em;
  transition-delay: .3s;
  animation: ornPulse 3s ease-in-out infinite;
}
@keyframes ornPulse {
  0%,100%{ transform:scale(1);   opacity:.7; }
  50%    { transform:scale(1.12);opacity:1; }
}

/* ══ § 5  WRITTEN FOR YOU (poems) ══════════════════════════════════════ */
:root {
  --poem-bg: #0c1810;
}

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

.div-wave--mid-alt { background: var(--section-bg); }

.poem-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.poem-card {
  position: relative;
  border: 1px solid rgba(200,168,74,.18);
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  background: rgba(255,255,255,.025);
  overflow: hidden;
  transition: border-color .4s, background .4s, box-shadow .4s;
  cursor: pointer;
}
.poem-card:hover {
  border-color: rgba(200,168,74,.5);
  background: rgba(255,255,255,.05);
  box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(200,168,74,.15);
}

/* large decorative number */
.poem-card::before {
  content: attr(data-num);
  position: absolute;
  top: -1rem;
  right: 1.2rem;
  font-family: var(--f-display);
  font-size: 8rem;
  font-weight: 700;
  color: rgba(200,168,74,.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.poem-card-num {
  font-family: var(--f-ui);
  font-size: .55rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .6rem;
}

.poem-card-title {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  font-style: italic;
  color: var(--txt-light);
  line-height: 1.1;
  margin-bottom: .8rem;
}

.poem-card-excerpt {
  font-family: var(--f-body);
  font-style: italic;
  font-size: .95rem;
  color: var(--txt-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.poem-card-stanzas {
  display: none;
  flex-direction: column;
  gap: 1.2rem;
}
.poem-card.poem-expanded .poem-card-stanzas { display: flex; }
.poem-card.poem-expanded .poem-card-excerpt  { display: none; }

.poem-stanza {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.poem-line {
  font-family: var(--f-display);
  font-size: 1.05rem;
  color: var(--txt-light);
  line-height: 1.75;
}

.poem-card-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--f-ui);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(200,168,74,.3);
  border-radius: 20px;
  padding: .4rem .9rem;
  cursor: pointer;
  background: none;
  transition: background .2s, border-color .2s, color .2s;
  margin-top: auto;
}
.poem-card-toggle:hover {
  background: rgba(200,168,74,.1);
  border-color: var(--gold);
}

.poem-attribution {
  font-family: var(--f-script);
  font-size: 1.1rem;
  color: var(--rose-soft);
  margin-top: 1.5rem;
  opacity: .7;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(6,14,8,.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1rem;
  padding: .75rem 1.6rem;
  border-radius: 32px;
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s, transform .4s var(--ease-out);
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
}
#toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Scroll progress bar ────────────────────────────────────────────────── */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--rose-mid), var(--gold), var(--g-sage));
  z-index: 10001;
  transition: width .1s linear;
}

/* ── Back to top ────────────────────────────────────────────────────────── */
#btt {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(6,14,8,.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(200,168,74,.3);
  color: var(--gold);
  font-size: 1rem;
  cursor: pointer;
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s, background .2s;
}
#btt.btt-visible { opacity: 1; transform: translateY(0); }
#btt:hover { background: var(--rose-mid); border-color: var(--rose-mid); }

/* ── Special nav links ────────────────────────────────────────────────── */
.nav-link-msgs {
  color: var(--rose-soft) !important;
  border: 1px solid rgba(232,154,176,.3);
  border-radius: 4px;
  padding: .2rem .6rem;
  font-size: .62rem !important;
}
.nav-link-msgs:hover { background: rgba(232,154,176,.1); }
.nav-link-msgs::after { display: none !important; }

.nav-link-gallery {
  color: var(--gold) !important;
  border: 1px solid rgba(200,168,74,.3);
  border-radius: 4px;
  padding: .2rem .6rem;
  font-size: .62rem !important;
}
.nav-link-gallery:hover { background: rgba(200,168,74,.1); }
.nav-link-gallery::after { display: none !important; }

/* ── Hamburger button ─────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 7px;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
  z-index: 1001;
}
.nav-hamburger:hover {
  border-color: rgba(200,168,74,.4);
  background: rgba(200,168,74,.06);
}
.nav-hamburger span {
  display: block;
  width: 100%; height: 1.5px;
  background: var(--txt-light);
  border-radius: 1px;
  transition: transform .3s var(--ease-out), opacity .2s;
  transform-origin: center;
}
/* X state */
#nav.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#nav.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ══ Responsive ══════════════════════════════════════════════════════════ */

/* ── iPad Pro / small desktop (≤ 1100px) ─────────────────────────────── */
@media (max-width: 1100px) {
  .nav-links { gap: 1.2rem; }
}

/* ── iPad landscape / large tablet (≤ 1024px) ────────────────────────── */
@media (max-width: 1024px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .trait-grid  { grid-template-columns: repeat(3, 1fr); }
}

/* ── iPad portrait / tablet (≤ 768px) ────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav → hamburger */
  #nav { padding: 1rem 1.2rem; }
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6,14,8,.97);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(200,168,74,.18);
    padding: .8rem 0 1.2rem;
    z-index: 1000;
    animation: menuSlideDown .25s var(--ease-out);
  }
  #nav.nav-open .nav-links { display: flex; }

  .nav-link {
    font-size: .7rem;
    letter-spacing: .2em;
    padding: .85rem 1.6rem;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.04);
    color: var(--txt-muted);
  }
  .nav-link:hover, .nav-link.active { color: var(--gold); background: rgba(200,168,74,.05); }
  .nav-link::after { display: none; }

  .nav-link-msgs, .nav-link-gallery {
    margin: .4rem 1.2rem 0;
    text-align: center;
    border-radius: 8px !important;
    padding: .6rem 1rem !important;
    font-size: .68rem !important;
  }

  /* Sections */
  .section { padding: 4rem 1rem 5rem; }
  .section-header { margin-bottom: 2.5rem; }

  /* Hero */
  .hero-content { padding: 1.5rem; }

  /* Photo grid: 2 cols on tablet */
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .photo-card:nth-child(3n+1),
  .photo-card:nth-child(3n+2),
  .photo-card:nth-child(3n) { aspect-ratio: 3/4; }

  /* Trait cards: 2 cols on tablet */
  .trait-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .trait-card { padding: 1.2rem 1rem; }

  /* Poem cards: stack */
  .poem-cards { grid-template-columns: 1fr; gap: 1.2rem; }

  /* Things list */
  .things-list { padding: 0 .5rem; }
  .thing-text { font-size: 1rem; }

  /* Letter */
  .letter-wrap { padding: 0 .5rem; }
  .letter-paper { padding: 2.5rem 1.5rem 2rem; }
  .letter-rose-wrap { width: 60px; top: 1rem; right: .8rem; opacity: .35; }
  .letter-paper::after { left: 1.6rem; }
  .letter-text { font-size: 1rem; }

  /* Forever */
  .forever-headline { font-size: clamp(2.8rem, 14vw, 6rem); }
  .forever-name { font-size: clamp(1.8rem, 6vw, 3rem); }

  body::after { display: none; }
  #cursorGlow  { display: none; }
}

/* ── Large phone (≤ 600px) ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-meaning { font-size: .65rem; letter-spacing: .22em; }
  .hero-date    { font-size: .62rem; letter-spacing: .25em; }
  .hero-corner  { width: 56px; height: 56px; }

  .section { padding: 3rem .9rem 4rem; }

  .photo-grid { gap: .6rem; }
  .trait-grid { grid-template-columns: 1fr; }
  .trait-body { font-size: .9rem; }

  .things-list { gap: 0; }
  .thing-item  { padding: .6rem 0; }

  .letter-paper { padding: 2rem 1.2rem 1.8rem; }
  .letter-rose-wrap { display: none; }
  .letter-paper::before { display: none; }
  .letter-paper::after  { display: none; }

  .modal-box { border-radius: 12px; }
  .modal-info { padding: .9rem 1.1rem; }

  #btt { bottom: 1.2rem; right: 1.2rem; width: 36px; height: 36px; }
}

/* ── Small phone (≤ 480px) ────────────────────────────────────────────── */
@media (max-width: 480px) {
  #nav { padding: .8rem 1rem; }

  .hero-scroll { display: none; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }

  .section-header h2 { font-size: clamp(1.7rem, 7vw, 2.5rem); }
  .section-sub { font-size: .85rem; }

  .thing-num  { font-size: .55rem; min-width: 2rem; }
  .thing-text { font-size: .93rem; }

  .poem-card { padding: 1.5rem 1.2rem 1.2rem; }
  .poem-card::before { font-size: 6rem; }

  .forever-headline { gap: .4rem; font-size: clamp(2.2rem, 13vw, 4rem); }
  .forever-name { font-size: clamp(1.5rem, 7vw, 2.5rem); }

  .loader-name { font-size: clamp(3rem, 14vw, 5rem); }
  .loader-arabic { font-size: 1.6rem; }
  .loader-tagline { font-size: clamp(1.4rem, 6vw, 2.2rem); }
}

@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ Reduced motion ══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1 !important; transform: none !important; }
  #petalCanvas { display: none; }
  #cursorGlow  { display: none; }
  .hero-orb    { animation: none; }
}
