/* Meet Me Halfway — Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --mmh-bg:           #0d0818;
  --mmh-card-bg:      #130d24;
  --mmh-surface:      #1c1335;
  --mmh-surface2:     #241a45;
  --mmh-border:       #3a2866;
  --mmh-border-focus: #a855f7;
  --mmh-purple:       #9333ea;
  --mmh-purple-light: #c084fc;
  --mmh-purple-glow:  #7c3aed;
  --mmh-pink:         #ec4899;
  --mmh-text:         #e9d5ff;
  --mmh-text-muted:   #a78bca;
  --mmh-text-dim:     #6b4d91;
  --mmh-red:          #f43f5e;
  --mmh-success-bg:   #14532d22;
  --mmh-success-text: #86efac;
  --mmh-error-bg:     #7f1d1d22;
  --mmh-error-text:   #fca5a5;
  --mmh-radius:       14px;
  --mmh-radius-sm:    8px;
  --mmh-font-serif:   'Cormorant Garamond', Georgia, serif;
  --mmh-font-sans:    'DM Sans', sans-serif;
}

/* ─── Canvas — contained inside card ─────────── */
#mmh-hearts-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  border-radius: 24px;
}

/* ─── Wrapper ────────────────────────────────── */
.mmh-wrapper {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  font-family: var(--mmh-font-sans);
  background: transparent;
}

/* ─── Card ───────────────────────────────────── */
.mmh-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  background: var(--mmh-card-bg);
  border: 1px solid var(--mmh-border);
  border-radius: 24px;
  padding: 1.75rem 1.75rem 1.5rem;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(147, 51, 234, 0.1),
    0 0 60px rgba(124, 58, 237, 0.15),
    0 40px 80px rgba(0, 0, 0, 0.6);
}

/* ─── Card inner (above canvas) ──────────────── */
.mmh-card-inner {
  position: relative;
  z-index: 1;
}

/* ─── Header ─────────────────────────────────── */
.mmh-card-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.mmh-heart-icon {
  display: inline-block;
  font-size: 2rem;
  color: var(--mmh-red);
  animation: mmh-pulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.7));
}

@keyframes mmh-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.18); }
}

.mmh-title {
  font-family: var(--mmh-font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--mmh-text);
  margin: 0.4rem 0 0.25rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.mmh-subtitle {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mmh-purple-light);
  margin: 0;
}

/* ─── Alert ──────────────────────────────────── */
.mmh-alert {
  border-radius: var(--mmh-radius-sm);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  border: 1px solid;
}
.mmh-alert-success {
  background: var(--mmh-success-bg);
  color: var(--mmh-success-text);
  border-color: rgba(134, 239, 172, 0.2);
}
.mmh-alert-error {
  background: var(--mmh-error-bg);
  color: var(--mmh-error-text);
  border-color: rgba(252, 165, 165, 0.2);
}

/* ─── Grid ───────────────────────────────────── */
.mmh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

.mmh-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ─── Field ──────────────────────────────────── */
.mmh-field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mmh-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mmh-text-muted);
}

.mmh-required {
  color: var(--mmh-red);
  margin-left: 2px;
}

/* ─── Inputs ─────────────────────────────────── */
.mmh-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--mmh-surface);
  border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius-sm);
  color: var(--mmh-text);
  font-family: var(--mmh-font-sans);
  font-size: 0.9rem;
  padding: 0.72rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.mmh-input::placeholder { color: var(--mmh-text-dim); }

.mmh-input:hover {
  border-color: var(--mmh-border-focus);
  background: var(--mmh-surface2);
}

.mmh-input:focus {
  border-color: var(--mmh-purple);
  background: var(--mmh-surface2);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.18);
}

/* ─── Radio ──────────────────────────────────── */
.mmh-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.mmh-radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.mmh-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.mmh-radio-custom {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--mmh-border);
  background: var(--mmh-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.mmh-radio-custom::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mmh-purple-light);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.15s, transform 0.15s;
}

.mmh-radio-label:hover .mmh-radio-custom {
  border-color: var(--mmh-purple-light);
}

.mmh-radio-label input:checked ~ .mmh-radio-custom {
  border-color: var(--mmh-purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.18);
}

.mmh-radio-label input:checked ~ .mmh-radio-custom::after {
  opacity: 1;
  transform: scale(1);
}

.mmh-radio-text {
  color: var(--mmh-text);
  font-size: 0.9rem;
}

/* ─── Checkboxes ─────────────────────────────── */
.mmh-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.mmh-check-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.mmh-check-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.mmh-check-custom {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid var(--mmh-border);
  background: var(--mmh-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, color 0.15s;
}

.mmh-check-label:hover .mmh-check-custom {
  border-color: var(--mmh-purple-light);
}

.mmh-check-label input:checked ~ .mmh-check-custom {
  background: var(--mmh-purple);
  border-color: var(--mmh-purple);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

.mmh-check-text {
  color: var(--mmh-text);
  font-size: 0.9rem;
}

/* ─── Submit ─────────────────────────────────── */
.mmh-submit-row {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.mmh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--mmh-purple-glow), var(--mmh-pink));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--mmh-font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.85rem 2.6rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.45);
}

.mmh-btn:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.6);
}

.mmh-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.4);
}

.mmh-btn-heart {
  font-size: 1rem;
  animation: mmh-pulse 1.6s ease-in-out infinite;
}

/* ─── Divider between columns ────────────────── */
.mmh-col:not(:last-child) {
  border-right: 1px solid var(--mmh-border);
  padding-right: 2rem;
}

.mmh-col:not(:first-child) {
  padding-left: 0;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 820px) {
  .mmh-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mmh-col:not(:last-child) {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--mmh-border);
    padding-bottom: 1.5rem;
  }

  .mmh-card {
    padding: 1.25rem 1rem;
    border-radius: 18px;
  }

  .mmh-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .mmh-card {
    padding: 1rem 0.85rem;
    border-radius: 14px;
  }
}
