/* Pōmaikaʻi Ventures — Inquiry Modal styles */

/* ===== Layer / backdrop ===== */
.pv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pv-modal.is-open { opacity: 1; }

/* When [hidden] is set, fully hide and disable pointer events.
 * The display:flex above otherwise overrides the default [hidden] behavior. */
.pv-modal[hidden] { display: none; }

.pv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 27, 44, 0.84); /* navy 84% over the muted page */
  backdrop-filter: blur(4px) saturate(0.85);
  -webkit-backdrop-filter: blur(4px) saturate(0.85);
}

body.pv-modal-open { overflow: hidden; }

/* ===== Card ===== */
.pv-modal-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  background: #F6F0E3; /* cream */
  color: #0E1B2C; /* navy */
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px -20px rgba(14, 27, 44, 0.5),
              0 12px 24px -8px rgba(14, 27, 44, 0.3);
  overflow: hidden;
  transform: translateY(8px) scale(0.985);
  transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pv-modal.is-open .pv-modal-card { transform: translateY(0) scale(1); }

/* Terra rule line on top */
.pv-modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #8C4622; /* Terra */
}

/* ===== Header ===== */
.pv-modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px 16px;
}
.pv-modal-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: #0E1B2C;
}
.pv-modal-mark svg { width: 100%; height: 100%; }

.pv-modal-step {
  flex: 1;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(14, 27, 44, 0.5);
  font-weight: 500;
}

.pv-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(14, 27, 44, 0.55);
  border-radius: 50%;
  transition: background 160ms, color 160ms;
}
.pv-modal-close:hover {
  background: rgba(14, 27, 44, 0.06);
  color: #0E1B2C;
}

/* ===== Progress bar ===== */
.pv-modal-progress {
  height: 1px;
  background: rgba(14, 27, 44, 0.08);
  margin: 0 28px;
}
.pv-modal-progress-fill {
  height: 100%;
  background: #8C4622;
  width: 0%;
  transition: width 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ===== Body ===== */
.pv-modal-body {
  padding: 36px 28px 24px;
  flex: 1;
  overflow-y: auto;
  min-height: 280px;
}

/* Step animation */
.pv-step {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pv-step.pv-step-active {
  opacity: 1;
  transform: translateY(0);
}

.pv-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8C4622; /* Terra */
  font-weight: 600;
  margin: 0 0 12px;
}

.pv-title {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: #0E1B2C;
  margin: 0 0 12px;
}

.pv-sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(14, 27, 44, 0.65);
  margin: 0 0 28px;
  max-width: 50ch;
}

/* ===== Inputs ===== */
.pv-input-wrap { margin-top: 8px; }

.pv-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(14, 27, 44, 0.22);
  padding: 10px 0;
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.4;
  color: #0E1B2C;
  outline: none;
  transition: border-color 200ms;
}
.pv-input::placeholder {
  color: rgba(14, 27, 44, 0.32);
  font-style: italic;
}
.pv-input:focus {
  border-bottom-color: #8C4622;
}

.pv-textarea {
  resize: vertical;
  min-height: 120px;
  font-size: 18px;
  line-height: 1.5;
  border: 1px solid rgba(14, 27, 44, 0.22);
  padding: 12px 14px;
  border-radius: 2px;
}
.pv-textarea:focus { border-color: #8C4622; }

.pv-input-error,
.pv-input.pv-input-error,
.pv-radio-group.pv-input-error {
  border-color: #B04A3C !important;
}

.pv-error {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #B04A3C;
  margin: 10px 0 0;
}

/* ===== Radio group ===== */
.pv-radio-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.pv-radio {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  cursor: pointer;
  border-bottom: 1px solid rgba(14, 27, 44, 0.08);
  transition: background 160ms;
}
.pv-radio:last-child { border-bottom: none; }
.pv-radio:hover {
  background: rgba(140, 70, 34, 0.04);
}
.pv-radio input { position: absolute; opacity: 0; pointer-events: none; }

.pv-radio-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(14, 27, 44, 0.32);
  flex-shrink: 0;
  position: relative;
  transition: border-color 160ms;
}
.pv-radio-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #8C4622;
  transform: scale(0);
  transition: transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pv-radio input:checked ~ .pv-radio-mark {
  border-color: #8C4622;
}
.pv-radio input:checked ~ .pv-radio-mark::after {
  transform: scale(1);
}
.pv-radio input:focus-visible ~ .pv-radio-mark {
  box-shadow: 0 0 0 3px rgba(140, 70, 34, 0.2);
}

