/* ═══════════════════════════════════════════════════════════════════════════
   Yesha Style — Main Stylesheet
   Mobile-first. Breakpoints: 768px (tablet), 1024px (desktop)
   Brand palette:  Maroon #6B1E2E  |  Gold #C9A961  |  Cream #FDF8F0
   Fonts: Cormorant Garamond (headings) · Inter (body)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
  --maroon:       #6B1E2E;
  --maroon-dark:  #4e1621;
  --maroon-light: #8a2a3f;
  --gold:         #C9A961;
  --gold-light:   #dfc07e;
  --gold-dark:    #a88840;
  --cream:        #FDF8F0;
  --cream-mid:    #f5ede0;
  --white:        #ffffff;
  --text-dark:    #2c1a1f;
  --text-mid:     #5a3d45;
  --text-light:   #8a6b74;
  --error:        #c0392b;
  --success:      #27ae60;
  --whatsapp:     #25D366;

  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-card: 0 8px 40px rgba(107, 30, 46, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-btn:  0 4px 16px rgba(107, 30, 46, 0.25);

  --transition: 0.22s ease;
  --max-width:  680px;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-dark);
  background-color: var(--maroon);
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ── Three.js Canvas ───────────────────────────────────────────────────────── */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none; /* clicks pass through to page content */
}

/* ── Page Layout ───────────────────────────────────────────────────────────── */
/* Thin overlay so text sections stay readable over the animation */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(253, 248, 240, 0.10);
  z-index: 1;
  pointer-events: none;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* ── Content Cards — the cream "floating" panels ───────────────────────────── */
.content-card {
  background: rgba(253, 248, 240, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(201, 169, 97, 0.18);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BRAND HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
  padding: 40px 20px 20px;
  text-align: center;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Logo image — transparent PNG is the primary mark */
.brand-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 72px;
  max-width: 280px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(107,30,46,0.3));
}

/* Fallback text wordmark — hidden by default; JS/onerror reveals it */
.brand-text {
  display: none;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  line-height: 1;
}

/* Ornamental SVG divider */
.ornament { width: 100%; max-width: 300px; }
.ornament-svg { width: 100%; height: 20px; }

/* Tagline */
.brand-tagline {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(253, 248, 240, 0.75);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN — section spacing
   ═══════════════════════════════════════════════════════════════════════════ */
main {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-section { display: flex; justify-content: center; }

.hero-card { text-align: center; }

.hero-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--maroon);
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

.hero-copy {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 480px;
  margin: 0 auto 28px;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition);
  min-width: 200px;
  text-align: center;
  border: 2px solid transparent;
}

.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--maroon);
  color: var(--cream);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--maroon-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(107, 30, 46, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover, .btn-whatsapp:focus-visible {
  background: #1ea855;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.4);
}
.btn-whatsapp:active { transform: translateY(0); }

.btn-icon { flex-shrink: 0; }

/* Submit button special states */
.btn-submit { width: 100%; max-width: 320px; position: relative; }
.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin 0.8s linear infinite; }

/* ═══════════════════════════════════════════════════════════════════════════
   FORM SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.form-section { display: flex; justify-content: center; }

.form-card { text-align: left; }

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 400;
  color: var(--maroon);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-align: center;
}

.form-intro {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 28px;
  text-align: center;
  font-style: italic;
}

.ornament-inline {
  color: var(--gold);
  font-style: normal;
}

/* ── Form alert (global error or info above form) ──────────────────────────── */
.form-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.form-alert.alert-error {
  background: #fdf0ee;
  border-color: #e8b4ae;
  color: var(--error);
}
.form-alert.alert-success {
  background: #edfaf3;
  border-color: #a8ddc0;
  color: var(--success);
}

/* ── Form groups ────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.required { color: var(--maroon); }
.optional {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* ── Inputs ─────────────────────────────────────────────────────────────────── */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1.5px solid #ddd0c8;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: #b8a8ae; }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}

/* Valid field — gold border */
.form-input.is-valid,
.form-select.is-valid,
.form-textarea.is-valid {
  border-color: var(--gold);
}

/* Invalid field — red border */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

/* Phone prefix wrapper */
.input-with-prefix {
  display: flex;
  align-items: stretch;
}

.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--cream-mid);
  border: 1.5px solid #ddd0c8;
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  white-space: nowrap;
  flex-shrink: 0;
}

.input-with-prefix .form-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex: 1;
}

.input-with-prefix:focus-within .input-prefix {
  border-color: var(--gold);
}

/* Select dropdown arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236B1E2E' d='M8 11L2 5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

/* Textarea */
.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 4px;
  gap: 8px;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

/* Inline error message */
.form-error {
  display: block;
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 4px;
  min-height: 1.1em;
  line-height: 1.4;
}

/* Honeypot field — visually hidden and screen-reader hidden */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ── Submit button wrap ─────────────────────────────────────────────────────── */
.form-submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* ── Thank-you state ────────────────────────────────────────────────────────── */
.form-thankyou {
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.5s ease;
}

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

.thankyou-icon {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.thankyou-heading {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--maroon);
  margin-bottom: 12px;
}

.thankyou-copy {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 420px;
  margin: 0 auto 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SOCIAL LINKS
   ═══════════════════════════════════════════════════════════════════════════ */
.social-section { display: flex; justify-content: center; }

.social-card {
  text-align: center;
  padding: 24px 20px;
}

.social-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--maroon);
  transition: color var(--transition), transform var(--transition), background var(--transition);
  min-width: 60px;
}

.social-link:hover, .social-link:focus-visible {
  color: var(--gold-dark);
  transform: scale(1.1) translateY(-2px);
  background: rgba(201, 169, 97, 0.08);
  outline: none;
}

.social-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.social-name {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 20px 20px 32px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: rgba(253, 248, 240, 0.6);
}

.icon-pin { flex-shrink: 0; }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(253, 248, 240, 0.45);
  line-height: 1.6;
}

.footer-credit a {
  color: rgba(201, 169, 97, 0.7);
  transition: color var(--transition);
}
.footer-credit a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION — disable animations for users who prefer it
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  #three-canvas { display: none; }
  body { background-color: var(--maroon-dark); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET — 768px +
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .site-header { padding: 52px 32px 28px; }

  .brand-logo { height: 88px; max-width: 340px; }

  .content-card { padding: 48px 52px; }

  main { padding: 0 32px 32px; gap: 28px; }

  .hero-ctas {
    flex-direction: row;
    justify-content: center;
  }

  .btn { min-width: 180px; }

  .btn-submit { max-width: none; }

  .form-submit-wrap { justify-content: flex-start; }

  .social-links { gap: 4px; }

  .footer-copy { font-size: 0.8rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP — 1024px +
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .site-header { padding: 60px 40px 32px; }

  .brand-logo { height: 100px; max-width: 380px; }

  .content-card { padding: 56px 64px; }

  main {
    padding: 0 40px 40px;
    gap: 32px;
  }

  .hero-heading { font-size: 3rem; }

  .section-heading { font-size: 2.2rem; }

  .hero-copy { font-size: 1rem; }

  .form-intro { font-size: 0.95rem; }
}
