/* ============================================================
   For Riya — static love-story site
   Plain CSS, no frameworks. Colors match the original design.
   ============================================================ */

:root {
  --wine: #641e35;
  --wine-deep: #3a1020;
  --rose: #f4c7d4;
  --ivory: #fff8f2;
  --gold: #d8b77a;
  --paper: #faf3e3;
  --foreground: #45222e;
  --muted: #f5ecec;
  --muted-fg: #7a5560;
  --border: #ecdcdc;
  --card: #fffdfb;

  --gradient-night: radial-gradient(ellipse at top, #641e35, #2a0f1a 70%);
  --gradient-blush: linear-gradient(180deg, var(--ivory), #f9e3ea 60%, var(--ivory));
  --gradient-gold: linear-gradient(135deg, #ecd9ae, var(--gold), #c39a52);
  --shadow-soft: 0 20px 50px -20px rgba(100, 30, 53, 0.35);
  --shadow-glow: 0 0 40px rgba(244, 199, 212, 0.6);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Jost", system-ui, sans-serif;
  --font-script: "Pinyon Script", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; border-color: var(--border); }
html { scroll-behavior: smooth; }
body {
  background: var(--ivory);
  color: var(--foreground);
  font-family: var(--font-sans);
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-serif); }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hidden { display: none !important; }
.inline-block { display: inline-block; }

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

/* ---------- shared bits ---------- */
.bg-night { background: var(--gradient-night); }
.bg-blush { background: var(--gradient-blush); }
.text-gold-grad {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

section { padding: 7rem 1.25rem; scroll-margin-top: 4rem; position: relative; }

.eyebrow {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.4em; color: var(--rose);
}
.eyebrow-dark {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.35em; color: var(--muted-fg); margin-bottom: 0.75rem;
}
.eyebrow-gold {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.35em; color: var(--gold);
}

.section-title { max-width: 48rem; margin: 0 auto 3rem; text-align: center; }
.section-title h2 { font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.15; color: var(--wine); }
.divider { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.25rem; color: var(--gold); }
.divider span { height: 1px; width: 3rem; background: rgba(216, 183, 122, 0.6); }

/* ---------- buttons ---------- */
.btn-love {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; padding: 0.9rem 2rem;
  background: var(--wine); color: var(--ivory);
  font-weight: 500; letter-spacing: 0.03em; font-size: 1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-love:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.btn-gold {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; padding: 0.9rem 2rem;
  background: var(--gradient-gold); color: var(--wine-deep);
  font-weight: 500; letter-spacing: 0.03em; font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(216, 183, 122, 0.6); }

.btn-ghost-light {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; padding: 0.75rem 1.6rem;
  border: 1px solid rgba(244, 199, 212, 0.6);
  color: var(--ivory);
  transition: background 0.3s;
}
.btn-ghost-light:hover { background: rgba(244, 199, 212, 0.15); }

/* ---------- animations ---------- */
@keyframes petal-fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translate3d(8vw, 110vh, 0) rotate(540deg); opacity: 0; }
}
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
@keyframes float-up { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-60vh); opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.animate-fade-up { animation: fade-up 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.animate-heartbeat { animation: heartbeat 2.4s ease-in-out infinite; }

.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal[data-visible="true"] { opacity: 1; transform: none; }

.stars, .petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.stars span {
  position: absolute; display: block; border-radius: 50%;
  background: var(--ivory);
  animation: twinkle 3s ease-in-out infinite;
}
.stars[data-gold="1"] span { background: var(--gold); }
.petals span {
  position: absolute; top: -2.5rem; display: block;
  border-radius: 60% 0 60% 0;
  background: rgba(244, 199, 212, 0.7);
  animation: petal-fall linear infinite;
}

/* ---------- nav ---------- */
#nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 40;
  transition: all 0.3s;
}
#nav.scrolled { background: rgba(255, 248, 242, 0.85); box-shadow: var(--shadow-soft); backdrop-filter: blur(12px); }
.nav-inner {
  max-width: 72rem; margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--ivory); }
#nav.scrolled .nav-brand { color: var(--wine); }
.nav-links { display: none; gap: 1.75rem; list-style: none; }
.nav-links a { font-size: 0.875rem; letter-spacing: 0.05em; color: rgba(255, 248, 242, 0.9); transition: color 0.3s; }
.nav-links a:hover { color: var(--gold); }
#nav.scrolled .nav-links a { color: var(--wine); }
#menu-btn { font-size: 1.5rem; color: var(--ivory); }
#nav.scrolled #menu-btn { color: var(--wine); }
#mobile-menu {
  list-style: none; display: flex; flex-direction: column; gap: 0.25rem;
  background: rgba(255, 248, 242, 0.95); backdrop-filter: blur(12px);
  padding: 0 1.25rem 1rem;
}
#mobile-menu a { display: block; padding: 0.5rem 0; font-family: var(--font-serif); font-size: 1.25rem; color: var(--wine); }
@media (min-width: 768px) {
  .nav-links { display: flex; }
  #menu-btn, #mobile-menu { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 1.25rem; overflow: hidden;
}
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(100,30,53,0.4), rgba(100,30,53,0.3), #641e35); }
.hero-content { position: relative; z-index: 10; max-width: 48rem; padding-top: 4rem; }
.heart { font-size: 3rem; color: var(--rose); margin: 1.5rem auto; text-shadow: 0 0 20px currentColor; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.5rem); line-height: 1.05; color: var(--ivory); }
.hero-sub { max-width: 36rem; margin: 1.5rem auto 0; font-size: 1.125rem; font-weight: 300; color: rgba(255, 248, 242, 0.85); }
.script-names { font-family: var(--font-script); font-size: 1.875rem; color: var(--rose); margin-top: 1rem; }
.hero .btn-love { margin-top: 2.5rem; font-size: 1.125rem; }

