/* ═══════════════════════════════════════════════════
   VALENTINE'S DAY — DESIGN SYSTEM
   ═══════════════════════════════════════════════════ */

:root {
  --bg: #FFF5F5;
  --primary: #8B0000;
  --accent: #C41E3A;
  --soft: #F4A0A0;
  --text: #3B0A0A;
  --gold: #C9A84C;
  --white: #FFFAFA;
  --shadow-glow: 0 0 30px rgba(201, 168, 76, 0.25), 0 0 60px rgba(201, 168, 76, 0.1);
  --shadow-card: 0 8px 32px rgba(59, 10, 10, 0.12);
  --transition: 0.4s ease;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Segoe UI', sans-serif;
  --font-script: 'Dancing Script', cursive;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* Heart pattern background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(196, 30, 58, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(244, 160, 160, 0.06) 0%, transparent 50%);
  background-size: 100% 100%;
}

/* Subtle repeating heart motif */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 35 C10 25 0 18 0 10 C0 4 4 0 10 0 C14 0 18 3 20 7 C22 3 26 0 30 0 C36 0 40 4 40 10 C40 18 30 25 20 35Z' fill='%238B0000'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

/* ── Views System ── */
.view {
  display: none;
  opacity: 0;
  transition: opacity var(--transition);
  min-height: 100dvh;
  padding: 20px 16px 40px;
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: center;
}

.view.active {
  display: flex;
  opacity: 1;
}

.view.fade-in {
  opacity: 1;
}

/* ── Card Container ── */
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 24px 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow-card);
}

.glow {
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* ── Lace Top Decoration ── */
.lace-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  z-index: 2;
  background: repeating-conic-gradient(var(--soft) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
  mask-image: linear-gradient(to bottom, black 50%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent);
  opacity: 0.6;
}

/* ── Ribbon Bow ── */
.ribbon-bow {
  text-align: center;
  margin-bottom: 8px;
}

.ribbon-bow svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* ── Typography ── */
.restaurant-name {
  font-family: var(--font-script);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(139, 0, 0, 0.1);
}

.subtitle {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 400;
}

/* ── Hearts Divider ── */
.hearts-divider {
  text-align: center;
  color: var(--soft);
  font-size: 1rem;
  letter-spacing: 6px;
  margin: 16px 0 24px;
  user-select: none;
}

/* ── Floating Hearts ── */
.hearts-scatter {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 60px;
  pointer-events: none;
}

.float-heart {
  position: absolute;
  bottom: 0;
  left: 50%;
  color: var(--soft);
  font-size: 0.8rem;
  opacity: 0;
  animation: floatUp 4s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.8);
  }

  20% {
    opacity: 0.7;
  }

  100% {
    opacity: 0;
    transform: translate(var(--x), -60px) scale(1.2);
  }
}

/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */

.btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-align: center;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(139, 0, 0, 0.06);
  transform: translateY(-2px);
}

.btn-no {
  background: transparent;
  color: #999;
  border: 1.5px solid #ccc;
  font-size: 0.85rem;
  padding: 10px 20px;
  width: auto;
  min-width: 80px;
}

.btn-no:hover {
  border-color: #aaa;
  color: #777;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ═══════════════════════════════════════════════════
   VIEW 2 — CAPTCHA
   ═══════════════════════════════════════════════════ */

.captcha-card {
  padding: 28px 20px 24px;
}

.captcha-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  color: var(--text);
  margin-bottom: 8px;
  font-variant: small-caps;
  font-weight: 600;
}

.captcha-pre-label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text);
  opacity: 0.6;
  text-align: center;
  margin-bottom: 16px;
}

/* Hidden section — revealed after checkbox */
.captcha-images-section {
  overflow: hidden;
  max-height: 800px;
  opacity: 1;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.captcha-images-section.hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* reCAPTCHA-style checkbox */
.recaptcha-box {
  background: #f9f9f9;
  border: 2px solid #d3d3d3;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
  transition: border-color 0.3s;
}

.recaptcha-box:hover {
  border-color: #b0b0b0;
}

.recaptcha-check {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.recaptcha-check input[type="checkbox"] {
  display: none;
}

.checkmark-custom {
  width: 28px;
  height: 28px;
  border: 2px solid #c1c1c1;
  border-radius: 3px;
  background: #fff;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s;
}

.recaptcha-check input:checked+.checkmark-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.recaptcha-check input:checked+.checkmark-custom::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 14px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.recaptcha-label {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: #333;
}

.captcha-instruction {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
}

/* 3×3 Image Grid */
.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.captcha-img-wrapper {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.captcha-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.captcha-img-wrapper.selected {
  border-color: var(--accent);
  transform: scale(0.95);
}

.captcha-img-wrapper.selected::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.captcha-error {
  color: var(--accent);
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.4em;
  margin-bottom: 8px;
  font-weight: 600;
}

.btn-verify {
  margin-bottom: 12px;
}

.skip-link {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: #aaa;
  text-decoration: none;
  font-family: var(--font-body);
  transition: color 0.2s;
}

.skip-link:hover {
  color: var(--text);
}

/* ═══════════════════════════════════════════════════
   VIEW 3 — MENU
   ═══════════════════════════════════════════════════ */

.menu-card {
  padding: 40px 28px 32px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background:
    linear-gradient(180deg, rgba(201, 168, 76, 0.04) 0%, transparent 30%),
    var(--white);
}

/* Scalloped top edge */
.menu-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 8px;
  right: 8px;
  height: 16px;
  background: radial-gradient(circle at 8px 16px, transparent 8px, var(--white) 8.5px);
  background-size: 16px 16px;
  background-position: 0 0;
}

/* Scalloped bottom edge */
.menu-card::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 8px;
  right: 8px;
  height: 16px;
  background: radial-gradient(circle at 8px 0, transparent 8px, var(--white) 8.5px);
  background-size: 16px 16px;
  background-position: 0 0;
}

.menu-title {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 4px;
}

.menu-subtitle {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--soft);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.menu-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.menu-divider::before,
.menu-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--soft), transparent);
}

