/*
 * SheepCat – Shared Design System
 * Glass-effect theme • WCAG AA accessible • Neurodivergent-friendly
 *
 * Contrast ratios (all measured against the dark gradient background ~#1e1b4b):
 *   --text  (#f1f5f9)  ≈ 15 : 1  ✓ AAA
 *   --muted (#94a3b8)  ≈  5 : 1  ✓ AA
 *   --primary (#818cf8) ≈ 4.6:1   ✓ AA (large text / UI)
 *   --green (#4ade80)  ≈  8 : 1  ✓ AAA
 */

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

/* ── Design tokens ── */
:root {
  --primary:       #818cf8;   /* indigo-400 */
  --primary-d:     #6366f1;   /* indigo-500 */
  --primary-glow:  rgba(99, 102, 241, 0.45);
  --accent:        #fb923c;   /* orange-400 */
  --green:         #4ade80;   /* green-400 */
  --green-bg:      rgba(74, 222, 128, 0.12);
  --green-bd:      rgba(74, 222, 128, 0.30);

  /* Background */
  --bg-start: #1e1b4b;
  --bg-mid:   #312e81;
  --bg-end:   #0f172a;

  /* Glass surfaces */
  --glass-bg:     rgba(255, 255, 255, 0.08);
  --glass-bg-hov: rgba(255, 255, 255, 0.13);
  --glass-bd:     rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);

  /* Typography */
  --text:   #f1f5f9;   /* slate-100 */
  --muted:  #94a3b8;   /* slate-400 */

  --border: rgba(255, 255, 255, 0.15);
}

/* ── Base ── */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Reduced-motion accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:      0.01ms !important;
  }
  body { background-attachment: scroll; }
}

/* ── Focus ring (keyboard navigation) ── */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Code ── */
code {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  color: #c7d2fe;
}

/* ═══════════════════════════════
   NAV
═══════════════════════════════ */
nav {
  background: rgba(15, 12, 41, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.85; }
.nav-logo img {
  width: 36px;
  height: 36px;
  /* gentle glow around the logo mark */
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.6));
}

