﻿/* PresentTool™ Storytelling — section: footer-cta (v3.7.0)
   ──────────────────────────────────────────────────────────────
   Dark, warm-gradient final pitch. White form card with two-col
   grid (collapses on small screens), three alternative-contact
   rows below and a standalone green WhatsApp pill. */

.story-footer-cta {
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, #6E3610 100%);
  color: #fff;
  padding: 96px 24px 88px;
  min-height: 700px;
  overflow: hidden;
  isolation: isolate;
}

.footer-cta__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(200, 149, 108, 0.18), transparent 55%),
    radial-gradient(circle at 82% 70%, rgba(139, 69, 19, 0.22), transparent 60%);
}

.footer-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.footer-cta__eyebrow {
  display: inline-block;
  font-family: var(--pt-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 18px;
}

.footer-cta__title {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 16px;
}

.footer-cta__subtitle {
  font-family: var(--pt-sans);
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 auto 36px;
  max-width: 560px;
}

/* ── Form card ──────────────────────────────────────────────── */

.footer-cta__form-card {
  background: var(--pt-surface-0);
  color: var(--pt-text);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25),
              0 32px 80px rgba(0, 0, 0, 0.35);
  padding: 32px;
  text-align: left;
  margin: 0 auto 28px;
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.footer-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.footer-form__field--full {
  grid-column: 1 / -1;
}

.footer-form__field label {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pt-text-muted);
}

.footer-form__optional {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--pt-sans);
  font-size: 10.5px;
  color: var(--pt-text-subtle);
  margin-left: 4px;
}

.footer-form__field input,
.footer-form__field textarea {
  font-family: var(--pt-sans);
  font-size: 14px;
  color: var(--pt-text);
  background: var(--pt-surface-1);
  border: 1px solid var(--pt-border);
  border-radius: 6px;
  padding: 11px 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.footer-form__field input::placeholder,
.footer-form__field textarea::placeholder {
  color: var(--pt-text-subtle);
}

.footer-form__field input:focus,
.footer-form__field textarea:focus {
  border-color: var(--pt-primary);
  background: var(--pt-surface-0);
  box-shadow: 0 0 0 3px var(--pt-accent-soft);
}

.footer-form__field input[aria-invalid="true"],
.footer-form__field textarea[aria-invalid="true"] {
  border-color: var(--pt-destructive);
  box-shadow: 0 0 0 3px rgba(176, 58, 46, 0.12);
}

.footer-form__field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
  font-family: var(--pt-sans);
}

.footer-form__hint {
  font-family: var(--pt-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--pt-text-muted);
  margin: 4px 0 0;
}

.footer-form__error {
  font-family: var(--pt-sans);
  font-size: 12px;
  color: var(--pt-destructive);
  margin: 4px 0 0;
}

/* Inline rate-limited warning pill (rendered into [data-role="warning"]). */
.footer-form__warning {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--pt-sans);
  font-size: 13px;
  background: rgba(160, 114, 42, 0.10);
  border: 1px solid rgba(160, 114, 42, 0.32);
  color: #5B3A0E;
}
.footer-form__warning[hidden] { display: none; }
.footer-form__warning.is-rate-limited::before {
  content: "⏱  ";
  margin-right: 2px;
  font-feature-settings: normal;
}

.footer-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.footer-form__disclaimer {
  font-family: var(--pt-sans);
  font-size: 12px;
  color: var(--pt-text-subtle);
  margin: 0;
  flex: 1 1 220px;
  min-width: 0;
}

.footer-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--pt-primary);
  color: #fff;
  border: 1px solid var(--pt-primary);
  font-family: var(--pt-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease, opacity 0.12s ease;
  min-width: 200px;
  position: relative;
}

.footer-form__submit:hover {
  background: #6E3610;
  border-color: #6E3610;
}
.footer-form__submit:active { transform: translateY(1px); }
.footer-form__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65),
              0 0 0 6px var(--pt-accent-soft);
}
.footer-form__submit:disabled,
.footer-form__submit[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

.footer-form__submit-icon {
  width: 14px;
  height: 14px;
}

.footer-form__submit[aria-busy="true"] .footer-form__submit-icon { visibility: hidden; }

.footer-form__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  position: absolute;
  right: 18px;
  top: 50%;
  margin-top: -8px;
  animation: pt-fcta-spin 0.7s linear infinite;
}
.footer-form__spinner[hidden] { display: none; }

@keyframes pt-fcta-spin { to { transform: rotate(360deg); } }

/* ── Success card (replaces form-card contents on 200) ──────── */

.footer-form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  gap: 14px;
}

.footer-form-success__check {
  width: 60px;
  height: 60px;
  background: rgba(45, 122, 79, 0.12);
  color: var(--pt-success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(45, 122, 79, 0.22);
}
.footer-form-success__check svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.footer-form-success__title {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
  color: var(--pt-text);
}

.footer-form-success__body {
  font-family: var(--pt-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--pt-text-muted);
  margin: 0;
  max-width: 360px;
}

/* ── Alternative contact rows (below the form card) ─────────── */

.footer-contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 auto 28px;
  max-width: 720px;
}

.footer-contact-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #fff;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
  min-width: 0;
}

.footer-contact-row:hover,
.footer-contact-row:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.footer-contact-row__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.85);
}
.footer-contact-row__icon svg {
  width: 16px;
  height: 16px;
}
.footer-contact-row__icon--whatsapp {
  background: rgba(37, 211, 102, 0.18);
  color: #25D366;
}

.footer-contact-row__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.footer-contact-row__label {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer-contact-row__value {
  font-family: var(--pt-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── WhatsApp pill (standalone, bottom of section) ──────────── */

.footer-whatsapp {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.footer-whatsapp__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background: #25D366;
  color: #0B2A14;
  font-family: var(--pt-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.28);
}

.footer-whatsapp__btn:hover {
  background: #1FBC5A;
  color: #0B2A14;
  text-decoration: none;
}
.footer-whatsapp__btn:active { transform: translateY(1px); }
.footer-whatsapp__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5),
              0 0 0 6px rgba(37, 211, 102, 0.45);
}

.footer-whatsapp__icon {
  width: 16px;
  height: 16px;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .story-footer-cta {
    padding: 64px 18px 56px;
    min-height: 0;
  }
  .footer-cta__form-card {
    padding: 22px;
  }
  .footer-form__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .footer-form__footer {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-form__submit {
    width: 100%;
    min-width: 0;
  }
  .footer-contacts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-form__spinner { animation: none; }
}
