/* ============================================
   iPhone 17 Pro Offer Funnel — Stylesheet
   Mobile-first, no frameworks
   ============================================ */

/* --- Corner Ribbon --- */
.ribbon {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 260px;
  overflow: hidden;
  z-index: 1001;
  pointer-events: none;
}

.ribbon span {
  display: block;
  position: absolute;
  top: 56px;
  left: -80px;
  width: 350px;
  padding: 10px 0;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.5;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.ribbon span strong {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  background: #f5f3fa;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: 36px; /* room for sticky progress bar */
}

a {
  color: #5b2d8e;
}

/* --- Progress Bar --- */
.progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: #2a1245;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7b3fe4, #c084fc, #f59e0b);
  background-size: 200% 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 4px 4px 0;
}

.progress-bar-text {
  position: absolute;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* --- Steps --- */
.step {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  min-height: calc(100vh - 36px);
}

.step.active {
  display: block;
}

.step.visible {
  opacity: 1;
  transform: translateY(0);
}

.step-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.step-content h2 {
  font-size: 1.6rem;
  color: #2a1245;
  margin-bottom: 8px;
  text-align: center;
}

.step-desc {
  text-align: center;
  color: #555;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* --- Hero (Step 1) --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 36px);
  padding: 40px 20px;
  background: linear-gradient(160deg, #2a1245 0%, #5b2d8e 50%, #7b3fe4 100%);
  color: #fff;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 440px;
  margin-bottom: 32px;
  opacity: 0.92;
  line-height: 1.5;
}

.hero .fine-print {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 0.75rem;
  opacity: 0.65;
}

.hero .fine-print a {
  color: #fcd34d;
}

/* Hero Image */
.hero-image {
  max-width: 220px;
  height: auto;
  margin-bottom: 28px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

/* Hero Email Form */
.hero-email-form {
  width: 100%;
  max-width: 400px;
}

.hero-email-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-family: inherit;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-email-input::placeholder {
  color: rgba(255,255,255,0.55);
}

.hero-email-input:focus {
  outline: none;
  border-color: #f59e0b;
  background: rgba(255,255,255,0.18);
}

.hero-email-input.invalid {
  border-color: #ef4444;
  background: rgba(239,68,68,0.15);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Buttons --- */
.btn-primary {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 24px auto 0;
  padding: 16px 32px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  text-transform: none;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit {
  background: linear-gradient(135deg, #5b2d8e, #7b3fe4);
  box-shadow: 0 4px 16px rgba(91, 45, 142, 0.35);
}

.btn-submit:hover {
  box-shadow: 0 6px 24px rgba(91, 45, 142, 0.5);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 18px;
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.form-group .optional {
  font-weight: 400;
  color: #888;
}

.form-group input:not([type="radio"]):not([type="checkbox"]),
.form-group select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #7b3fe4;
  box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.15);
}

.form-group input.invalid,
.form-group select.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-group-small {
  max-width: 200px;
}

.form-row {
  display: flex;
  gap: 14px;
}

.dob-row {
  display: flex;
  gap: 10px;
}

.dob-row select {
  flex: 1;
}

.gender-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  width: auto;
  accent-color: #7b3fe4;
}

/* --- Survey --- */
.survey-question {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.question-text {
  font-weight: 600;
  margin-bottom: 12px;
  color: #2a1245;
}

.survey-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.survey-question.invalid {
  border: 2px solid #ef4444;
}

/* --- Offer Cards --- */
.offer-tracker {
  text-align: center;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #ede9fe;
  border-radius: 8px;
  font-weight: 600;
  color: #5b2d8e;
}

.tracker-count {
  font-size: 0.95rem;
}

.offer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.offer-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  position: relative;
}

.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.offer-card.completed {
  border: 2px solid #22c55e;
  background: #f0fdf4;
}

.offer-card.completed .btn-offer {
  display: none;
}

.offer-card.completed .offer-check {
  display: block;
}

.offer-logo-placeholder {
  display: inline-block;
  background: linear-gradient(135deg, #5b2d8e, #7b3fe4);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 18px;
  border-radius: 6px;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.offer-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.offer-card p {
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.45;
}

.btn-offer {
  display: inline-block;
  padding: 10px 24px;
  background: #5b2d8e;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn-offer:hover {
  background: #7b3fe4;
  color: #fff;
}

.offer-check {
  color: #22c55e;
  font-weight: 700;
  font-size: 1rem;
}

.hidden {
  display: none !important;
}

/* --- Step 7: Summary & Consent --- */
.summary-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.summary-card h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: #2a1245;
}

.summary-card ul {
  list-style: none;
  padding: 0;
}

.summary-card li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.93rem;
}

.summary-card li:last-child {
  border-bottom: none;
}

.summary-card .check-icon {
  color: #22c55e;
  font-weight: 700;
  font-size: 1.1rem;
}

.consent-section {
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #333;
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  accent-color: #7b3fe4;
  flex-shrink: 0;
}

.tcpa-disclosure {
  font-size: 0.75rem;
  color: #888;
  margin-top: 12px;
  line-height: 1.5;
  padding-left: 28px;
}

/* --- Success --- */
.success-icon {
  width: 80px;
  height: 80px;
  background: #22c55e;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px auto 24px;
}

.success-text {
  text-align: center;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 12px;
}

.success-sub {
  text-align: center;
  font-size: 0.9rem;
  color: #888;
}

/* --- Footer --- */
footer {
  background: #2a1245;
  color: rgba(255,255,255,0.7);
  padding: 32px 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: #c084fc;
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-fine-print {
  font-size: 0.72rem;
  max-width: 560px;
  margin: 0 auto 12px;
  line-height: 1.5;
  opacity: 0.7;
}

.footer-fine-print a {
  color: #c084fc;
}

.footer-copy {
  font-size: 0.72rem;
  opacity: 0.5;
}

/* --- Tablet+ --- */
@media (min-width: 600px) {
  .offer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-sub {
    font-size: 1.2rem;
  }

  .hero-image {
    max-width: 280px;
  }
}

/* --- Desktop --- */
@media (min-width: 900px) {
  .step-content {
    max-width: 700px;
    padding: 48px 24px 64px;
  }

  .hero h1 {
    font-size: 3.2rem;
  }
}

/* --- Legal Pages --- */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.legal-page h1 {
  font-size: 1.8rem;
  color: #2a1245;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.2rem;
  color: #2a1245;
  margin-top: 28px;
  margin-bottom: 10px;
}

.legal-page p,
.legal-page li {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-page a {
  color: #5b2d8e;
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
