:root {
  --bg: #ffffff;
  --ink: #0c26515c; /* slate blue */
  --font-serif: "Libre Baskerville", serif;
  --font-script: "Great Vibes", cursive;
}

/* ==============
   GLOBAL RESET
   ============== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ==============
   LAYOUT
   ============== */
main {
  text-align: center;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  position: relative;
}

/* ===========================
   FLOWER SVG
   =========================== */

.flower-svg {
  width: 260px;      /* scale here */
  max-width: 80%;
  /* filter: drop-shadow(0 1px 1px rgba(110,122,140,0.08)); */
}

/* Base path style */
.flower-svg path {
  fill: none;
  stroke: #456ca74f;         /* elegant bluish line */
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-linejoin: round;

  /*
    We start hidden by using a long dash and matching offset.
    We use a literal number instead of a CSS var so it's valid at first paint.
    JS can overwrite these with the real path length later if you want,
    but this alone already works for most icons/illustrations.
  */
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;

  /*
    We do NOT animate yet. We’ll only animate once body gets .loaded.
    Note: no color flash because stroke is already set, but it's "masked"
    by dashoffset.
  */
  transition: stroke-dashoffset 10s ease-in-out;
}

/* When the document is ready and we add .loaded to <body>,
   we reveal the strokes by sliding dashoffset to 0 → "drawing" effect.
*/
body.loaded .flower-svg path {
  stroke-dashoffset: 0;
}

/* ===========================
   TEXT
   =========================== */

.names {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 3rem, 3.5rem);
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5ch;
  text-align: center;

  opacity: 0;
  transform: translateY(12px);
  transition: 
    opacity 4s ease,
    transform 4s ease;
  transition-delay: 2s; /* wait a bit so the flower can start drawing first */
  will-change: opacity, transform;
}

.details {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  text-align: center;
  color: var(--ink);

  opacity: 0;
  transform: translateY(12px);
  transition: 
    opacity 4s ease,
    transform 4s ease;
  transition-delay: 2.5s; /* wait a bit so the flower can start drawing first */
  will-change: opacity, transform;
}

.divider {
  width: 15rem;
  height: 1px;
  background-color: var(--ink);
  opacity: 0.3;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.smallprint {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
  text-align: center;
}

.footer {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.8;
  text-align: center;
  user-select: text;
  word-break: break-word;
  padding-top: 50px;

  opacity: 0;
  transform: translateY(12px);
  transition: 
    opacity 4s ease,
    transform 4s ease;
  transition-delay: 4s; /* wait a bit so the flower can start drawing first */
  will-change: opacity, transform;
}

/* ===========================
   TEXT FADE-IN
   =========================== */
/* Fade text in once body is marked loaded */
body.loaded .names{
  opacity: 1;
  transform: translateY(0);
}
body.loaded .details{
  opacity: 1;
  transform: translateY(0);
}
body.loaded .footer{
  opacity: 1;
  transform: translateY(0);
}
