/**
 * Broken Hearts Map — shared styles (2026 UX refresh)
 * Paths relative to this file (in /assets/)
 */
@font-face {
  font-family: 'Loveness';
  src: url('../loveness.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bhm-accent: #e84a7a;
  --bhm-accent-hover: #ff6b94;
  --bhm-accent-soft: rgba(232, 74, 122, 0.28);
  --bhm-body-bg: #15020e;
  --bhm-overlay: rgba(21, 2, 14, 0.76);
  --bhm-card-bg: rgb(45, 27, 61);
  --bhm-card-border: rgba(255, 255, 255, 0.1);
  --bhm-card-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --bhm-text: #ffffff;
  --bhm-text-muted: rgba(255, 255, 255, 0.88);
  --bhm-text-soft: rgba(255, 255, 255, 0.72);
  --bhm-input-focus: rgba(232, 74, 122, 0.45);
  --bhm-success: #8fd88f;
  --bhm-error: #ffb3b3;
  --bhm-link: rgba(255, 255, 255, 0.92);
  --bhm-link-hover: #ffffff;
  --bhm-topbar-gap: 0.5rem;
}

[data-theme="light"] {
  --bhm-body-bg: #f4eef5;
  --bhm-overlay: rgba(255, 248, 252, 0.88);
  --bhm-card-bg: #5c3d6e;
  --bhm-card-border: rgba(0, 0, 0, 0.08);
  --bhm-card-shadow: 0 20px 40px rgba(80, 40, 70, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --bhm-text: #1a0d14;
  --bhm-text-muted: rgba(26, 13, 20, 0.92);
  --bhm-text-soft: rgba(26, 13, 20, 0.72);
  --bhm-link: #5c2d4a;
  --bhm-link-hover: #3d1d32;
  --bhm-success: #2d6a2d;
  --bhm-error: #b33a3a;
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body.bhm {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  background-color: var(--bhm-body-bg);
  background-image: linear-gradient(180deg, var(--bhm-overlay) 0%, var(--bhm-overlay) 100%), url('../background_01.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  padding: 4.5rem 1rem 3rem;
  color: var(--bhm-text);
}

/* Atmospheric glow so the refresh reads clearly vs flat purple */
body.bhm::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 70% at 50% -15%, rgba(232, 74, 122, 0.42), transparent 58%),
    radial-gradient(ellipse 55% 45% at 100% 40%, rgba(138, 80, 180, 0.22), transparent 52%),
    radial-gradient(ellipse 50% 40% at 0% 75%, rgba(232, 74, 122, 0.12), transparent 50%);
}

body.bhm > *:not(.bhm-topbar):not(.bhm-skip) {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  body.bhm {
    background-attachment: scroll;
  }
}

.bhm-skip {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--bhm-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: left 0.2s ease;
}

.bhm-skip:focus {
  left: 0.75rem;
  outline: none;
  box-shadow: 0 0 0 3px var(--bhm-input-focus);
}

.bhm-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--bhm-topbar-gap);
  padding: 0.75rem max(1rem, env(safe-area-inset-right)) 0.5rem max(1rem, env(safe-area-inset-left));
  padding-top: max(0.75rem, env(safe-area-inset-top));
  pointer-events: none;
}

.bhm-topbar > * {
  pointer-events: auto;
}

.bhm-theme-toggle {
  background: rgba(45, 27, 61, 0.95);
  color: var(--bhm-text);
  border: 1px solid var(--bhm-card-border);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.bhm-theme-toggle:hover {
  border-color: var(--bhm-accent);
  background: var(--bhm-accent-soft);
}

.bhm-theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bhm-input-focus);
}

[data-theme="light"] .bhm-theme-toggle {
  background: rgba(255, 255, 255, 0.9);
}

.bhm-lang form {
  display: inline;
}

.bhm-lang select {
  background: rgba(45, 27, 61, 0.95);
  color: var(--bhm-text);
  border: 1px solid var(--bhm-card-border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bhm-lang select:hover {
  border-color: var(--bhm-accent);
}

.bhm-lang select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bhm-input-focus);
}

[data-theme="light"] .bhm-lang select {
  background: rgba(255, 255, 255, 0.95);
  color: #1a0d14;
}

.page-hero {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 640px;
}

