/* ══════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
══════════════════════════════════════════════ */
:root {
  --cream:        #faf9f6;
  --cream-dark:   #f2efe9;
  --white:        #ffffff;
  --charcoal:     #1a1a2e;
  --navy:         #16213e;
  --gold:         #c9a84c;
  --gold-dark:    #a8872f;
  --gold-deep:    #8a6f28;
  --gold-light:   #dbbe78;
  --gold-glow:    rgba(201, 168, 76, 0.35);
  --text-primary:   #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted:     #9090aa;
  --border:       #e0d9cf;
  --border-light: #ede9e2;
  --error:        #d93a3a;
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --transition:   0.18s ease;
}

/* ══════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--cream);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle dot-grid texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.032) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

em { font-style: italic; color: var(--gold); }

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ══════════════════════════════════════════════
   KEYFRAME ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalFloat {
  from { opacity: 0; transform: translateY(44px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════
   MODAL OVERLAY
══════════════════════════════════════════════ */
#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 12, 30, 0.78);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: overlayIn 0.4s ease forwards;
}

#modal-overlay.fade-out {
  animation: fadeIn 0.45s ease reverse forwards;
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   MODAL CARD — frosted glass, layered 3D shadows
══════════════════════════════════════════════ */
#modal {
  position: relative;
  width: 100%;
  max-width: 470px;
  max-height: 94vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  overscroll-behavior: contain;

  /* Frosted glass background */
  background: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(250, 247, 242, 0.97) 100%
  );
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.75);

  /* Layered 3D box shadows */
  box-shadow:
    0 1px 2px  rgba(0, 0, 0, 0.04),
    0 4px 8px  rgba(0, 0, 0, 0.07),
    0 12px 28px rgba(0, 0, 0, 0.10),
    0 32px 60px rgba(0, 0, 0, 0.14),
    0 60px 80px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  animation: modalFloat 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

#modal::-webkit-scrollbar { width: 4px; }
#modal::-webkit-scrollbar-track { background: transparent; }
#modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Gold accent strip at very top */
.modal-accent-bar {
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold-dark));
}

.modal-inner {
  padding: 30px 36px 36px;
}

.modal-badge-wrap { margin-bottom: 18px; }

.modal-badge {
  display: inline-block;
  padding: 4px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 100px;
  box-shadow: 0 3px 10px var(--gold-glow);
}

.modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 4.5vw, 29px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.modal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 22px 0;
}

/* ══════════════════════════════════════════════
   FORM FIELDS
══════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 13px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.88);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);

  /* Inset depth — pressed-in look */
  box-shadow:
    inset 0 2px 7px rgba(0, 0, 0, 0.07),
    inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.form-group input::placeholder {
  color: #bab6af;
  font-weight: 300;
}

.form-group input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 1);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.03),
    0 0 0 3.5px rgba(201, 168, 76, 0.18),
    0 0 0 1.5px var(--gold);
}

.form-group input.has-error {
  border-color: var(--error);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.06),
    0 0 0 3px rgba(217, 58, 58, 0.14);
}

.error-msg {
  display: block;
  font-size: 12px;
  color: var(--error);
  font-weight: 500;
  margin-top: 5px;
  min-height: 16px;
}

.form-error-global {
  font-size: 13px;
  color: var(--error);
  text-align: center;
  font-weight: 500;
  margin-bottom: 10px;
  min-height: 0;
}

/* ══════════════════════════════════════════════
   CONSENT BLOCK
══════════════════════════════════════════════ */
.consent-block {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-sm);
}

.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--gold-dark);
  cursor: pointer;
}

.consent-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.consent-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   SUBMIT BUTTON — 3D RAISED GOLD
══════════════════════════════════════════════ */
#submit-btn {
  width: 100%;
  padding: 15px 24px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);

  background: linear-gradient(160deg, #d6bc6e 0%, #c9a84c 50%, #b8973a 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;

  /* 3D raised effect — bottom shadow = the "base" */
  box-shadow:
    0 1px 0 var(--gold-deep),
    0 4px 0 rgba(138, 111, 40, 0.55),
    0 7px 18px rgba(201, 168, 76, 0.48),
    0 14px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);

  transform: translateY(0);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

