/* ============================================================
   Gitana Dreams — Quote Request Forms
   Shared stylesheet for publishing-quote.html + production-quote.html
   Loads AFTER css/style.css and only extends it. All colors, fonts
   and spacing come from the :root tokens defined in style.css.
   ============================================================ */

/* ---------- 1. Page shell -------------------------------- */

/* These pages have no hero, so the fixed header must always read as
   "solid" (the .scrolled state) instead of floating transparently. */
.quote-page .header {
  background: var(--cream);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.quote-page .header .logo img {
  margin-bottom: -35px;
  transform: translateY(5px);
  /* Las plumas del logo cuelgan por debajo del header (detalle de marca del sitio).
     Sin esto, la caja del <img> —que no respeta el alpha del PNG— sigue capturando
     clicks sobre el formulario y manda al home perdiendo lo cargado. El <a> de abajo
     conserva su propia área clickeable dentro del header. */
  pointer-events: none;
}

.quote-page .header .logo {
  position: relative;
  z-index: 1;
  height: 56px;
  pointer-events: auto;
}

@media (min-width: 769px) {
  .quote-page .nav-links {
    transform: translateY(0);
  }
}

.quote-page {
  background-color: var(--cream);
}

/* .gd-form sets display:flex, which would beat the UA [hidden] rule and
   keep the form visible after a successful submit. Force it closed. */
.quote-page [hidden] {
  display: none !important;
}

/* ---------- 2. Page intro -------------------------------- */

.quote-hero {
  padding-top: clamp(7.5rem, 16vw, 11rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.quote-hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.quote-eyebrow {
  margin-bottom: 1.25rem;
  /* .section-label y .text-accent definen colores distintos con la misma especificidad
     (ganaba --gold, 2.62:1 sobre crema). Lo fijamos acá para que cumpla AA. */
  color: var(--gold-deep);
  border-color: var(--gold-dark);
}

.quote-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 1.25rem;
}

.quote-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-dark);
}

.quote-intro {
  margin: 0 auto;
  max-width: 640px;
}

.quote-hero-rule {
  width: 120px;
  height: 1px;
  margin: clamp(2rem, 4vw, 2.75rem) auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

/* ---------- 3. Form card --------------------------------- */

.quote-form-section {
  padding-top: 0;
  padding-bottom: clamp(4rem, 10vw, 8rem);
}

.quote-card {
  max-width: 940px;
  margin: 0 auto;
  background: var(--white);
  border: var(--border-gold-faint);
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 60px -40px rgba(44, 36, 32, 0.35);
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

/* .gd-form already gives us flex column + gap; widen the rhythm here. */
.quote-form {
  gap: clamp(2.25rem, 5vw, 3.25rem);
}

/* ---------- 4. Fieldsets --------------------------------- */

.quote-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0; /* lets grids inside a fieldset shrink properly */
}

.quote-legend {
  /* --gold-dark medía 4.38:1 a 0.7rem; --gold-deep cumple AA en toda la tipografía estructural. */
  color: var(--gold-deep);
  display: block;
  width: 100%;
  padding: 0 0 0.85rem;
  margin-bottom: 1.6rem;
  border-bottom: var(--border-gold-faint);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.quote-fieldset-hint {
  margin: -0.9rem 0 1.5rem;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--charcoal-light);
}

/* Field stacks inside a fieldset need their own vertical rhythm,
   because .gd-form's gap only applies to its direct children. */
.quote-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Three-up row for shorter author-info fields. */

.quote-req {
  font-style: normal;
  /* --rose medía 2.71:1. Este tono mantiene el acento rosado y cumple AA. */
  color: #A6444C;
  margin-left: 2px;
}

/* Comfortable tap targets on every control. */
.quote-form .gd-field input,
.quote-form .gd-field select,
.quote-form .gd-field textarea {
  min-height: 50px;
}

.quote-form .gd-field textarea {
  min-height: 160px;
  line-height: 1.7;
}

/* Native date inputs need a nudge to line up with text inputs in Safari. */
.quote-form input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-body);
}

.quote-date-field {
  max-width: 320px;
}

/* ---------- 5. Choice grids (checkbox + radio) ----------- */

.quote-subgroup + .quote-subgroup {
  margin-top: 2rem;
}

/* Also used on nested <legend> elements, hence the padding/width reset. */
.quote-subgroup-title {
  display: block;
  width: 100%;
  padding: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.9rem;
}

.quote-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

