/* ==========================================================
   A LITTLE SURPRISE FOR YOU — core stylesheet
   ========================================================== */

:root{
  --bg: #1A0505;
  --bg-2: #33090A;
  --gold: #E8B84B;
  --pink: #E2733E;
  --purple: #B23A2E;
  --text: #FFF6EA;
  --muted: #D8AE96;

  --grad-gold-pink: linear-gradient(120deg, var(--gold), var(--pink));
  --grad-pink-purple: linear-gradient(120deg, var(--pink), var(--purple));

  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui: 'Poppins', 'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(.22,1,.36,1);
  --section-pad: clamp(28px, 6vw, 64px);
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
  background: var(--bg);
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 300;
  overflow-x: hidden;
  cursor: default;
  -webkit-font-smoothing: antialiased;
}

::selection{ background: var(--pink); color: #1A0505; }

img{ max-width: 100%; display: block; }

/* Any decorative SVG motif should never force horizontal overflow on
   narrow screens, even though it carries explicit width/height attrs. */
.rakhi-symbol svg,
.rakhi-hero svg,
.name-reveal-motif svg,
.envelope svg,
.gift-box svg{
  max-width: 100%;
  height: auto;
}

button{
  font-family: inherit;
  cursor: pointer;
}

a{ color: inherit; }

/* -------------------- Layout -------------------- */

.section{
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  padding: var(--section-pad) 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

main{
  position: relative;
  z-index: 1;
}

/* -------------------- Grain overlay -------------------- */

.grain{
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* -------------------- Traditional textile-inspired dot pattern -------------------- */

.pattern-overlay{
  position: fixed;
  inset: 0;
  z-index: 39;
  pointer-events: none;
  opacity: .06;
  background-image: radial-gradient(circle at center, var(--gold) 1px, transparent 1.5px);
  background-size: 26px 26px;
  mix-blend-mode: soft-light;
}

@media (max-width: 640px){
  .pattern-overlay{ background-size: 20px 20px; opacity: .045; }
}

/* -------------------- Thread motif -------------------- */

.thread-line{
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}
.thread-path{
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  opacity: .35;
  vector-effect: non-scaling-stroke;
}

@media (max-width: 640px){
  .thread-line{ opacity: .3; }
}

/* -------------------- Typography -------------------- */

.hero-heading{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  line-height: 1.1;
  margin: 0 0 .4em;
  letter-spacing: -.01em;
}

.section-heading{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  margin: 0 0 clamp(1.5rem, 4vw, 3rem);
}

.eyebrow-heading{
  font-family: var(--font-ui);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(.85rem, 2vw, 1rem);
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.subtext{
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--muted);
  margin: .3em 0;
}

.gradient-text{
  background: var(--grad-gold-pink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------- Buttons -------------------- */

.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 1em 2.2em;
  border-radius: 100px;
  border: 1px solid rgba(232,184,75,.35);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  font-size: clamp(.95rem, 2vw, 1.05rem);
  font-weight: 500;
  letter-spacing: .01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
  min-height: 48px;
  touch-action: manipulation;
}

.btn:hover, .btn:focus-visible{
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(232,184,75,.7);
  box-shadow: 0 0 30px rgba(232,184,75,.25);
}

.btn:active{ transform: translateY(0) scale(.98); }

.btn--glow{
  background: linear-gradient(120deg, rgba(232,184,75,.16), rgba(226,115,62,.16));
  box-shadow: 0 0 40px rgba(232,184,75,.18);
}
.btn--glow:hover, .btn--glow:focus-visible{
  box-shadow: 0 0 55px rgba(232,184,75,.4), 0 0 20px rgba(226,115,62,.3);
}

.btn--primary{
  background: var(--grad-gold-pink);
  color: #2B0D05;
  border: none;
  font-weight: 600;
}
.btn--primary:hover, .btn--primary:focus-visible{
  box-shadow: 0 0 40px rgba(226,115,62,.35);
}

.btn--ghost{
  background: transparent;
  border-color: rgba(216,174,150,.3);
  color: var(--muted);
}
.btn--ghost:hover, .btn--ghost:focus-visible{
  color: var(--text);
  border-color: rgba(255,255,255,.5);
}

.btn:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-row{
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

/* -------------------- Glass card -------------------- */

.glass-card{
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.card-stack{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  width: 100%;
  margin-bottom: 2.5rem;
}

.card-stack .glass-card{
  padding: 1.2rem 1.6rem;
  font-size: 1.05rem;
  text-align: left;
}

.ready-heading{
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0;
}

/* ============ 1. INTRO ============ */

.intro{ background: radial-gradient(ellipse at 50% 35%, var(--bg-2), var(--bg) 70%); }

.intro-glow{
  position: absolute;
  top: 18%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,75,.28), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.rakhi-symbol{
  margin-bottom: 1.8rem;
  filter: drop-shadow(0 0 24px rgba(232,184,75,.35));
}
.rakhi-ring{ fill: none; stroke: var(--gold); stroke-width: 1.5; opacity: .8; }
.rakhi-ring--inner{ stroke: var(--pink); opacity: .55; }
.rakhi-petals circle{ fill: var(--pink); opacity: .85; }
.rakhi-core{ fill: var(--gold); }

.intro-text{ min-height: 8em; display: flex; flex-direction: column; gap: .3em; justify-content: center; }

.reveal-line{
  font-family: var(--font-ui);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 300;
  opacity: 0;
  transform: translateY(14px);
  margin: .2em 0;
}
.reveal-line--but{ color: var(--muted); font-style: italic; }
.reveal-line--small{ font-size: clamp(.9rem, 2vw, 1.05rem); color: var(--muted); }

/* ============ 2. SUSPENSE ============ */

.suspense{ background: var(--bg); }

/* ============ 3. RAKHI REVEAL ============ */

.rakhi-reveal{ background: radial-gradient(ellipse at 50% 40%, #3D0C0C, var(--bg) 75%); }

.light-rays{
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(232,184,75,.06) 8deg, transparent 16deg, transparent 40deg, rgba(226,115,62,.05) 48deg, transparent 56deg, transparent 180deg, rgba(232,184,75,.05) 188deg, transparent 196deg);
  animation: spin-slow 40s linear infinite;
  pointer-events: none;
}

.rakhi-hero{ margin-bottom: 1.5rem; filter: drop-shadow(0 0 36px rgba(232,184,75,.4)); }
.rakhi-hero-ring{ fill: none; stroke: var(--gold); stroke-width: 1.2; opacity: .5; }
.rakhi-hero-ring--rotate{ stroke: var(--pink); opacity: .4; stroke-dasharray: 6 10; animation: spin-slow 18s linear infinite; transform-origin: 120px 120px; }
.rakhi-hero-thread path{ fill: none; stroke: var(--gold); stroke-width: 2; opacity: .6; }
.rakhi-hero-core{ fill: var(--pink); opacity: .9; }

.scroll-indicator{
  margin-top: 3rem;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 20px;
  position: relative;
}
.scroll-indicator span{
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: var(--gold);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

/* ============ 4. NAME REVEAL ============ */

.name-reveal{ background: var(--bg); }
.made-for{ font-size: clamp(.95rem, 2vw, 1.1rem); color: var(--muted); letter-spacing: .04em; margin-bottom: .6em; }

.name-reveal-layout{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 1000px;
  width: 100%;
  flex-wrap: wrap;
}
.name-reveal-text{ text-align: left; flex: 1 1 320px; min-width: 260px; }
.name-reveal-motif{ flex: 0 0 auto; filter: drop-shadow(0 0 30px rgba(232,184,75,.3)); }

.motif-ring{ fill: none; stroke: var(--gold); stroke-width: 1.3; opacity: .55; }
.motif-ring--spin{ stroke: var(--pink); opacity: .4; stroke-dasharray: 5 9; animation: spin-slow 22s linear infinite; transform-origin: 110px 110px; }
.motif-thread path{ fill: none; stroke: var(--gold); stroke-width: 1.8; opacity: .6; }
.motif-core{ fill: var(--pink); opacity: .9; }

@media (max-width: 720px){
  .name-reveal-layout{ flex-direction: column; text-align: center; }
  .name-reveal-text{ text-align: center; }
}

.sibling-name{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.6rem, 10vw, 6rem);
  background: var(--grad-gold-pink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
  letter-spacing: .02em;
}
.sibling-name--small{ font-size: clamp(1.8rem, 6vw, 3rem); margin-top: .3em; }

/* ============ 5. EMOTIONAL MESSAGE ============ */

.emotional-message{ background: radial-gradient(ellipse at 50% 60%, var(--bg-2), var(--bg) 75%); }
.message-lines{ display: flex; flex-direction: column; gap: .5em; max-width: 560px; width: 100%; }
.msg-line{
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 4vw, 2.1rem);
  color: var(--text);
  margin: 0;
}
.msg-line--l{ text-align: left; align-self: flex-start; }
.msg-line--r{ text-align: right; align-self: flex-end; }

@media (max-width: 600px){
  .msg-line--l, .msg-line--r{ text-align: center; align-self: center; }
}

.msg-final{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  margin-top: .6em;
  align-self: center;
  text-align: center;
}

/* ============ 6. MEMORY JOURNEY ============ */

.memory-journey{ min-height: auto; padding-top: clamp(60px, 10vw, 100px); padding-bottom: clamp(60px, 10vw, 100px); }

.memory-grid{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 90px;
  gap: 14px;
  max-width: 1000px;
  width: 100%;
}

.memory-item{
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 40px rgba(0,0,0,.4);
}

.memory-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.memory-item:hover img{ transform: scale(1.08); }

.memory-item .memory-fallback{
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(232,184,75,.12), rgba(226,115,62,.1));
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
  padding: .5rem;
}

.memory-caption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-size: .78rem;
  color: var(--text);
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.memory-item:hover .memory-caption,
.memory-item:focus-within .memory-caption{ opacity: 1; transform: translateY(0); }

/* asymmetric spans — large featured + floating smaller cards */
.memory-item:nth-child(1){ grid-column: span 4; grid-row: span 4; }
.memory-item:nth-child(2){ grid-column: span 2; grid-row: span 2; transform: translateY(6px); }
.memory-item:nth-child(3){ grid-column: span 2; grid-row: span 2; }
.memory-item:nth-child(4){ grid-column: span 3; grid-row: span 3; transform: rotate(-1deg); }
.memory-item:nth-child(5){ grid-column: span 3; grid-row: span 3; transform: rotate(1deg); }
.memory-item:nth-child(6){ grid-column: span 6; grid-row: span 2; }

/* Video always gets its own full-width row, regardless of position.
   It shows a cinematic frame: the video itself blurred as an ambient
   backdrop, with the sharp video centered on top — so any aspect
   ratio (portrait phone clips included) looks intentional, never
   awkwardly cropped or letterboxed with plain black bars. */
.memory-item.video-item{
  grid-column: 1 / -1 !important;
  grid-row: span 4 !important;
  transform: none !important;
  background: #000;
  overflow: visible;
  border: none;
  box-shadow: none;
}

.video-frame{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 30px 60px rgba(0,0,0,.65),
    0 10px 24px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.06);
}

.video-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px) brightness(.45) saturate(1.2);
  transform: scale(1.15);
  pointer-events: none;
}

.video-main{
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.7));
}

@media (max-width: 720px){
  .video-frame{ aspect-ratio: 4 / 5; border-radius: 16px; }
}

@media (max-width: 720px){
  .memory-grid{
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: 10px;
  }
  .memory-item{
    grid-column: span 1 !important;
    grid-row: auto !important;
    transform: none !important;
    aspect-ratio: 4 / 5;
  }
  .memory-item img,
  .memory-item video{
    object-position: center;
  }
  .memory-item:nth-child(1){
    grid-column: span 2 !important;
    aspect-ratio: 16 / 11;
  }
  .memory-item.video-item{
    grid-column: span 2 !important;
    aspect-ratio: auto;
  }
}

/* ============ 7. SIBLING QUESTION ============ */

.sibling-question{ background: var(--bg); }
.question-text{ font-size: clamp(1.2rem, 3.2vw, 1.7rem); color: var(--text); margin-bottom: .5rem; font-family: var(--font-display); font-style: italic; }

.choice-row{
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.6rem;
}

.choice-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  width: clamp(126px, 40vw, 150px);
  padding: 1.6rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(232,184,75,.25);
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  font-family: var(--font-ui);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
}
.choice-emoji{ font-size: 2rem; }
.choice-label{ font-size: .92rem; font-weight: 500; }