.page-hero .hero-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.page-hero .logo-icon {
  height: 80px;
  width: auto;
  vertical-align: middle;
  filter: drop-shadow(0 0 22px rgba(232, 74, 122, 0.55)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.page-hero .title {
  font-family: 'Loveness', serif;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  color: var(--bhm-text);
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(232, 74, 122, 0.25);
}

[data-theme="light"] .page-hero .title {
  text-shadow: none;
}

.page-hero .subtitle-1 {
  font-size: 1.35rem;
  color: #ffe8ef;
  margin: 0 0 0.5rem;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 0 28px rgba(232, 74, 122, 0.45);
  border-bottom: 2px solid var(--bhm-accent-soft);
  display: inline-block;
  padding-bottom: 0.2rem;
}

[data-theme="light"] .page-hero .subtitle-1 {
  color: #6b2d4a;
  text-shadow: none;
  border-bottom-color: rgba(232, 74, 122, 0.35);
}

.page-hero .subtitle-2 {
  font-size: 1.05rem;
  color: var(--bhm-text-soft);
  margin: 0;
  line-height: 1.55;
}

@keyframes bhmCardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bhm-card {
  background: linear-gradient(
    155deg,
    rgba(92, 58, 118, 0.52) 0%,
    rgba(45, 27, 61, 0.78) 42%,
    rgba(55, 32, 74, 0.74) 100%
  );
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 20px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(232, 74, 122, 0.14),
    0 0 56px rgba(232, 74, 122, 0.22),
    0 28px 64px rgba(0, 0, 0, 0.55);
  animation: bhmCardIn 0.55s ease-out forwards;
}

[data-theme="light"] .bhm-card {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(244, 230, 248, 0.88) 45%,
    rgba(230, 210, 235, 0.9) 100%
  );
  border: 1px solid rgba(92, 61, 110, 0.18);
  box-shadow:
    0 0 0 1px rgba(232, 74, 122, 0.12),
    0 0 40px rgba(120, 60, 100, 0.12),
    0 22px 48px rgba(80, 40, 70, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .bhm-card {
    animation: none;
  }
}

.bhm-card--wide {
  max-width: 720px;
  text-align: left;
}

.waitlist-steps {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}

.waitlist-steps__item {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bhm-text-soft);
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.waitlist-steps__item--done {
  color: var(--bhm-text-muted);
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="light"] .waitlist-steps__item--done {
  border-color: rgba(0, 0, 0, 0.12);
}

.waitlist-steps__item--current {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--bhm-accent) 0%, #a855c4 100%);
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(232, 74, 122, 0.4);
}

[data-theme="light"] .waitlist-steps__item--current {
  color: #fff;
  box-shadow: 0 4px 16px rgba(200, 60, 110, 0.35);
}

.waitlist-steps__item--pending {
  opacity: 0.65;
}

.landing-image {
  width: 50%;
  max-width: 50%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
  border-radius: 10px;
}

.bhm-signup-heading {
  font-size: 1.28rem;
  font-weight: 700;
  margin: 1.35rem 0 0.5rem;
  line-height: 1.25;
  color: var(--bhm-text);
}

.bhm-signup-lead {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--bhm-text-soft);
  margin: 0 0 1.1rem;
  text-align: center;
}

.bhm-store-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .bhm-store-block {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.bhm-store-block__label {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bhm-text-soft);
  text-align: center;
}

.bhm-store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.85rem 1.15rem;
}

.bhm-store-badge-img {
  height: 48px;
  width: auto;
  display: block;
}

.bhm-store-block__note {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--bhm-text-soft);
  text-align: center;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  color: var(--bhm-text-muted);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: #fff;
  color: #1a1a1a;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
  color: #666;
}

.form-group input:hover {
  border-color: rgba(232, 74, 122, 0.25);
}

.form-group input:focus {
  outline: none;
  border-color: var(--bhm-accent);
  box-shadow: 0 0 0 3px var(--bhm-accent-soft);
}

.form-feedback {
  margin-bottom: 0.75rem;
}


.error-inline {
  color: var(--bhm-error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.form-feedback .error {
  color: var(--bhm-error);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.form-feedback .success {
  color: var(--bhm-success);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

button[type="submit"] {
  width: 100%;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--bhm-accent) 0%, #c73d68 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  box-shadow: 0 4px 16px rgba(232, 74, 122, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button[type="submit"]:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(232, 74, 122, 0.45);
}

button[type="submit"]:active {
  transform: scale(0.98);
}

button[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--bhm-accent);
}

.bhm-footer-link {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.bhm-footer-link a {
  color: var(--bhm-text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.bhm-footer-link a:hover {
  color: var(--bhm-link-hover);
}

.bhm-footer-link a:focus-visible {
  outline: 2px solid var(--bhm-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Verify */
.bhm-message {
  color: var(--bhm-success);
  font-size: 1.05rem;
  margin: 1rem 0;
  line-height: 1.5;
}

.bhm-message.error {
  color: var(--bhm-error);
}

.bhm-card .bhm-back {
  margin: 0;
}

.bhm-card .bhm-back a,
.bhm-card p a {
  color: var(--bhm-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.bhm-card .bhm-back a:hover,
.bhm-card p a:hover {
  color: var(--bhm-accent-hover);
}

.bhm-card .bhm-back a:focus-visible,
.bhm-card p a:focus-visible {
  outline: 2px solid var(--bhm-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Privacy */
.policy-card h1 {
  font-size: 1.5rem;
  color: var(--bhm-text);
  margin: 0 0 0.25rem;
}

.policy-card .updated {
  color: var(--bhm-text-soft);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.policy-card h2 {
  font-size: 1.1rem;
  color: var(--bhm-text);
  margin: 1.5rem 0 0.5rem;
}

.policy-card p {
  margin: 0 0 0.75rem;
  line-height: 1.65;
  font-size: 0.95rem;
  color: var(--bhm-text-muted);
}

.policy-card ul {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
  line-height: 1.6;
  color: var(--bhm-text-muted);
}

.policy-card a {
  color: #c9a0dc;
  transition: color 0.2s ease;
}

[data-theme="light"] .policy-card a {
  color: #6b3d7a;
}

.policy-card a:hover {
  color: var(--bhm-accent-hover);
}

.policy-card a:focus-visible {
  outline: 2px solid var(--bhm-accent);
  outline-offset: 2px;
}

.policy-card .back {
  margin-top: 2rem;
  text-align: center;
}

.policy-card .back a {
  color: var(--bhm-link);
}