#submit-btn:hover:not(:disabled) {
  background: linear-gradient(160deg, #dcc578 0%, #d4b356 50%, #c4a240 100%);
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 var(--gold-deep),
    0 7px 0 rgba(138, 111, 40, 0.5),
    0 10px 22px rgba(201, 168, 76, 0.58),
    0 20px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

/* Press-down effect */
#submit-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 0   0 var(--gold-deep),
    0 1px 0 rgba(138, 111, 40, 0.4),
    0 2px 8px rgba(201, 168, 76, 0.32),
    0 5px 12px rgba(0, 0, 0, 0.12),
    inset 0 2px 5px rgba(0, 0, 0, 0.12);
}

#submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
#submit-btn:hover:not(:disabled) .btn-arrow { transform: translateX(5px); }

/* ══════════════════════════════════════════════
   PRIVACY NOTE
══════════════════════════════════════════════ */
.no-consent-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.5;
}
.no-consent-note a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 1px;
}

.privacy-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/public/hero-bg.jpg');
  background-size: cover;
  background-position: center 40%;
  background-attachment: fixed;
}

/* Layered gradient overlays — depth + readability */
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(26,26,46,0.88) 0%, rgba(22,33,62,0.78) 45%, rgba(16,24,48,0.60) 100%),
    linear-gradient(to top, rgba(26,26,46,0.6) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 64px 80px;
  max-width: 680px;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--gold);
  margin-bottom: 22px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 700;
  line-height: 1.08;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}

.hero-title em {
  color: var(--gold-light);
  font-style: italic;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 48px;
  letter-spacing: 0.1px;
}

/* Glassmorphism stats bar */
.hero-stats {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 18px 28px;
}

.stat-item { text-align: center; padding: 0 24px; }

.stat-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.stat-lbl {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.58);
  letter-spacing: 0.8px;
  margin-top: 5px;
  text-transform: uppercase;
}

.stat-sep {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   FEATURES SECTION
══════════════════════════════════════════════ */
#features {
  padding: 96px 0;
  background: var(--cream-dark);
  position: relative;
  z-index: 1;
}

.section-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-dark);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 500px;
  margin: 0 auto 52px;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-align: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 6px 16px rgba(0, 0, 0, 0.055);
}

.feature-card:hover {
  transform: translateY(-7px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 16px 36px rgba(0, 0, 0, 0.1);
}

.feature-icon-wrap {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, rgba(201,168,76,0.13), rgba(201,168,76,0.06));
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--gold-dark);
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════
   PDF VIEWER SECTION
══════════════════════════════════════════════ */
#pdf-section {
  padding: 96px 0;
  background: var(--cream);
  position: relative;
  z-index: 1;
  display: none;
}

#pdf-section.visible {
  display: block;
  animation: fadeInUp 0.6s ease forwards;
}

.pdf-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 44px;
}

.pdf-viewer-wrap {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 16px 40px rgba(0, 0, 0, 0.08);
}

#pdf-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(201, 168, 76, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  margin: 0 auto 16px;
}

#pdf-pages { width: 100%; }

#pdf-pages canvas {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09);
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
#footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.45);
  padding: 48px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-top {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-kw {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--gold);
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.38);
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero-content {
    padding: 100px 28px 64px;
  }

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
  }

  .stat-sep { display: none; }
  .stat-item { padding: 4px 16px; }

  .modal-inner { padding: 22px 24px 28px; }
  .modal-title { font-size: 22px; }

  #features { padding: 64px 0; }
  #pdf-section { padding: 64px 0; }

  .pdf-viewer-wrap {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════════ */
@media (max-width: 520px) {
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .hero-title { font-size: 34px; letter-spacing: -1px; }
  .hero-subtitle { font-size: 16px; }

  /* Gracefully scale down 3D effects */
  #submit-btn {
    box-shadow:
      0 1px 0 var(--gold-deep),
      0 3px 0 rgba(138, 111, 40, 0.45),
      0 5px 14px rgba(201, 168, 76, 0.42),
      0 10px 22px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }

  #modal {
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.12),
      0 28px 50px rgba(0, 0, 0, 0.13),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}