.choice-card:hover, .choice-card:focus-visible{
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(232,184,75,.6);
  box-shadow: 0 14px 34px rgba(0,0,0,.35), 0 0 24px rgba(232,184,75,.2);
}
.choice-card--alt:hover, .choice-card--alt:focus-visible{
  border-color: rgba(226,115,62,.6);
  box-shadow: 0 14px 34px rgba(0,0,0,.35), 0 0 24px rgba(226,115,62,.22);
}
.choice-card:active{ transform: translateY(-2px) scale(.99); }
.choice-card.chosen{
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(232,184,75,.14), rgba(226,115,62,.1));
}

.question-response, .question-followup{
  min-height: 1.6em;
  margin-top: 1.4rem;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
}
.question-response.show, .question-followup.show{
  animation: fade-up .6s var(--ease) forwards;
}

/* ============ 7b. SCRATCH CARD ============ */

.scratch-section{ background: radial-gradient(ellipse at 50% 40%, var(--bg-2), var(--bg) 78%); }

.scratch-wrap{
  position: relative;
  width: 100%;
  max-width: 360px;
  margin-top: 1.5rem;
}

.scratch-hidden{
  width: 100%;
  min-height: 220px;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(226,115,62,.16), rgba(232,184,75,.12));
  border: 1px solid rgba(232,184,75,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem;
  text-align: center;
}
.scratch-hidden p{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

.scratch-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  cursor: pointer;
  touch-action: none;
  transition: opacity .6s var(--ease);
}
.scratch-canvas.revealed{
  opacity: 0;
  pointer-events: none;
}