.pv-radio-label {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-size: 19px;
  color: #0E1B2C;
  line-height: 1.3;
}

/* ===== Footer / nav buttons ===== */
.pv-modal-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px 24px;
  border-top: 1px solid rgba(14, 27, 44, 0.08);
}
.pv-modal-foot-spacer { flex: 1; }

.pv-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 180ms, color 180ms, transform 120ms;
}
.pv-btn:active { transform: translateY(1px); }
.pv-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.pv-btn[hidden] { display: none; }

.pv-btn-terra {
  background: #8C4622;
  color: #F6F0E3;
}
.pv-btn-terra:hover {
  background: #A66838;
}

.pv-btn-ghost {
  background: transparent;
  color: rgba(14, 27, 44, 0.6);
  padding: 14px 18px;
}
.pv-btn-ghost:hover { color: #0E1B2C; }

/* ===== Thank you ===== */
.pv-thanks {
  text-align: left;
}
.pv-thanks-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  /* User intent: mobile is a CENTERED CARD, just smaller — not a takeover */
  .pv-modal { padding: 16px; }
  .pv-modal-card {
    max-width: 100%;
    width: 100%;
    max-height: calc(100vh - 32px);
    height: auto;
    border-radius: 12px;
  }
  .pv-modal-body { padding: 22px 20px 16px; }
  .pv-modal-head { padding: 16px 20px 10px; }
  .pv-modal-progress { margin: 0 20px; }
  .pv-modal-foot { padding: 14px 20px 18px; }
  .pv-title { font-size: 24px; }
  .pv-input { font-size: 18px; }
  .pv-radio-label { font-size: 16px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .pv-modal,
  .pv-modal-card,
  .pv-step,
  .pv-modal-progress-fill,
  .pv-radio-mark::after { transition: none; }
}

/* ===== Nav button compatibility =====
 * The CTA conversion turned <a href="#contact"> into <button>. The bare buttons
 * inside .nav-links and .mobile-menu need to inherit the link look.
 */
.nav-links button:not(.btn):not(.nav-toggle),
.mobile-menu button:not(.btn) {
  background: transparent;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin: 0;
  letter-spacing: inherit;
  text-transform: inherit;
}

/* ===== Combined intake step (Step 1: name + email + role) ===== */
.pv-intake {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 22px;
}
.pv-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
}
.pv-field-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(14, 27, 44, 0.55);
  padding: 0;
}
.pv-field .pv-input {
  margin: 0;
}
.pv-field-role {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Role chips — horizontal pill selectors that wrap on narrow viewports */
.pv-radio-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.pv-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.pv-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.pv-chip-label {
  display: inline-block;
  padding: 9px 14px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(14, 27, 44, 0.78);
  background: rgba(14, 27, 44, 0.04);
  border: 1px solid rgba(14, 27, 44, 0.14);
  border-radius: 999px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.pv-chip:hover .pv-chip-label {
  border-color: rgba(140, 70, 34, 0.45);
  color: #0E1B2C;
}
.pv-chip input:checked ~ .pv-chip-label {
  background: rgba(140, 70, 34, 0.10);
  border-color: #8C4622;
  color: #5C2C16;
  font-weight: 600;
}
.pv-chip input:focus-visible ~ .pv-chip-label {
  outline: 2px solid #C9A96E;
  outline-offset: 2px;
}

/* Mobile: compact card stays centered */
@media (max-width: 600px) {
  .pv-modal-card { max-height: calc(100vh - 24px); }
  .pv-modal-body { padding: 24px 22px 18px; }
  .pv-modal-head { padding: 18px 22px 12px; }
  .pv-intake { gap: 14px; margin-top: 16px; }
}
