/* ==== Base & Theme ==== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #F8F3EB;           /* soft lilac-cream */
  --bg-soft: #EFE4F5;      /* gentle lavender card background */
  --text-main: #312435;    /* deep plum */
  --text-muted: #7A687F;   /* mauve-grey */
  --accent-teal: #8B6BAF;  /* lavender-plum accent */
  --accent-gold: #D4B27C;  /* warm muted gold for balance */
  --line-soft: #D3C0DF;    /* soft lilac line */

  --font-heading: "Cormorant Garamond", serif;
  --font-body: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --space-xs: 0.5rem;   /* 8px */
  --space-sm: 1rem;     /* 16px */
  --space-md: 1.5rem;   /* 24px */
  --space-lg: 2rem;     /* 32px */
  --space-xl: 3rem;     /* 48px */
  --radius-soft: 14px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.06);
}

/* smooth base transitions */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #F9F4FF 0, var(--bg) 45%, #E9D8F2 100%);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

body.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

body.is-exiting {
  opacity: 0;
  transform: translateY(8px);
}

img {
  max-width: 100%;
  display: block;
}

/* ==== Layout ==== */

.site-header {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(
    to bottom,
    rgba(247,242,250,0.98),
    rgba(247,242,250,0.9),
    transparent
  );
  backdrop-filter: blur(12px);
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* (menu styles kept but unused) */

.menu-toggle {
  background: transparent;
  border: 1px solid rgba(191,160,207,0.7);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.menu-toggle span {
  font-size: 0.9rem;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(247,242,250,0.96);
  backdrop-filter: blur(16px);
  display: none;
  z-index: 19;
}

.nav-overlay.open {
  display: flex;
}

.nav-links {
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: center;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-main);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.2rem;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, var(--accent-gold), var(--accent-teal));
  transform: translateX(-50%);
  transition: width 350ms ease-out;
}

.nav-links a:hover::after {
  width: 60%;
}

/* main layout */

.page {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: var(--space-lg) var(--space-sm) var(--space-xl);
}

.page-inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* ==== Typography ==== */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 300;
  margin: 0;
  color: var(--text-main);
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

h2 {
  font-size: 1.5rem;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  line-height: 1.6;
  font-size: 0.98rem;
}

.subline {
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.soft-small {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* poetry layout */

.poem {
  margin-top: var(--space-lg);
  font-size: 0.98rem;
  line-height: 1.8;
  white-space: pre-line;
  color: var(--text-main);
}

/* ==== Buttons & links ==== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  background: radial-gradient(circle at top left, #F7E9FF, #E3C8FF);
  color: #3A2446;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: var(--space-lg);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255,255,255,0.65), transparent 55%);
  opacity: 0;
  transition: opacity 350ms ease-out;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:hover {
  box-shadow: 0 0 18px rgba(208,158,255,0.35);
  transform: translateY(-1px);
}


/* subtle link underline */

.link-soft {
  text-decoration: none;
  color: var(--accent-teal);
  position: relative;
}

.link-soft::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 0;
  height: 1px;
  background: var(--accent-teal);
  transition: width 300ms ease-out;
}

.link-soft:hover::after {
  width: 100%;
}

/* ==== Card-style sections ==== */

.card-soft {
  background: rgba(239,228,245,0.9);
  border-radius: var(--radius-soft);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(211,192,223,0.85);
}

/* ==== Candle icon (CSS only) ==== */

.icon-candle {
  width: 26px;
  height: 46px;
  border-radius: 999px;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(212,178,124,0.9); /* warm gold outline */
  position: relative;
  display: inline-block;
}

/* warmer flame against purple */
.icon-candle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -16px;
  width: 14px;
  height: 22px;
  border-radius: 50% 50% 50% 50%;
  background: radial-gradient(circle at top,
    #FFEFE0,
    #F6C27A 55%,
    #D8843A 100%
  );
  transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(230,170,102,0.9);
  animation: flame 2.6s ease-in-out infinite;
}

.icon-candle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 8px;
  height: 10px;
  border-radius: 999px;
  background: rgba(130,92,70,0.85);
  transform: translateX(-50%);
}