.scratch-hint{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,246,234,.85);
  font-size: .85rem;
  letter-spacing: .04em;
  pointer-events: none;
  animation: hint-pulse 2s ease-in-out infinite;
}
.scratch-hint.hidden{ display: none; }

@keyframes hint-pulse{
  0%, 100%{ opacity: .5; }
  50%{ opacity: 1; }
}

/* ============ 8. SECRET MESSAGE ============ */

.secret-message{ background: radial-gradient(ellipse at 50% 30%, var(--bg-2), var(--bg) 75%); }

.envelope-wrap{ margin-bottom: 1rem; }

.envelope{
  background: none;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.env-body{ fill: rgba(255,255,255,.05); stroke: var(--gold); stroke-width: 1.4; }
.env-flap{
  fill: rgba(232,184,75,.12);
  stroke: var(--gold);
  stroke-width: 1.4;
  transform-origin: 110px 30px;
  transition: transform .6s var(--ease);
}
.env-seal{ fill: var(--pink); opacity: .9; transition: opacity .4s var(--ease); }

.envelope:hover .env-flap{ transform: translateY(-3px); }
.envelope.opened .env-flap{ transform: rotateX(180deg) translateY(-4px); }
.envelope.opened .env-seal{ opacity: 0; }

.envelope-label{ color: var(--muted); font-size: .95rem; }

.letter-card{
  max-width: 520px;
  width: 100%;
  margin-top: 1.5rem;
  text-align: left;
}
.letter-greeting{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  margin: 0 0 .8em;
}
.letter-body{
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-line;
  margin: 0 0 1em;
}
.letter-sign{ font-family: var(--font-display); font-style: italic; text-align: right; margin: 0; }

/* ============ 9. GIFT REVEAL ============ */

.gift-reveal{ background: radial-gradient(ellipse at 50% 45%, #421210, var(--bg) 78%); }

.gift-box-wrap{ position: relative; margin-bottom: 2rem; }

.gift-box{
  cursor: pointer;
  display: inline-block;
  filter: drop-shadow(0 0 40px rgba(232,184,75,.3));
  animation: float 4.5s ease-in-out infinite;
  transition: transform .3s var(--ease);
}
.gift-box:hover{ transform: scale(1.04); }
.gift-box:focus-visible{ outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 12px; }

.gift-lid, .gift-base{ fill: rgba(226,115,62,.14); stroke: var(--pink); stroke-width: 1.4; }
.gift-ribbon-v, .gift-ribbon-h{ fill: var(--gold); opacity: .85; }
.gift-bow{ fill: var(--gold); opacity: .9; }

.gift-box.opening{ animation: gift-pop .7s var(--ease) forwards; }

.confetti-layer{
  position: absolute;
  inset: -40px;
  pointer-events: none;
  overflow: visible;
}
.confetti-piece{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 12px;
  opacity: 0;
  border-radius: 2px;
}

/* ============ 10. FINAL SURPRISE ============ */

.final-surprise{ background: radial-gradient(ellipse at 50% 40%, var(--bg-2), var(--bg) 78%); }
.final-card{ max-width: 620px; }
.final-card .hero-heading{ margin-bottom: .2em; }
.final-card .sibling-name--small{ margin-bottom: .5em; }

/* ============ 11. CLOSING ============ */

.closing{ background: var(--bg); }
.closing-line{ color: var(--muted); font-size: 1.05rem; margin: .2em 0; }
.closing-heading{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  max-width: 700px;
  margin: .6em 0;
}
.closing-sign{ font-family: var(--font-display); font-style: italic; color: var(--muted); margin-bottom: 2rem; }

/* -------------------- Particles -------------------- */

.particles{
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle{
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  opacity: .5;
  pointer-events: none;
}

/* -------------------- Custom cursor -------------------- */

.cursor-glow{
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,75,.5), transparent 70%);
  pointer-events: none;
  z-index: 60;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), opacity .25s var(--ease);
  opacity: 0;
  mix-blend-mode: screen;
}
.cursor-glow.active{ opacity: 1; }
.cursor-glow.expand{ width: 56px; height: 56px; }

@media (hover: none), (pointer: coarse){
  .cursor-glow{ display: none; }
}

/* -------------------- Create your own link -------------------- */

.create-own-link{
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 50;
  padding: .55em 1.1em;
  border-radius: 100px;
  border: 1px solid rgba(226,115,62,.3);
  background: rgba(7,7,11,.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--pink);
  font-size: .8rem;
  text-decoration: none;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.create-own-link:hover{
  border-color: var(--pink);
  box-shadow: 0 0 18px rgba(226,115,62,.3);
  transform: translateY(-1px);
}

@media (max-width: 480px){
  .create-own-link{ font-size: .72rem; padding: .5em .9em; }
}

/* -------------------- Music toggle -------------------- */

.yt-player-host{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.yt-player-host iframe{
  width: 2px;
  height: 2px;
  border: 0;
}

.music-toggle{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(232,184,75,.35);
  background: rgba(7,7,11,.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.music-toggle:hover{ box-shadow: 0 0 20px rgba(232,184,75,.3); transform: scale(1.05); }
.music-toggle:focus-visible{ outline: 2px solid var(--gold); outline-offset: 2px; }

.music-toggle .sound-bars{ opacity: .3; transition: opacity .3s var(--ease); }
.music-toggle[aria-pressed="true"] .sound-bars{ opacity: 1; }

/* -------------------- Reveal on scroll (base state) -------------------- */

.reveal-on-scroll{
  opacity: 0;
  transform: translateY(28px);
}

/* -------------------- Reduced motion -------------------- */

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------- Fallback for browsers without backdrop-filter -------------------- */
/* Some mobile browsers (older Android WebViews, some in-app browsers)
   don't support backdrop-filter. Without it, glass/blur surfaces fall
   back to their very faint background alone and become hard to read.
   This gives them an opaque-enough background instead. */
@supports not (backdrop-filter: blur(1px)) and not (-webkit-backdrop-filter: blur(1px)){
  .btn,
  .glass-card,
  .choice-card,
  .create-own-link,
  .music-toggle,
  .cz-form{
    background: rgba(26,5,5,.88);
  }
}

/* -------------------- Focus visibility -------------------- */

a:focus-visible, button:focus-visible, [tabindex]:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* -------------------- Small phones (≤400px) — extra tightening -------------------- */
@media (max-width: 400px){
  .section{ padding: 24px 16px; }
  .btn{ padding: .9em 1.6em; font-size: .92rem; }
  .btn-row{ gap: .7rem; }
  .choice-row{ gap: .8rem; }
  .card-stack .glass-card{ padding: 1rem 1.2rem; font-size: .98rem; }
  .create-own-link{ font-size: .68rem; padding: .45em .8em; top: 12px; left: 12px; }
  .music-toggle{ width: 40px; height: 40px; top: 12px; right: 12px; }
}
