/* style.css — static styles for the funnel starter.
   Token values come from tokens.css. Do not hard-code colors / fonts here. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  margin-top: 0;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout helpers ---------- */

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.page-wrap main { flex: 1; }

.section-tight  { padding: 1rem 0; }
.section-normal { padding: 2rem 0; }
.section-wide   { padding: 3rem 0; }

/* ---------- Urgency banner ---------- */

.urgency-banner {
  background: var(--color-warning);
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 1010;
}

.urgency-banner .countdown { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */

.site-header {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 0;
}

.site-header .logo img { height: 32px; width: auto; display: block; }
.site-header .logo .brand-name { font-weight: 700; font-size: 1.15rem; }

.site-header .ssl-badge {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- Step indicator (2-page only) ---------- */

.step-indicator {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.step-indicator .active { color: var(--color-text); font-weight: 600; }

/* ---------- Forms ---------- */

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-control,
.form-select {
  font-size: 16px;           /* iOS no-zoom floor */
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.form-control.is-invalid { border-color: var(--color-error); }
.invalid-feedback { color: var(--color-error); font-size: 0.85rem; margin-top: 0.25rem; }

/* ---------- Buttons ---------- */

.btn {
  font-weight: 600;
  border-radius: var(--radius-button);
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: filter 0.1s ease-in-out;
}

.btn-cta {
  background: var(--color-primary);
  color: var(--color-primary-text);
  width: 100%;
  font-size: 1.05rem;
  padding: 1.1rem 1.2rem;
  letter-spacing: 0.02em;
}
.btn-cta:hover { filter: brightness(0.92); color: var(--color-primary-text); }
.btn-cta:active { filter: brightness(0.85); }

.btn-secondary-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-link-muted {
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 500;
  text-decoration: underline;
}

/* ---------- Express checkout block ---------- */

.express-row { display: grid; gap: 0.5rem; }
.express-btn {
  height: 48px;
  border-radius: var(--radius-button);
  border: 1px solid var(--color-border);
  background: #000;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}
.express-btn.apple { background: #000; color: #fff; }
.express-btn.google { background: #fff; color: #1f1f1f; }

.divider-or {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 1.25rem 0;
  position: relative;
}
.divider-or::before, .divider-or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 2.5rem);
  height: 1px;
  background: var(--color-border);
}
.divider-or::before { left: 0; }
.divider-or::after  { right: 0; }

/* ---------- Numbered section headings (GlamTrend-style) ---------- */

.checkout-step-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 1rem 0;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-primary-text, #fff);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.checkout-substep-heading {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 0.6rem 0;
}

.trust-heading,
.order-summary-heading {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Order summary ---------- */

.order-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.order-summary h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.order-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.order-line:last-of-type { border-bottom: none; }
.order-line img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}
.order-line .name { font-weight: 500; font-size: 0.95rem; }
.order-line .qty  { color: var(--color-text-muted); font-size: 0.85rem; }
.order-line .price { font-weight: 600; }

.order-totals { margin-top: 1rem; }
.order-totals .row-line {
  display: flex; justify-content: space-between;
  font-size: 0.95rem; padding: 0.25rem 0;
}
.order-totals .row-line.muted { color: var(--color-text-muted); }
.order-totals .total-line {
  font-size: 1.15rem; font-weight: 700;
  padding-top: 0.6rem; margin-top: 0.4rem;
  border-top: 1px solid var(--color-border);
}

/* Mobile: collapsible summary at top */
@media (max-width: 767px) {
  .order-summary.mobile-collapse details summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
  }
  .order-summary.mobile-collapse details summary::after {
    content: "▾";
    transition: transform 0.15s;
  }
  .order-summary.mobile-collapse details[open] summary::after { transform: rotate(180deg); }
  .order-summary.mobile-collapse details[open] .summary-body { margin-top: 0.85rem; }
  .order-summary.mobile-collapse .summary-body { display: none; }
  .order-summary.mobile-collapse details[open] .summary-body { display: block; }
}

/* Desktop: sticky right rail */
@media (min-width: 768px) {
  .order-summary.desktop-sticky { position: sticky; top: 1rem; }
}

/* ---------- Coupon field ---------- */

.coupon-field {
  margin-top: 1rem;
  font-size: 0.9rem;
}
.coupon-field .toggle {
  display: inline-block;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 500;
}
.coupon-field .toggle::after { content: " ▾"; color: var(--color-text-muted); }
.coupon-field details[open] .toggle::after { content: " ▴"; }
.coupon-field .input-group { display: flex; gap: 0.5rem; margin-top: 0.65rem; }
.coupon-field input { flex: 1; }
.coupon-field button {
  border-radius: var(--radius-button);
  border: 1px solid var(--color-border);
  background: var(--color-text);
  color: #fff;
  padding: 0.7rem 1.1rem;
  font-weight: 600;
}
.coupon-field .feedback { margin-top: 0.4rem; font-size: 0.85rem; }
.coupon-field .feedback.ok    { color: var(--color-success); }
.coupon-field .feedback.error { color: var(--color-error); }

/* ---------- Trust block ---------- */

.trust-block {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.trust-block h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.trust-block ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: grid;
  gap: 0.4rem;
}
.trust-block ul li::before {
  content: "✓ ";
  color: var(--color-success);
  font-weight: 700;
  margin-right: 0.35rem;
}

.trust-block .payment-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0;
}
.trust-block .payment-logos img { height: 22px; }
.trust-block .ssl-line { font-size: 0.85rem; color: var(--color-text-muted); }

/* ---------- Reviews block ---------- */

.reviews-block {
  margin-top: 2rem;
}
.reviews-block .stars { color: #ffb400; letter-spacing: 0.1em; }
.reviews-block .aggregate {
  display: flex; align-items: baseline; gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.reviews-block .aggregate .count { color: var(--color-text-muted); }
.reviews-block .review {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}
.reviews-block .review:last-of-type { border-bottom: none; }
.reviews-block .review .quote {
  font-style: italic;
  margin: 0.4rem 0;
}
.reviews-block .review .author {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ---------- Upsell / downsell page ---------- */

.oto-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.oto-page .reassurance-bar {
  background: var(--color-success);
  color: #fff;
  text-align: center;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-card);
  margin-bottom: 1.5rem;
}
.oto-page .oto-image {
  width: 100%;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.oto-page h1 {
  font-size: 1.85rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}
.oto-page .lede {
  text-align: center;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.oto-page ul.benefits {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.5rem 0;
}
.oto-page ul.benefits li {
  padding-left: 1.5rem;
  position: relative;
}
.oto-page ul.benefits li::before {
  content: "✓";
  color: var(--color-success);
  font-weight: 700;
  position: absolute;
  left: 0;
  top: 0;
}
.oto-page .price-callout {
  text-align: center;
  margin: 1.5rem 0;
}
.oto-page .price-callout .was {
  text-decoration: line-through;
  color: var(--color-text-muted);
  margin-right: 0.6rem;
}
.oto-page .price-callout .now {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
}
.oto-page .yes-button { margin-top: 1rem; }
.oto-page .no-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Thank-you ---------- */

.thank-you-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  text-align: center;
}
.thank-you-page .checkmark {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.25rem;
  margin-bottom: 1rem;
}
.thank-you-page h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.thank-you-page .order-id {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.thank-you-page .next-steps {
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-top: 2rem;
}
.thank-you-page .next-steps ol {
  margin: 0;
  padding-left: 1.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}
.site-footer a { color: var(--color-text-muted); }