.menu-divider::before {
  left: 0;
}

.menu-divider::after {
  right: 0;
}

.menu-divider span {
  color: var(--soft);
  font-size: 0.9rem;
  padding: 0 10px;
  background: var(--white);
  position: relative;
}

.menu-divider-line {
  margin: 28px auto;
  width: 60%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.menu-course {
  text-align: center;
  margin-bottom: 4px;
}

.course-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}

.dish-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 600;
}

.dish-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.75;
  line-height: 1.5;
}

.menu-price {
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.menu-footer {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-style: italic;
  text-align: center;
  color: var(--text);
  opacity: 0.55;
  margin-bottom: 24px;
}

.back-link {
  display: block;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.2s;
  margin-top: 12px;
}

.back-link:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════
   VIEW 4a — PROPOSAL
   ═══════════════════════════════════════════════════ */

.proposal-card {
  text-align: center;
  padding: 40px 24px 36px;
}

.photo-frame {
  width: 240px;
  max-width: 70vw;
  margin: 0 auto 28px;
  padding: 10px;
  background: var(--white);
  border-radius: 16px;
  border: 2px solid var(--gold);
  box-shadow:
    0 0 0 4px var(--white),
    0 0 0 6px var(--soft),
    0 8px 30px rgba(201, 168, 76, 0.3);
  position: relative;
}

/* Lace corner accents */
.photo-frame::before,
.photo-frame::after {
  content: '❀';
  position: absolute;
  font-size: 1.2rem;
  color: var(--gold);
  opacity: 0.5;
}

.photo-frame::before {
  top: -6px;
  left: -6px;
}

.photo-frame::after {
  bottom: -6px;
  right: -6px;
  transform: rotate(180deg);
}

.couple-photo {
  width: 100%;
  border-radius: 10px;
  display: block;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.proposal-question {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 28px;
  line-height: 1.3;
}

.proposal-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.proposal-buttons .btn-primary {
  width: auto;
  padding: 14px 32px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   VIEW 4b-YES — VALENTINE'S CARD
   ═══════════════════════════════════════════════════ */

.valentine-card {
  text-align: center;
  padding: 32px 20px 28px;
}

.ornate-frame {
  position: relative;
  padding: 20px 12px;
  border: 2px solid var(--gold);
  border-radius: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg,
      rgba(201, 168, 76, 0.05),
      rgba(244, 160, 160, 0.08),
      rgba(201, 168, 76, 0.05));
  box-shadow:
    inset 0 0 20px rgba(201, 168, 76, 0.08),
    0 0 0 4px var(--white),
    0 0 0 6px rgba(201, 168, 76, 0.15);
  overflow: hidden;
}

/* Double border deco */
.ornate-frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 12px;
  pointer-events: none;
}

.card-ribbon {
  margin-bottom: 12px;
}

.card-ribbon svg {
  opacity: 0.6;
}

.floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-hearts span {
  position: absolute;
  color: var(--soft);
  font-size: 1rem;
  opacity: 0;
  animation: heartFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 1.5s);
}

.floating-hearts span:nth-child(1) {
  left: 10%;
  top: 80%;
}

.floating-hearts span:nth-child(2) {
  right: 15%;
  top: 70%;
}

.floating-hearts span:nth-child(3) {
  left: 25%;
  top: 85%;
}

.floating-hearts span:nth-child(4) {
  right: 30%;
  top: 75%;
}

@keyframes heartFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6);
  }

  15% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1.3) rotate(15deg);
  }
}

.valentine-card-image {
  width: 100%;
  max-width: 340px;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

#card-content {
  position: relative;
  z-index: 1;
}

.btn-download {
  display: inline-block;
  width: auto;
  margin-top: 16px;
  padding: 12px 28px;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════
   VIEW 4b-NO — REJECTION
   ═══════════════════════════════════════════════════ */

.rejection-view {
  background: #2a0a0a;
}

.rejection-content {
  text-align: center;
  padding: 40px 24px;
  max-width: 380px;
}

.sad-chef {
  font-size: 4rem;
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.sad-chef .cross {
  position: absolute;
  top: -4px;
  right: -14px;
  font-size: 2.2rem;
  color: var(--accent);
  font-weight: 700;
}

.rejection-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.rejection-subtitle {
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--soft);
  margin-bottom: 40px;
}

.btn-heartbreak {
  background: transparent;
  color: var(--soft);
  border: 1.5px solid var(--soft);
  opacity: 0;
  animation: fadeInBtn 0.6s ease forwards;
  animation-delay: 3s;
}

.btn-heartbreak:hover {
  background: rgba(244, 160, 160, 0.1);
  color: #fff;
}

@keyframes fadeInBtn {
  to {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — Mobile-first (375–430px)
   ═══════════════════════════════════════════════════ */

@media (max-width: 430px) {
  .restaurant-name {
    font-size: 1.9rem;
  }

  .card {
    padding: 28px 18px 24px;
  }

  .menu-card {
    padding: 32px 20px 28px;
  }

  .proposal-question {
    font-size: 1.5rem;
  }

  .photo-frame {
    width: 200px;
  }
}

@media (min-width: 600px) {
  .view {
    padding: 40px 24px 60px;
  }

  .card {
    max-width: 480px;
  }

  .restaurant-name {
    font-size: 2.6rem;
  }

  .photo-frame {
    width: 280px;
  }
}