/* ─────────────────────────────────────────────────────────────
   Bible Empire Reputation Shield — v1 Styles
   Palette: deep navy #1a365d · gold #C9A84C · cream #FBF8F3
   Typography: Georgia (serif, bookish) + system sans for UI
   ───────────────────────────────────────────────────────────── */

:root {
  --navy:       #1a365d;
  --navy-deep:  #0f2040;
  --navy-mid:   #244b82;
  --gold:       #C9A84C;
  --gold-light: #E8C97A;
  --gold-dim:   #8a6e2f;
  --cream:      #FBF8F3;
  --white:      #ffffff;
  --ink:        #1c1c1e;
  --ink-soft:   #3a3a3c;
  --muted:      #8e8e93;
  --border:     #e5e0d8;
  --error:      #c0392b;
  --wa-green:   #25d366;
  --wa-dark:    #075e54;
  --wa-text:    #062e1c;
  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(26, 54, 93, 0.10);
  --shadow-lg:  0 8px 40px rgba(26, 54, 93, 0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
}

/* ── Page scaffold ──────────────────────────────────────────── */

.page-bg {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(201,168,76,.08) 0%, transparent 70%),
    var(--cream);
}

/* ── Brand header ───────────────────────────────────────────── */

.brand-header {
  background: var(--navy);
  padding: 1.5rem 1rem 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.brand-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 28px,
    rgba(201,168,76,.04) 28px,
    rgba(201,168,76,.04) 29px
  );
  pointer-events: none;
}

.brand-header__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.brand-header__logo {
  width: clamp(64px, 18vw, 96px);
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 4px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark__icon {
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1;
}

.brand-mark__name {
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-header__tagline {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* ── Main app area ──────────────────────────────────────────── */

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 1rem;
  width: 100%;
}

/* ── Card ───────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  animation: card-in 0.35s cubic-bezier(.22,1,.36,1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card--green { border-top: 4px solid #27ae60; }
.card--unhappy { border-top: 4px solid var(--gold); }

.step-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}

.card__heading {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.card__sub {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

/* ── Form fields ────────────────────────────────────────────── */

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field-wrap { display: flex; flex-direction: column; gap: 0.375rem; }

.field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.required { color: var(--error); margin-left: 2px; }

.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
  margin-left: 4px;
}

.field-input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  -webkit-appearance: none;
}

.field-input::placeholder { color: var(--muted); }

.field-input:focus {
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,54,93,0.12);
}

.field-input.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
}

.field-error {
  font-size: 0.8125rem;
  color: var(--error);
  background: rgba(192,57,43,0.07);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.875rem;
  font-weight: 500;
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 120ms ease, transform 100ms ease, box-shadow 120ms ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--navy);
  color: var(--white);
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}

.btn--primary:hover { opacity: 0.88; }

.btn--google {
  background: var(--navy);
  color: var(--white);
  font-size: 1.0625rem;
}

.btn--google:hover { background: var(--navy-mid); }

/* WhatsApp — primary action on unhappy screen */
.btn--whatsapp {
  background: var(--wa-green);
  color: var(--wa-text);
  font-size: 1.0625rem;
  letter-spacing: 0.005em;
}

.btn--whatsapp:hover { opacity: 0.92; }

/* Pulse glow for WhatsApp button */
.glow {
  animation: glow-pulse 1.8s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  50%       { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
}

/* Call — secondary action */
.btn--call {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  font-size: 0.9375rem;
}

.btn--call:hover { background: rgba(26,54,93,0.05); }

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.call-note {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 0.25rem;
}

/* Stealth Google link — intentionally hidden in plain sight */
.stealth-link {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.45;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 0.5rem;
  transition: opacity 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.stealth-link:hover { opacity: 0.65; }

/* ── Outcome icon ───────────────────────────────────────────── */

.outcome-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
  line-height: 1;
}

/* ── Stars ──────────────────────────────────────────────────── */

.stars-wrap {
  display: flex;
  justify-content: center;
  gap: 0.125rem;
  margin-bottom: 1rem;
}

.star {
  background: none;
  border: none;
  padding: 0.5rem 0.375rem;
  font-size: 2.75rem;
  line-height: 1;
  color: #d4cfc8;
  cursor: pointer;
  min-width: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 80ms ease, transform 80ms ease;
  -webkit-tap-highlight-color: transparent;
}

.star:focus-visible {
  outline: 2px solid var(--navy);
  border-radius: 4px;
}

.star:active { transform: scale(0.88); }

.star.lit,
.star.selected { color: var(--gold); }

.star.selected { transform: scale(1.08); }

.stars-hint {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ── Green path extras ──────────────────────────────────────── */

.redirect-note {
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.25rem;
}

/* ── Outcome card inner spacing ─────────────────────────────── */

#outcome-green .card__sub,
#outcome-unhappy .card__sub {
  margin-bottom: 1.5rem;
}

#outcome-unhappy .btn--whatsapp { margin-bottom: 0.75rem; }
#outcome-unhappy .btn--call     { margin-bottom: 0.5rem; }

/* ── Footer ─────────────────────────────────────────────────── */

.page-footer {
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
}

.page-footer p {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (min-width: 480px) {
  .brand-mark__name { font-size: 1.75rem; }
  .card { padding: 2.5rem 2rem; }
  .card__heading { font-size: 1.75rem; }
  .star { font-size: 3.25rem; }
  #app { padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .glow { animation: none; }
  .field-input.invalid { animation: none; }
}
