/* ==========================================================================
   SWEETHEART THEME — a buttery, feminine stylesheet for love-letter sites,
   treasure hunts, quizzes, and keepsake pages.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Quicksand:wght@400;500;600;700&family=Caveat:wght@500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Palette */
  --cream:        #fdf7ee;   /* base background, buttery */
  --cream-deep:   #f7ecd9;   /* card / panel background */
  --blush:        #f7cfe0;   /* soft pink */
  --blush-soft:   #fbe3ee;   /* pale pink wash */
  --rose:         #e8a0bf;   /* mid pink accent */
  --mauve:        #b97a93;   /* primary brand color */
  --mauve-deep:   #96586f;   /* pressed / hover state */
  --plum:         #5c3a4d;   /* primary text */
  --plum-soft:    #8a6577;   /* secondary text */
  --gold:         #e3b457;   /* buttery gold accent */
  --gold-deep:    #c99435;   /* gold hover/shadow */
  --sage:         #9fb88b;   /* leaf green, sparing use */
  --paper:        #fffdf8;   /* frame/card white */
  --ink:          #4a3040;   /* near-black warm ink for high contrast */

  /* Elevation */
  --shadow-soft:  0 4px 20px rgba(150, 88, 111, 0.14);
  --shadow-lift:  0 10px 30px rgba(150, 88, 111, 0.22);
  --shadow-tiny:  0 2px 8px rgba(150, 88, 111, 0.12);

  /* Type */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Quicksand', system-ui, sans-serif;
  --font-hand:    'Caveat', cursive;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  /* Motion */
  --ease-sweet: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.35s;
}

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

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--plum);
  background:
    radial-gradient(ellipse at 20% 0%, var(--blush-soft) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, #fdeccf 0%, transparent 45%),
    var(--cream);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--mauve-deep);
  text-decoration-color: var(--rose);
  text-underline-offset: 3px;
}
a:hover { color: var(--gold-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--plum);
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-style: italic; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-style: italic; }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; color: var(--plum-soft); }

.eyebrow {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--mauve-deep);
  display: block;
  margin-bottom: 0.2em;
}

.signature {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--mauve-deep);
}

::selection { background: var(--blush); color: var(--plum); }

/* Focus visibility — kept clear and warm, never removed */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
  position: relative;
}

.center { text-align: center; }

.stack { display: flex; flex-direction: column; gap: 1rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   4. DIVIDERS & DECORATIVE MARKS
   -------------------------------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2.5rem 0;
  color: var(--rose);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}
.divider span { font-size: 1.1rem; }

.petal-scatter {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.petal-scatter span {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.5;
  animation: drift 14s linear infinite;
}
.petal-scatter span:nth-child(1) { left: 8%;  top: -10%; animation-delay: 0s; }
.petal-scatter span:nth-child(2) { left: 32%; top: -10%; animation-delay: 3s; }
.petal-scatter span:nth-child(3) { left: 58%; top: -10%; animation-delay: 6s; }
.petal-scatter span:nth-child(4) { left: 78%; top: -10%; animation-delay: 9s; }
.petal-scatter span:nth-child(5) { left: 92%; top: -10%; animation-delay: 1.5s; }

@keyframes drift {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(110vh) rotate(220deg); opacity: 0; }
}

/* --------------------------------------------------------------------------
   5. BUTTONS — the "wax seal" primary action
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-sweet), box-shadow var(--dur) ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-seal {
  background: radial-gradient(circle at 30% 30%, #f0c878, var(--gold) 55%, var(--gold-deep) 100%);
  color: var(--ink);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-seal:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.btn-blossom {
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-blossom:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--rose);
  color: var(--mauve-deep);
}
.btn-ghost:hover { background: var(--blush-soft); }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* --------------------------------------------------------------------------
   6. FORMS
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 1.4rem; text-align: left; }

label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mauve-deep);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"],
textarea,
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--plum);
  background: var(--paper);
  border: 1.5px solid #ecd6de;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}

textarea { min-height: 120px; resize: vertical; font-family: var(--font-hand); font-size: 1.3rem; line-height: 1.4; }

input::placeholder, textarea::placeholder { color: #c9adba; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(232, 160, 191, 0.28);
}

.hint { font-size: 0.82rem; color: var(--plum-soft); margin-top: 0.3rem; }

/* Quiz / multiple-choice option cards (radio & checkbox reskinned) */
.quiz-card {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid #f2dde6;
}