@keyframes flame {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 0.95;
  }
  40% {
    transform: translateX(-48%) translateY(-1px) scale(1.03);
    opacity: 1;
  }
  70% {
    transform: translateX(-52%) translateY(1px) scale(0.97);
    opacity: 0.9;
  }
}

/* ==== Ticker (very slow, meditative, infinite) ==== */

.ticker {
  margin-top: var(--space-xl);
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: var(--space-xs) 0;
}

.ticker__inner {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-move 60s linear infinite;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ticker__inner span {
  margin-right: 3rem;
}

/* This now loops perfectly—never snaps, never restarts */
@keyframes ticker-move {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==== Scroll fade ==== */

.fade-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
}

.fade-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* soft divider */

.divider-soft {
  margin: var(--space-lg) 0;
  border: none;
  border-top: 1px solid var(--line-soft);
}

/* ==== Footer ==== */

.site-footer {
  padding: var(--space-md) var(--space-md) var(--space-lg);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==== Page navigation buttons ==== */

.page-nav {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: stretch;
}

.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, background 250ms ease-out;
}

.btn-secondary {
  background: linear-gradient(to right, rgba(239,228,245,0.95), rgba(252,242,226,0.9));
  color: var(--text-main);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(211,192,223,0.9);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(0,0,0,0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(211,192,223,0.9);
}

.btn-ghost:hover {
  background: rgba(239,228,245,0.7);
}

@media (min-width: 640px) {
  .page-nav {
    flex-direction: row;
    justify-content: space-between;
  }

  .page-nav a {
    width: auto;
  }
}

/* ==== Intro Screen Animation ==== */

.intro-screen {
  position: fixed;
  inset: 0;
  /* warm → soft lavender base */
  background: radial-gradient(circle at top, #F8F3EB 0%, #F3E4F6 85%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 1;
  animation: introFade 4s ease forwards;
  overflow: hidden;
}

/* lavender overlay that fades in during the last ~2s */
.intro-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, #F9F4FF 0, #F7F2FA 45%, #E9D8F2 100%);
  opacity: 0;
  pointer-events: none;
  animation: introBgShift 2s ease-in forwards 1.8s; /* delay + duration */
}

/* faint rose at the bottom just for intro */
.intro-screen::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 200px;
  width: 320px;
  height: 130px;
  transform: translateX(-50%);
  background: url("assets/rose.svg") center/contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

/* intro candle container gets a brief stronger glow then settles */
.intro-candle {
  width: 20px;
  height: 40px;
  border: 1px solid var(--accent-gold);
  border-radius: 12px;
  position: relative;
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 0 10px rgba(246,194,122,0.5));
  animation: introCandleGlow 2.4s ease-out forwards;
}

.intro-candle::before {
  content:"";
  position:absolute;
  left:50%; top:-14px;
  width: 14px; height:22px;
  transform:translateX(-50%);
  background: radial-gradient(circle at top,
    #FFEFE0,
    #F6C27A 55%,
    #D8843A 100%
  );
  border-radius: 50%;
  animation: flame 2.4s ease-in-out infinite;
}

.intro-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeText 2.2s ease forwards 0.9s;
}

/* keep your existing introFade + fadeText if you already had them,
   or use these: */

@keyframes introFade {
  0%   { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* warm → lavender overlay fade */
@keyframes introBgShift {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* candle glow boost at start */
@keyframes introCandleGlow {
  0% {
    filter: drop-shadow(0 0 26px rgba(246,194,122,0.95));
    transform: translateY(-1px);
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(246,194,122,0.5));
    transform: translateY(0);
  }
}


/* ==== Tiny purple rose mark (blooming) ==== */

.rose-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #FCEBFF, #D991E6 45%, #B85AC3 80%);
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
  box-shadow: 0 0 10px rgba(184,90,195,0.35);
  animation: roseBloom 9s ease-in-out infinite;
}

/* inner swirl petal 1 */
.rose-mark::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  top: 1px;
  left: 2px;
  transform: rotate(-18deg);
}