/* ---------- story ---------- */
.story-card-wrap { max-width: 28rem; margin: 0 auto; }
.story-card {
  position: relative; width: 100%;
  border-radius: 1.5rem; border: 1px solid rgba(216, 183, 122, 0.5);
  background: var(--card); padding: 2.5rem; text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
}
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.story-card-border { position: absolute; inset: 0.75rem; border-radius: 1rem; border: 1px solid rgba(216, 183, 122, 0.3); pointer-events: none; }
.story-icon { display: block; font-size: 2.5rem; }
.story-label { display: block; margin-top: 1rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--muted-fg); }
.story-date { display: block; margin-top: 0.5rem; font-family: var(--font-serif); font-size: 1.875rem; color: var(--wine); }
.story-cta { display: inline-block; margin-top: 1.5rem; font-size: 0.875rem; color: var(--wine); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.story-card:hover .story-cta { color: var(--gold); }

/* ---------- modal / lightbox ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(100, 30, 53, 0.7); backdrop-filter: blur(4px);
  padding: 1rem;
}
#lightbox { background: rgba(100, 30, 53, 0.9); }
.modal-card {
  max-height: 90vh; width: 100%; max-width: 42rem; overflow-y: auto;
  border-radius: 1.5rem; background: var(--ivory); box-shadow: var(--shadow-soft);
}
.modal-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 2rem 2.5rem 2.5rem; }
.modal-meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--muted-fg); }
.modal-body h3 { margin-top: 0.75rem; font-size: 1.875rem; color: var(--wine); }
.modal-text { margin-top: 1rem; line-height: 1.7; color: rgba(69, 34, 46, 0.85); }
.modal-body blockquote {
  margin-top: 1.5rem; padding-left: 1.25rem;
  border-left: 2px solid var(--gold);
  font-family: var(--font-serif); font-size: 1.25rem; font-style: italic; color: var(--wine);
}
.modal-body .btn-love { margin-top: 2rem; }

.lightbox-figure { max-width: 48rem; text-align: center; }
.lightbox-figure img { max-height: 75vh; width: auto; margin: 0 auto; border-radius: 0.75rem; object-fit: contain; }
.lightbox-figure figcaption { margin-top: 1rem; font-family: var(--font-script); font-size: 1.875rem; color: var(--rose); }
.lightbox-btns { margin-top: 1rem; display: flex; justify-content: center; gap: 0.75rem; }

/* ---------- memories ---------- */
.things-grid {
  max-width: 72rem; margin: 0 auto;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.thing-card {
  min-height: 14rem; width: 100%; text-align: left;
  border-radius: 1rem; border: 1px solid var(--border);
  background: var(--card); padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, border-color 0.3s;
  display: block;
}
.thing-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.thing-icon { font-size: 1.875rem; display: block; }
.thing-title { display: block; margin-top: 0.75rem; font-family: var(--font-serif); font-size: 1.25rem; color: var(--wine); }
.thing-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.6; color: rgba(69, 34, 46, 0.8); opacity: 0.7;
  transition: opacity 0.3s;
}
.thing-card.flipped .thing-text { -webkit-line-clamp: unset; opacity: 1; }
.thing-more { display: block; margin-top: 0.75rem; font-size: 0.75rem; color: var(--gold); }

/* quiz */
.quiz {
  max-width: 42rem; margin: 5rem auto 0;
  border-radius: 1.5rem; border: 1px solid rgba(216, 183, 122, 0.4);
  background: var(--card); padding: 2rem; text-align: center;
  box-shadow: var(--shadow-soft);
}
@media (min-width: 768px) { .quiz { padding: 3rem; } }
.quiz h3 { font-size: clamp(1.6rem, 4vw, 2.25rem); color: var(--wine); }
.quiz-step { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted-fg); margin-top: 2rem; }
.quiz-q { margin-top: 0.75rem; font-family: var(--font-serif); font-size: 1.5rem; }
.quiz-options { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.quiz-opt {
  border-radius: 9999px; border: 1px solid var(--border);
  padding: 0.75rem 1.5rem; font-size: 1rem;
  transition: border-color 0.3s, background 0.3s;
}
.quiz-opt:hover { border-color: var(--gold); background: var(--muted); }
.quiz-opt.correct { background: var(--wine); color: var(--ivory); border-color: var(--wine); }
.quiz-opt.wrong { background: var(--muted); opacity: 0.6; }
.quiz-opt.dim { opacity: 0.5; }
.quiz-result-emoji { font-size: 3rem; margin-top: 2rem; }
.quiz-score { margin-top: 1rem; font-family: var(--font-serif); font-size: 1.875rem; color: var(--wine); }
.quiz-msg { margin-top: 0.5rem; font-size: 1.125rem; }
.quiz .btn-love { margin-top: 1.5rem; }

/* gallery */
.gallery {
  max-width: 64rem; margin: 6rem auto 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.polaroid {
  background: var(--card); padding: 0.75rem 0.75rem 1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s;
}
.polaroid:hover { transform: rotate(0deg) scale(1.05) !important; }
.tilt-1 { transform: rotate(-3deg); }
.tilt-2 { transform: rotate(2deg); }
.tilt-3 { transform: rotate(-1deg); }
.tilt-4 { transform: rotate(3deg); }
.polaroid button { display: block; width: 100%; }
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.polaroid figcaption { margin-top: 0.75rem; text-align: center; font-family: var(--font-script); font-size: 1.25rem; color: var(--wine); }

/* ---------- reasons ---------- */
.reasons-grid {
  max-width: 64rem; margin: 0 auto;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.reason-card {
  border-radius: 1.5rem; border: 1px solid rgba(216, 183, 122, 0.4);
  background: var(--card); padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
}
.reason-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.reason-num { font-family: var(--font-serif); font-size: 3rem; color: var(--gold); }
.reason-card p { margin-top: 1rem; font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.3; color: var(--wine); }

/* ---------- future ---------- */
#future { overflow: hidden; }
.future-grid {
  position: relative; max-width: 72rem; margin: 0 auto;
  display: grid; gap: 3.5rem; align-items: center;
}
@media (min-width: 1024px) { .future-grid { grid-template-columns: 1fr 1fr; } }
.future-frame {
  border: 1px solid rgba(216, 183, 122, 0.5); border-radius: 2rem;
  padding: 0.75rem; box-shadow: var(--shadow-glow);
}
.future-frame img { width: 100%; border-radius: 1.6rem; }
.future-title { margin-top: 1rem; font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.15; color: var(--ivory); }
.future-p { margin-top: 1.5rem; font-size: 1.125rem; font-weight: 300; line-height: 1.7; color: rgba(255, 248, 242, 0.85); }
.future-year { margin-top: 2.5rem; font-size: 0.875rem; font-style: italic; color: var(--rose); }
#future-btn { margin-top: 2.5rem; }
.future-hidden {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 0.7s, opacity 0.7s, margin-top 0.7s;
}
.future-hidden.open { grid-template-rows: 1fr; opacity: 1; margin-top: 1.5rem; }
.future-hidden p {
  overflow: hidden;
  font-family: var(--font-serif); font-size: 1.5rem; font-style: italic; line-height: 1.4; color: var(--rose);
}

/* ---------- letter ---------- */
.paper {
  position: relative; max-width: 48rem; margin: 0 auto;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(100, 30, 53, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, transparent, rgba(216, 183, 122, 0.12));
  background-size: 6px 6px, 100% 100%;
  border-radius: 2px; padding: 2rem;
  box-shadow: var(--shadow-soft);
}
@media (min-width: 768px) { .paper { padding: 4rem; } }
.paper-rose { position: absolute; right: -1rem; top: -1.5rem; font-size: 3.75rem; }
.letter-open { font-family: var(--font-script); font-size: 2.25rem; color: var(--wine); }
.paper p:not(.letter-open) { margin-top: 1.25rem; font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.7; color: rgba(69, 34, 46, 0.9); }
.letter-sign { margin-top: 2.5rem; text-align: right; font-family: var(--font-serif); font-size: 1.25rem; font-style: italic; color: var(--wine); }
.letter-sign p { margin-top: 0 !important; }
.letter-name { margin-top: 0.75rem !important; font-family: var(--font-script) !important; font-size: 3rem !important; font-style: normal !important; }

/* ---------- finale ---------- */
.finale { padding: 8rem 1.25rem; text-align: center; overflow: hidden; }
.finale-inner { position: relative; max-width: 42rem; margin: 0 auto; }
.finale h2 { margin-top: 1.5rem; font-size: clamp(2.5rem, 6vw, 3.75rem); color: var(--ivory); }
.finale-wish { margin-top: 1.5rem; font-family: var(--font-serif); font-size: 1.5rem; font-style: italic; color: var(--rose); }
#finale-reveal { margin-top: 3rem; font-size: 1.125rem; }
.finale-big { font-family: var(--font-serif); font-size: clamp(1.7rem, 4vw, 2.25rem); line-height: 1.3; margin-top: 3rem; }
.finale-q { margin-top: 2.5rem; font-size: 1.125rem; color: rgba(255, 248, 242, 0.9); }
.finale-btns { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
#finale-answer { position: relative; margin-top: 2rem; }
.hearts-float span {
  position: absolute; bottom: 0; font-size: 1.5rem;
  animation: float-up linear infinite;
}
.finale-foot { margin-top: 5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3em; color: rgba(255, 248, 242, 0.5); }

/* ---------- floating controls ---------- */
.floating { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.music-note {
  border-radius: 9999px; background: rgba(255, 248, 242, 0.9);
  padding: 0.5rem 1rem; font-size: 0.75rem; color: var(--muted-fg);
  box-shadow: var(--shadow-soft);
}
.back-top {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--gradient-gold); color: var(--wine);
  box-shadow: var(--shadow-soft); font-size: 1.1rem;
}
