/* ===================================================================
   VocaGift Homepage Refresh — additional styles
   Does not override vg-core.js styles; only adds homepage-specific bits.
   =================================================================== */

/* ── Theme switch (Dark / Light) ─────────────────────────────────── */
html {
  color-scheme: dark;
}
html.light {
  color-scheme: light;
}

/* Light-mode overrides */
html.light body {
  background: #f7f7fc;
  color: #202139;
}
html.light header,
html.light .glass-card,
html.light #vg-mobile-drawer {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #dfe1ef !important;
}
html.light .text-white {
  color: #202139 !important;
}
html.light [class*="text-gray-"] {
  color: #596178 !important;
}
html.light [class*="text-purple-"],
html.light [class*="text-pink-"] {
  color: #7840b8 !important;
}
html.light [class*="text-emerald-"] {
  color: #08744f !important;
}
html.light [class*="border-white/"] {
  border-color: #dfe1ef !important;
}
html.light [class*="bg-white/"],
html.light [class*="bg-black/"] {
  background-color: rgba(109, 74, 180, 0.05) !important;
}
html.light .glow-btn,
html.light a.bg-gradient-to-r,
html.light button.bg-gradient-to-r {
  color: white !important;
}
html.light .gradient-text {
  background-image: linear-gradient(135deg, #7c3aed, #c72e88 70%, #087db0) !important;
}
html.light #recipient-start option {
  background: #fff;
  color: #202139;
}

/* Form controls keep a dark inline background from the dark theme, so light
   mode text colours end up dark-on-dark (1.1:1 contrast). Repaint the controls
   themselves instead of only the text. */
html.light select,
html.light input[type="text"],
html.light input[type="email"],
html.light input[type="number"],
html.light textarea {
  background-color: #fff !important;
  color: #202139 !important;
  border-color: #dfe1ef !important;
}
html.light select option {
  background: #fff;
  color: #202139;
}
/* Solid purple/emerald call-to-action surfaces keep white labels in light mode */
html.light .bg-purple-600,
html.light .bg-purple-500,
html.light .bg-emerald-500,
html.light .bg-emerald-600,
html.light #vg-promo-btn,
html.light #song-submit-btn {
  color: #fff !important;
}

/* Inline-styled footer meta text needs an !important override in light mode */
html.light footer [style*="color:#9CA3AF"],
html.light footer [style*="color: #9CA3AF"] {
  color: #5b6478 !important;
}

/* ── Hero rotating text (inline occasion) ───────────────────────── */
.t-hero-wrap {
  position: relative;
  min-height: 2.8em;
  max-width: 40rem;
  margin: 0 auto 0.75rem;
  overflow: hidden;
}
.t-hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  opacity: 0;
  transform: translateX(-110%);
  animation: tHeroSlide 36s ease-in-out infinite;
  will-change: transform, opacity;
  padding: 0 8px;
}
@media (max-width: 640px) {
  .t-hero blockquote {
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Smooth animation for dynamic occasion word in H1 */
.hero-dyn-word {
  display: inline-block;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-dyn-word.out {
  opacity: 0;
  transform: translateY(-6px);
}
.hero-dyn-word.in {
  opacity: 0;
  transform: translateY(6px);
}
@keyframes tHeroSlide {
  0%    { opacity: 0; transform: translateX(-110%); }
  2.5%  { opacity: 1; transform: translateX(0); }
  31%   { opacity: 1; transform: translateX(0); }
  33.5% { opacity: 0; transform: translateX(110%); }
  100%  { opacity: 0; transform: translateX(110%); }
}
.t-hero:nth-child(1) { animation-delay: 0s; }
.t-hero:nth-child(2) { animation-delay: 12s; }
.t-hero:nth-child(3) { animation-delay: 24s; }
@media (max-width: 560px) {
  .t-hero-wrap { height: 5.4em; }
  .t-hero { flex-wrap: wrap; row-gap: 0.15rem; }
}

/* ── Sample accordion ────────────────────────────────────────────── */
#sample-accordion {
  overflow: hidden;
  margin-bottom: 20px;
  scroll-margin-top: 100px;
}
#sample-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  font-size: 14px;
  font-weight: 700;
}
#sample-accordion summary::-webkit-details-marker {
  display: none;
}
#sample-accordion summary:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: -2px;
}
.sample-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
#sample-accordion[open] .sample-chevron {
  transform: rotate(180deg);
}
.sample-content {
  padding: 0 22px 22px;
}