/* inner swirl petal 2 */
.rose-mark::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  top: 5px;
  right: 1px;
  transform: rotate(16deg);
}

@keyframes roseBloom {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 6px rgba(184,90,195,0.25);
    opacity: 0.9;
  }
  40% {
    transform: scale(1.04);
    box-shadow: 0 0 14px rgba(184,90,195,0.55);
    opacity: 1;
  }
  100% {
    transform: scale(0.98);
    box-shadow: 0 0 6px rgba(184,90,195,0.25);
    opacity: 0.9;
  }
}

/* ================================
   BREADCRUMB DIYA GLOW TRAIL
================================ */

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  margin-top: 2.2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

/* Each diya container */
.breadcrumb-diya {
  width: 16px;
  height: 22px;
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 0 4px rgba(199,126,209,0.35));
  opacity: 0.6;
  transform-origin: center bottom;
  animation: diyaBreath 4.5s ease-in-out infinite;
}

/* Flame */
.breadcrumb-diya::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 10px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50% 50% 60% 60%;
  background: radial-gradient(circle at 30% 10%,
    #FFEFE0,
    #F6C27A 55%,
    #D8843A 100%
  );
}

/* Base */
.breadcrumb-diya::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50% 50% 35% 35%;
  background: linear-gradient(to right, #D4B27C, #A46BB3);
}

/* Active diya (current page) */
.breadcrumb-diya.active {
  opacity: 1;
  filter: drop-shadow(0 0 9px rgba(199,126,209,0.95));
  animation: diyaBreathActive 3.5s ease-in-out infinite;
}

/* Hover – optional, still subtle */
.breadcrumb-diya:hover {
  transform: translateY(-1px) scale(1.05);
  filter: drop-shadow(0 0 11px rgba(199,126,209,1));
  cursor: default; /* not a button, just an indicator */
}

/* Soft breathing animations */

@keyframes diyaBreath {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 3px rgba(199,126,209,0.35));
  }
  50% {
    transform: translateY(-0.5px) scale(1.03);
    filter: drop-shadow(0 0 6px rgba(199,126,209,0.6));
  }
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 3px rgba(199,126,209,0.35));
  }
}

@keyframes diyaBreathActive {
  0% {
    transform: translateY(0) scale(1.02);
    filter: drop-shadow(0 0 7px rgba(199,126,209,0.8));
  }
  50% {
    transform: translateY(-1px) scale(1.08);
    filter: drop-shadow(0 0 13px rgba(199,126,209,1));
  }
  100% {
    transform: translateY(0) scale(1.02);
    filter: drop-shadow(0 0 7px rgba(199,126,209,0.8));
  }
}

@keyframes introFade {
  0% {opacity:1;}
  80% {opacity:1;}
  100% {opacity:0; visibility:hidden;}
}

@keyframes fadeText {
  0% {opacity:0; transform:translateY(8px);}
  100% {opacity:1; transform:translateY(0);}
}

/* ==== Single breathing rose in the background ==== */

.rose-breath {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: -1;
  opacity: 0; /* start hidden */
  background: url("assets/rose.svg") center/contain no-repeat;
  transform-origin: center;
  transform: scale(0.98);
  transition: opacity 1200ms ease-out;
}

@media (max-width: 600px) {
  .rose-breath {
    width: 200px;
    height: 200px;
  }
}

body.is-loaded .rose-breath {
  opacity: 0.14; /* faint */
  animation: roseBreathing 18s ease-in-out infinite;
}

@keyframes roseBreathing {
  0% {
    transform: scale(0.98);
    opacity: 0.12;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.18;
  }
  100% {
    transform: scale(0.98);
    opacity: 0.12;
  }
}


/* ==== Responsive ==== */

@media (min-width: 768px) {
  .page {
    padding: var(--space-xl) var(--space-xl) var(--space-xl);
  }

  h1 {
    font-size: 2.2rem;
  }

  .card-soft {
    padding: var(--space-xl);
  }

  .site-header {
    padding-inline: var(--space-xl);
  }

  .site-footer {
    padding-inline: var(--space-xl);
  }
}