/* Budget / status read better as a slightly tighter grid. */
.quote-choice-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.quote-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 52px;
  padding: 0.85rem 1rem;
  background: var(--cream);
  border: 1px solid rgba(184, 150, 62, 0.22);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.quote-choice:hover {
  border-color: var(--gold-light);
  background: var(--cream-dark);
}

/* Native control stays in the DOM (focusable, form-associated) but is
   painted by the custom .quote-choice-mark below. */
.quote-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.quote-choice-mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--gold-dark);
  border-radius: 3px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.quote-choice--radio .quote-choice-mark {
  border-radius: 50%;
}

/* Checkmark */
.quote-choice-mark::after {
  content: '';
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) scale(0.5);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  margin-top: -2px;
}

/* Radio dot */
.quote-choice--radio .quote-choice-mark::after {
  width: 8px;
  height: 8px;
  margin-top: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  transform: scale(0.4);
}

.quote-choice input:checked ~ .quote-choice-mark {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

.quote-choice input:checked ~ .quote-choice-mark::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.quote-choice--radio input:checked ~ .quote-choice-mark::after {
  transform: scale(1);
}

.quote-choice input:checked ~ .quote-choice-text {
  color: var(--charcoal);
  font-weight: 500;
}

.quote-choice:has(input:checked) {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(184, 150, 62, 0.25);
}

.quote-choice input:focus-visible ~ .quote-choice-mark {
  /* Antes 1.30:1 y sin outline: era la única señal de foco y casi no se veía. */
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(184, 150, 62, 0.45);
}

/* El tile entero también marca el foco, para que se vea sin depender del check. */
.quote-choice input:focus-visible ~ .quote-choice-mark,
.quote-choice:focus-within {
  border-radius: var(--radius-sm);
}
.quote-choice:focus-within {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.quote-choice-text {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.45;
  color: var(--charcoal-light);
}

/* ---------- 6. Submit + closing block -------------------- */

.quote-form .gd-form-error {
  margin-top: 0.5rem;
}

.quote-form .gd-submit {
  align-self: center;
  margin-top: 0;
  padding: 1.15rem 2.75rem;
  font-weight: 600;
  letter-spacing: 2px;
}

.quote-formfoot {
  margin-top: 1.75rem;
  text-align: center;
}

.quote-note {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--charcoal-light);
  max-width: 620px;
  margin: 0 auto;
}

.quote-signoff {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: var(--border-gold-faint);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--gold-dark);
}

/* ---------- 7. Success state ----------------------------- */

.quote-success {
  text-align: center;
  padding: clamp(1rem, 4vw, 2.5rem) 0;
}

.quote-success .gd-success-icon {
  margin: 0 auto 1.5rem;
}

.quote-success-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.quote-success-title em {
  font-style: italic;
  color: var(--gold-dark);
}

.quote-success-text {
  max-width: 520px;
  margin: 0 auto 2rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--charcoal-light);
}

/* ---------- 8. No-JS fallback ---------------------------- */

.quote-noscript {
  max-width: 940px;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem;
  background: rgba(184, 150, 62, 0.08);
  border: 1px solid rgba(184, 150, 62, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--charcoal-light);
}

.quote-noscript a {
  color: var(--gold-dark);
  text-decoration: underline;
}

/* ---------- 9. Responsive -------------------------------- */

@media (max-width: 900px) {
}

@media (max-width: 600px) {

  /* .gd-form-row is already 1fr at this breakpoint in style.css */
  .quote-choice-grid,
  .quote-choice-grid--compact {
    grid-template-columns: 1fr;
  }

  .quote-card {
    padding: 1.5rem 1.15rem;
    border-radius: 0;
    box-shadow: none;
    border-left: 0;
    border-right: 0;
    margin-left: calc(clamp(1.5rem, 5vw, 4rem) * -1);
    margin-right: calc(clamp(1.5rem, 5vw, 4rem) * -1);
  }

  .quote-form .gd-submit {
    align-self: stretch;
    width: 100%;
    padding: 1.15rem 1.25rem;
    letter-spacing: 1.5px;
  }

  .quote-date-field {
    max-width: none;
  }
}

/* ---------- 10. Motion / print --------------------------- */

@media (prefers-reduced-motion: reduce) {
  .quote-page .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media print {
  .quote-page .header,
  .quote-page .footer,
  .quote-form .gd-submit {
    display: none;
  }
  .quote-card {
    box-shadow: none;
    border: 0;
  }
}
