/* ============================================================
   COMPONENTS — buttons, nav, modal, carousel
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.25s, color 0.25s, box-shadow 0.25s, border-color 0.25s;
  border: 1.5px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn i { font-size: 0.85em; }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Primary — bright accent (the lead-magnet button) */
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px rgba(232, 162, 58, 0.35);
}
.btn--primary:hover { background: var(--accent-2); box-shadow: 0 10px 24px rgba(232, 162, 58, 0.45); }

/* Ghost — outlined on dark backgrounds (call button on dark surfaces) */
.btn--ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(245, 240, 230, 0.35);
}
.btn--ghost:hover { background: rgba(245, 240, 230, 0.08); border-color: var(--on-dark); }

/* Outline — dark outlined for use on light/cream backgrounds (call button) */
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(42, 39, 35, 0.25);
}
.btn--outline:hover { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }

/* Light — used on hero header */
.btn--light {
  background: var(--on-dark);
  color: var(--ink);
}
.btn--light:hover { background: var(--accent); color: var(--accent-ink); }

/* Dark — secondary on light backgrounds */
.btn--dark {
  background: var(--dark);
  color: var(--on-dark);
}
.btn--dark:hover { background: var(--accent); color: var(--accent-ink); }

.btn--lg { padding: 16px 30px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn-group { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Navigation ---------- */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 800;
  background: var(--dark);
  color: var(--on-dark);
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--on-dark);
}
.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 10px 14px;
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--on-dark-soft);
  border-radius: var(--radius-sm);
  transition: color 0.25s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-link:hover { color: var(--on-dark); }
.nav-link.active {
  color: var(--on-dark);
}
.nav-link.active::after { transform: scaleX(1); }

.nav-cta {
  margin-left: 10px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-pill);
  transition: background 0.25s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(232, 162, 58, 0.35);
}
.nav-cta:hover { background: var(--accent-2); transform: translateY(-2px); }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-dark);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.carousel-wrapper { width: 100%; height: 100%; position: relative; }
.carousel-wrapper a {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.carousel-wrapper a.active {
  opacity: 1;
  pointer-events: auto;
}
.carousel-wrapper img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  background: rgba(31, 29, 26, 0.55);
  color: var(--on-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  z-index: 3;
  backdrop-filter: blur(4px);
  transition: background 0.25s;
}
.carousel button:hover { background: var(--accent); color: var(--accent-ink); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.carousel-dot.active { background: var(--accent); transform: scale(1.3); }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 14, 12, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s var(--ease);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #2a2723 0%, #1f1d1a 100%);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 40px 44px 32px;
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.35s var(--ease);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  color: var(--on-dark-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s, color 0.25s;
}
.modal__close:hover { background: rgba(245,240,230,0.08); color: var(--on-dark); }

.modal__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow-line {
  display: inline-block;
  width: 28px; height: 2px;
  background: var(--accent);
}

.modal__panel h2 {
  color: var(--on-dark);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.modal__sub {
  color: var(--on-dark-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.modal__form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.modal__form .field { display: flex; flex-direction: column; }
.modal__form label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin-bottom: 8px;
}
.modal__form label span { color: var(--accent); }

.modal__form input,
.modal__form select,
.modal__form textarea {
  width: 100%;
  background: rgba(245, 240, 230, 0.04);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--on-dark);
  transition: border-color 0.25s, background 0.25s;
}
.modal__form input::placeholder,
.modal__form textarea::placeholder { color: var(--on-dark-muted); }
.modal__form input:focus,
.modal__form select:focus,
.modal__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(245, 240, 230, 0.07);
}
.modal__form textarea { resize: vertical; min-height: 96px; }

.modal__form select option {
  background: #1a1a1a;
  color: #f5f0e6;
}

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
}
.select-wrap i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--on-dark-muted);
  font-size: 0.75rem;
}

input[type="date"] { color-scheme: dark; }

.modal__form .field { margin-bottom: 18px; }
.modal__form .field-row .field { margin-bottom: 0; }

.modal__form > button { margin-top: 8px; }

.modal__fineprint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--on-dark-muted);
  margin-top: 14px;
}
.modal__success {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(232, 162, 58, 0.15);
  color: var(--accent);
  font-weight: 600;
}

body.modal-open { overflow: hidden; }