/* ── Starter form ────────────────────────────────────────────────── */
#recipient-start button[type="submit"] {
  margin-top: 20px;
}
#recipient-start input:focus,
#recipient-start select:focus {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}
#recipient-start option {
  background: #121826;
  color: #f3f4f6;
}
#recipient-start input,
#recipient-start select {
  min-width: 0;
}

/* ── Reactions section (placeholder) ─────────────────────────────── */
.reaction-section {
  margin: 44px 0 48px;
}
.reaction-heading {
  text-align: left;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #c4a6ee;
}
.reaction-heading h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 12px 0;
}
.reaction-heading p {
  font-size: 14px;
  color: #a8a7ba;
}
.reaction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 768px) {
  .reaction-grid {
    grid-template-columns: 1fr;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .reaction-card {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
}
.reaction-card {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid #ffffff20;
  border-radius: 18px;
  text-align: left;
  background: radial-gradient(ellipse at 25% 20%, #704e80, transparent 65%), #251d38;
  color: #fff;
  transition: transform 0.2s, border-color 0.2s;
}
.reaction-card:hover {
  transform: translateY(-4px);
  border-color: #cf9fee;
}
.tone-1 {
  background: radial-gradient(ellipse at 70% 20%, #a55776, transparent 65%), #382033;
}
.tone-2 {
  background: radial-gradient(ellipse at 30% 15%, #7770a2, transparent 65%), #202039;
}
.mock-label {
  position: absolute;
  top: 14px;
  left: 12px;
  font-size: 8px;
  letter-spacing: 0.07em;
  border: 1px solid #ffffff40;
  padding: 5px 7px;
  border-radius: 5px;
}
.gift-art {
  position: absolute;
  inset: 24% 20% 33%;
  border: 1px solid #ffffff40;
  transform: rotate(-9deg);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff25, #ffffff03);
  box-shadow: 12px 18px 35px #0003;
  display: grid;
  place-items: center;
}
.gift-art > span {
  font-size: 64px;
  color: #f2d8f5;
}
.gift-art i {
  position: absolute;
  left: 45%;
  height: 100%;
  width: 10%;
  background: #ffffff12;
}
.tone-1 .gift-art {
  transform: rotate(8deg);
}
.scene-action {
  position: absolute;
  bottom: 28%;
  left: 14px;
  font-size: 10px;
  border-bottom: 1px solid #ffffff60;
  padding-bottom: 5px;
}
.reaction-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 35px 16px 20px;
  background: linear-gradient(transparent, #151122e8);
}
.reaction-copy strong {
  display: block;
  font-size: 17px;
}
.reaction-copy small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 7px;
  color: #e1d8e9;
}
.preview-disclosure {
  font-size: 11px;
  line-height: 1.6;
  color: #9894aa;
  margin: 14px 0;
}

/* ── Reactions dialog (used by vg-reactions.js) ──────────────────── */
#reaction-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  max-height: 85vh;
}
#reaction-dialog::backdrop {
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(4px);
}
#reaction-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #ffffff20;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s;
}
.dialog-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff40;
}
#reaction-dialog > div:first-of-type {
  background: #121826;
  border: 1px solid #ffffff15;
  border-radius: 16px;
  padding: 24px;
  max-height: 85vh;
  overflow-y: auto;
}
#scene-title {
  margin: 0 0 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
}
#storyboard p {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #d1d5db;
}
#storyboard b {
  color: #fff;
}
#local-reaction {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  margin-top: 16px;
}
.upload-label {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px dashed #ffffff30;
  border-radius: 10px;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.upload-label:hover {
  border-color: #a78bfa;
  color: #c4a6ee;
}
#reaction-file {
  display: none;
}
#video-status {
  margin-top: 10px;
  font-size: 12px;
  color: #9ca3af;
  min-height: 1em;
}

/* ── Theme toggle button (preview only — replace in production) ─── */
.preview-tools {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 12px;
  font-size: 10px;
  color: #9ca3af;
  border-bottom: 1px solid #ffffff10;
}
.preview-tools button {
  border: 1px solid #ffffff25;
  border-radius: 8px;
  padding: 5px 10px;
  color: inherit;
}

/* ── Accessibility: Reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .t-hero-wrap,
  .t-hero {
    animation: none !important;
    transition: none !important;
  }
  .t-hero-wrap .t-hero:nth-child(n+2) {
    display: none;
  }
}

/* ── Hero rotating testimonials (if used) ────────────────────────── */
.t-hero blockquote {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  color: #c4a6ee;
  max-width: 90%;
  text-align: center;
}