.nav-cta {
  background: var(--primary);
  color: #ffffff;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.nav-cta:hover {
  background: var(--primary-d);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.nav-back { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav-back:hover { color: #ffffff; }

/* ═══════════════════════════════
   HERO  (index page)
═══════════════════════════════ */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4.5rem;
  position: relative;
}

.hero-logo-mark {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(129, 140, 248, 0.55));
  animation: gentle-float 4s ease-in-out infinite;
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-mark { animation: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(129, 140, 248, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.38);
  color: #c7d2fe;
  border-radius: 20px;
  padding: 0.3rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #ffffff;
}
.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2.25rem;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════
   BUTTONS
═══════════════════════════════ */
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  padding: 0.8rem 2rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--primary-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 0.8rem 2rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  display: inline-block;
  transition: background 0.2s, border-color 0.2s;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-white {
  background: #ffffff;
  color: #4f46e5;
  padding: 0.85rem 2.25rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-white:hover { opacity: 0.92; transform: translateY(-1px); }

/* ═══════════════════════════════
   SECTION WRAPPER
═══════════════════════════════ */
.section { padding: 4.5rem 1.5rem; }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-title { font-size: 1.9rem; font-weight: 800; text-align: center; margin-bottom: 0.5rem; color: #ffffff; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 2.75rem; font-size: 1.05rem; }

.alt-bg { background: rgba(0, 0, 0, 0.18); }

/* ═══════════════════════════════
   FEATURE GRID
═══════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-bd);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
}
.feature-card:hover {
  background: var(--glass-bg-hov);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(129, 140, 248, 0.22);
  transform: translateY(-3px);
}
.feature-icon { font-size: 2.1rem; margin-bottom: 0.85rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; color: #ffffff; }
.feature-card p { color: var(--muted); font-size: 0.95rem; }

/* ═══════════════════════════════
   HOW IT WORKS – STEPS
═══════════════════════════════ */
.steps { display: flex; flex-direction: column; gap: 1.25rem; max-width: 680px; margin: 0 auto; }
.step  { display: flex; gap: 1.25rem; align-items: flex-start; }

.step-num {
  min-width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  box-shadow: 0 0 18px var(--primary-glow);
}

.step-body h4 { font-weight: 700; margin-bottom: 0.25rem; color: #ffffff; }
.step-body p  { color: var(--muted); font-size: 0.95rem; }

/* ═══════════════════════════════
   WHO IT'S FOR
═══════════════════════════════ */
.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  text-align: center;
}
.who-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-bd);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.who-card:hover {
  background: var(--glass-bg-hov);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.who-card .icon { font-size: 2rem; margin-bottom: 0.6rem; }
.who-card h4    { font-weight: 700; margin-bottom: 0.3rem; color: #ffffff; }
.who-card p     { color: var(--muted); font-size: 0.88rem; }

/* ═══════════════════════════════
   LICENCE BAND
═══════════════════════════════ */
.licence-band {
  background: rgba(255, 255, 255, 0.04);
  border-top:    1px solid var(--glass-bd);
  border-bottom: 1px solid var(--glass-bd);
  padding: 3.5rem 1.5rem;
}
.licence-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 640px) { .licence-inner { grid-template-columns: 1fr; gap: 1.5rem; } }

.licence-inner h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 0.75rem; color: #ffffff; }
.licence-inner p  { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.75rem; }
.licence-inner strong, .licence-inner em { color: var(--text); }
.licence-inner em { font-style: italic; }

.licence-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.licence-table th {
  text-align: left;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  background: rgba(129, 140, 248, 0.18);
  color: #ffffff;
}
.licence-table td {
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--border);
  vertical-align: top;
  color: var(--muted);
}
.licence-table td:first-child { font-weight: 600; color: var(--text); width: 50%; }
.tick  { color: var(--green); font-weight: 700; }
.cross { color: #f87171;      font-weight: 700; }

/* ═══════════════════════════════
   CTA BAND
═══════════════════════════════ */
.cta-band {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.65) 0%, rgba(79, 70, 229, 0.65) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top:    1px solid rgba(129, 140, 248, 0.3);
  border-bottom: 1px solid rgba(129, 140, 248, 0.3);
  text-align: center;
  padding: 4rem 1.5rem;
}
.cta-band h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; color: #ffffff; }
.cta-band p  { font-size: 1.05rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 2rem; }

.pricing-preview {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.price-pill {
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-radius: 14px;
  padding: 1rem 1.75rem;
  text-align: center;
  min-width: 180px;
}
.price-pill .price { font-size: 1.75rem; font-weight: 800; color: #ffffff; }
.price-pill .label { font-size: 0.85rem; color: rgba(255, 255, 255, 0.80); }

/* ═══════════════════════════════
   FOOTER
═══════════════════════════════ */
footer {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-bd);
  color: var(--muted);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.875rem;
}
footer a { color: #c4cdea; text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #ffffff; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }

/* ═══════════════════════════════
   PAYMENT PAGE
═══════════════════════════════ */
.page-hero { text-align: center; padding: 3.5rem 1.5rem 2rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 0.6rem; color: #ffffff; }
.page-hero p  { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

.pricing-section { max-width: 860px; margin: 0 auto; padding: 0 1.5rem 3rem; }

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.plan-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid var(--glass-bd);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.plan-card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  border-color: var(--primary);
  transform: translateY(-3px);
}
.plan-card.popular {
  border-color: var(--primary);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.plan-name  { font-size: 0.85rem; font-weight: 700; color: var(--primary); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 0.5rem; }
.plan-price { font-size: 2.6rem;  font-weight: 800; margin-bottom: 0.2rem; color: #ffffff; }
.plan-price span { font-size: 1.1rem; font-weight: 500; color: var(--muted); }
.plan-desc  { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.5rem; }

.plan-features { list-style: none; margin-bottom: 2rem; flex: 1; }
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.93rem;
  margin-bottom: 0.65rem;
  color: var(--text);
}
.plan-features li::before { content: "✓"; color: var(--green); font-weight: 700; min-width: 1rem; }

.btn-pay {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: #ffffff;
  padding: 0.9rem 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-pay:hover {
  background: var(--primary-d);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-pay.outline {
  background: rgba(129, 140, 248, 0.1);
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-pay.outline:hover { background: rgba(129, 140, 248, 0.2); }

.included-section {
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid var(--glass-bd);
  padding: 3rem 1.5rem;
}
.included-inner { max-width: 860px; margin: 0 auto; }
.included-inner h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; text-align: center; color: #ffffff; }

.included-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.included-item { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.92rem; }
.included-item .icon { font-size: 1.4rem; min-width: 1.4rem; }
.included-item p      { color: var(--muted); }
.included-item strong { display: block; font-weight: 700; color: var(--text); margin-bottom: 0.1rem; }

.faq-section { padding: 3rem 1.5rem; max-width: 720px; margin: 0 auto; }
.faq-section h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; text-align: center; color: #ffffff; }
.faq-item { border-bottom: 1px solid var(--glass-bd); padding: 1rem 0; }
.faq-item h4 { font-weight: 700; margin-bottom: 0.4rem; color: var(--text); }
.faq-item p  { color: var(--muted); font-size: 0.93rem; }
.faq-item a  { color: var(--primary); text-decoration: none; }
.faq-item a:hover { text-decoration: underline; }
.faq-item strong, .faq-item em { color: var(--text); }
.faq-item em { font-style: italic; }

.secure-notice { text-align: center; padding: 1.5rem; color: var(--muted); font-size: 0.88rem; }
.secure-notice span { margin: 0 0.4rem; }

/* ═══════════════════════════════
   SUCCESS PAGE
═══════════════════════════════ */
body.success-page {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.success-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-bd);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.45);
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--green-bg);
  border: 2px solid var(--green-bd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}

.success-card h1       { font-size: 1.9rem; font-weight: 800; margin-bottom: 0.6rem; color: #ffffff; }
.success-card .subtitle { color: var(--muted); font-size: 1rem; margin-bottom: 2rem; }

.next-steps {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-bd);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  text-align: left;
  margin-bottom: 2rem;
}
.next-steps h3 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 1.1rem;
}

.step-list { list-style: none; }
.step-list li { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 0.85rem; font-size: 0.93rem; }
.step-list li:last-child { margin-bottom: 0; }

.step-text strong { display: block; font-weight: 700; margin-bottom: 0.1rem; color: var(--text); }
.step-text p { color: var(--muted); }

.licence-ref {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
}
.licence-ref h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 0.6rem;
}
.licence-ref p { color: var(--text); font-size: 0.92rem; }
.licence-ref a { color: var(--green); font-weight: 600; text-decoration: none; }
.licence-ref a:hover { text-decoration: underline; }

.action-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.action-buttons .btn-primary { flex: 1; min-width: 140px; }
.action-buttons .btn-outline  { flex: 1; min-width: 140px; text-align: center; }

.reassurance { margin-top: 1.75rem; color: var(--muted); font-size: 0.85rem; }
.reassurance a { color: var(--primary); text-decoration: none; }
.reassurance a:hover { text-decoration: underline; }

/* ═══════════════════════════════
   CONFETTI (success page)
═══════════════════════════════ */
@keyframes fall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
  100% { transform: translateY(100vh)  rotate(720deg); opacity: 0; }
}
.confetti-wrapper {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
  overflow: hidden;
  height: 100vh;
  z-index: 999;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: fall linear forwards;
}
