/* ============================================================
   Nonceweb — Quote page
   (loads after styles.css; reuses the same :root variables)
   ============================================================ */

:root { --error: #d98c6a; }

/* ---------- Hero ---------- */
.quote-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(120px, 16vw, 180px) 0 clamp(50px, 7vw, 80px);
  text-align: center;
}
.quote-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg) 100%);
  z-index: 1;
  pointer-events: none;
}
.quote-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin-inline: auto;
}
.quote-hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
}
.quote-hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--text);
  font-weight: 400;
  max-width: 60ch;
  margin: 0 auto 18px;
}
.quote-hero-intro {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 62ch;
  margin: 0 auto;
}

/* ---------- Layout ---------- */
.quote-section { padding-top: clamp(20px, 4vw, 48px); }
.quote-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

/* ---------- Left info ---------- */
.quote-info { position: sticky; top: 110px; }
.quote-info-title { font-size: clamp(1.7rem, 3vw, 2.3rem); }

.quote-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0 38px;
}
.quote-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-size: 1.02rem;
}
.qp-mark {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  position: relative;
}
.qp-mark::after {
  content: "";
  position: absolute;
  left: 7px; top: 5px;
  width: 5px; height: 9px;
  border: solid var(--gold);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.quote-contact {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.quote-contact-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.quote-contact-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 10px;
}
.quote-contact-line span {
  flex: none;
  width: 74px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.quote-contact-line a { color: var(--text); transition: color 0.3s var(--ease); }
.quote-contact-line a:hover { color: var(--gold-soft); }
.quote-note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Form card ---------- */
.quote-form-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}
.form-glow {
  position: absolute;
  top: -160px; right: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 164, 92, 0.18), transparent 65%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
.quote-form, .form-success { position: relative; z-index: 1; }

.form-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  margin-bottom: 28px;
}

/* ---------- Fields ---------- */
.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field label,
.field-radio legend {
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 9px;
}
.req { color: var(--gold); }
.opt { color: var(--muted); font-weight: 300; font-size: 0.8rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 300;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 15px;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(170, 163, 154, 0.65); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(201, 164, 92, 0.45); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(201, 164, 92, 0.05);
  box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.16);
}

/* Custom select arrow */
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c9a45c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 42px;
  cursor: pointer;
}
.field select option { background: var(--surface); color: var(--text); }

/* Helper + error text */
.field-hint { margin-top: 7px; font-size: 0.8rem; color: var(--muted); }
.field-error {
  margin-top: 7px;
  font-size: 0.8rem;
  color: var(--error);
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease), max-height 0.3s var(--ease), margin-top 0.3s var(--ease);
}
.field.invalid .field-error { opacity: 1; max-height: 40px; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: rgba(217, 140, 106, 0.7);
  box-shadow: 0 0 0 3px rgba(217, 140, 106, 0.14);
}

/* Radio group */
.field-radio { border: none; padding: 0; margin-bottom: 26px; }
.radio-group { display: flex; flex-wrap: wrap; gap: 12px; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--muted);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  position: relative;
  margin: 0;
  transition: border-color 0.3s var(--ease);
}
.radio input::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform 0.25s var(--ease);
}
.radio:hover { border-color: rgba(201, 164, 92, 0.5); color: var(--text); }
.radio:has(input:checked) {
  border-color: var(--gold);
  color: var(--text);
  background: rgba(201, 164, 92, 0.08);
}
.radio input:checked { border-color: var(--gold); }
.radio input:checked::after { transform: scale(1); }
.radio input:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

.form-submit { width: 100%; margin-top: 6px; }
.form-disclaimer {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Success message ---------- */
.form-success { text-align: center; padding: clamp(20px, 5vw, 50px) 0; }
.success-icon {
  width: 72px; height: 72px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  border: 1px solid var(--gold);
  background: rgba(201, 164, 92, 0.08);
  animation: popIn 0.5s var(--ease) both;
}
.success-icon svg { width: 38px; height: 38px; }
.success-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 14px;
}
.success-text {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 44ch;
  margin: 0 auto 30px;
}
.success-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Not sure section ---------- */
.not-sure {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}
.not-sure-inner { max-width: 640px; margin-inline: auto; }
.not-sure .btn { margin-top: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .quote-layout { grid-template-columns: 1fr; }
  .quote-info { position: static; top: auto; }
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .radio-group { flex-direction: column; }
  .radio { justify-content: flex-start; }
  .success-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .success-icon { animation: none; }
  .field-error { transition: none; }
}

/* ---------- Honeypot (hidden anti-spam field) ---------- */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Backend feedback / error message ---------- */
.form-feedback {
  margin: 0 0 16px;
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 0.9rem;
  border: 1px solid rgba(217, 140, 106, 0.5);
  background: rgba(217, 140, 106, 0.1);
  color: var(--error);
}
.form-feedback[hidden] { display: none; }

/* ---------- Submit loading state ---------- */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  top: 50%; left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(26, 20, 8, 0.35);
  border-top-color: #1a1408;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