.quiz-question {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.quiz-options {
  display: grid;
  gap: 0.7rem;
}

.quiz-option {
  position: relative;
  display: block;
}
.quiz-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.quiz-option .label-text {
  display: block;
  padding: 0.8rem 1.1rem 0.8rem 2.8rem;
  border-radius: 999px;
  background: var(--blush-soft);
  border: 1.5px solid transparent;
  font-weight: 600;
  color: var(--plum-soft);
  transition: all var(--dur) ease;
  position: relative;
}
.quiz-option .label-text::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  translate: 0 -50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--rose);
  background: #fff;
  transition: all var(--dur) ease;
}
.quiz-option input:checked ~ .label-text {
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: #fff;
  border-color: var(--mauve-deep);
  transform: translateX(3px);
}
.quiz-option input:checked ~ .label-text::before {
  border-color: #fff;
  background: var(--gold);
  box-shadow: inset 0 0 0 3px #fff;
}
.quiz-option input:focus-visible ~ .label-text {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.quiz-option:hover .label-text { border-color: var(--rose); }

/* --------------------------------------------------------------------------
   7. IMAGE FRAMES
   -------------------------------------------------------------------------- */

/* Polaroid — thick bottom border, slight rotation, washi tape corner */
.frame-polaroid {
  display: inline-block;
  background: var(--paper);
  padding: 0.9rem 0.9rem 2.6rem;
  border-radius: 4px;
  box-shadow: var(--shadow-lift);
  position: relative;
  transform: rotate(-3deg);
  transition: transform var(--dur) var(--ease-sweet);
}
.frame-polaroid:nth-of-type(even) { transform: rotate(2.5deg); }
.frame-polaroid:hover { transform: rotate(0deg) scale(1.02); }
.frame-polaroid img { border-radius: 2px; }
.frame-polaroid .caption {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--mauve-deep);
  text-align: center;
  margin-top: 0.6rem;
  display: block;
}
.frame-polaroid::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  translate: -50% 0;
  width: 60px;
  height: 24px;
  background: rgba(247, 207, 224, 0.75);
  border: 1px solid rgba(232,160,191,0.5);
  box-shadow: var(--shadow-tiny);
  rotate: -4deg;
}

/* Scalloped frame — soft cloud-like edge via layered radial masks */
.frame-scallop {
  --scallop: 22px;
  display: inline-block;
  padding: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  -webkit-mask-image: radial-gradient(circle var(--scallop), #000 98%, transparent 100%);
          mask-image: radial-gradient(circle var(--scallop), #000 98%, transparent 100%);
  -webkit-mask-size: var(--scallop) var(--scallop);
          mask-size: var(--scallop) var(--scallop);
  -webkit-mask-repeat: round;
          mask-repeat: round;
}
.frame-scallop img { display: block; }

/* Locket — circular frame with a gold rim, for a single key portrait */
.frame-locket {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  padding: 10px;
  margin: 0 auto;
  background: conic-gradient(from 180deg, var(--gold), #fff2cf, var(--gold-deep), var(--gold));
  box-shadow: var(--shadow-lift);
}
.frame-locket .inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--paper);
}
.frame-locket .inner img {
  width: 100%; height: 100%; object-fit: cover;
}

/* --------------------------------------------------------------------------
   8. TREASURE HUNT — trail, stops, clue cards, envelope reveal
   -------------------------------------------------------------------------- */
.treasure-trail {
  position: relative;
  padding-left: 2.6rem;
  margin: 2rem 0;
}
.treasure-trail::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 3px;
  background-image: linear-gradient(var(--rose) 60%, transparent 0%);
  background-size: 3px 14px;
  background-repeat: repeat-y;
}

.treasure-stop {
  position: relative;
  margin-bottom: 2.2rem;
  padding: 1.2rem 1.4rem;
  background: var(--paper);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.treasure-stop::before {
  content: attr(data-stop);
  position: absolute;
  left: -2.6rem;
  top: 1.1rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-tiny);
}
.treasure-stop.found { opacity: 0.6; }
.treasure-stop.found::after {
  content: "✓ found";
  font-family: var(--font-hand);
  font-size: 1.1rem;
  color: var(--sage);
  margin-left: 0.5rem;
}

.clue-card {
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  position: relative;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--plum);
  line-height: 1.35;
}
.clue-card::after { /* folded corner */
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 18px 18px;
  border-color: transparent transparent var(--blush) transparent;
  filter: drop-shadow(-1px -1px 1px rgba(0,0,0,0.08));
}

.marks-the-spot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  color: var(--mauve-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
}

/* Envelope reveal */
.envelope {
  max-width: 340px;
  margin: 2rem auto;
  cursor: pointer;
  perspective: 1200px;
}
.envelope-body {
  position: relative;
  background: var(--blush-soft);
  border-radius: var(--radius-sm);
  padding: 2.4rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.envelope-body::before { /* flap */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  background: var(--rose);
  clip-path: polygon(0 0, 100% 0, 50% 70%);
  transform-origin: top center;
  transition: transform 0.6s var(--ease-sweet);
}
.envelope:hover .envelope-body::before,
.envelope.open .envelope-body::before {
  transform: rotateX(180deg);
}
.envelope-seal {
  position: relative;
  z-index: 2;
  width: 46px; height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0c878, var(--gold-deep));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-family: var(--font-display);
  box-shadow: var(--shadow-tiny);
}
.envelope-note {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  text-align: center;
  color: var(--mauve-deep);
  margin-top: 1rem;
  transition: opacity 0.3s ease;
}
.envelope.open .envelope-note {
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   9. CARDS & MISC
   -------------------------------------------------------------------------- */
.card-soft {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid #f4e2ea;
}

.badge {
  display: inline-block;
  background: var(--blush);
  color: var(--mauve-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--blush-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  border-radius: 999px;
  transition: width 0.5s var(--ease-sweet);
}

blockquote {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--mauve-deep);
  border-left: 3px solid var(--rose);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .frame-locket { width: 160px; height: 160px; }
  .treasure-trail { padding-left: 2.2rem; }
  .treasure-stop::before { left: -2.2rem; width: 30px; height: 30px; font-size: 0.9rem; }
}

