/* ============================================================
   COACHD DESIGN SYSTEM
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700;800&display=swap');
:root {
  /* Colours */
  --navy-950: #040C1A;
  --navy-900: #081322;
  --navy-800: #0D1E35;
  --navy-700: #132843;
  --navy-600: #1C3A5C;
  --navy-500: #264D78;
  --ice-100: #F0F6FF;
  --ice-200: #D6E4F7;
  --ice-400: #8BAFD4;
  --ice-600: #4A7BA8;
  --red-400: #FF4D5B;
  --red-500: #E63946;
  --red-600: #C8313D;
  --red-glow: rgba(230, 57, 70, 0.2);
  --gold-400: #F4A620;
  --gold-glow: rgba(244, 166, 32, 0.15);
  --blue-400: #4A90D9;
  --green-400: #3EBD6E;
  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
  --shadow-red: 0 4px 24px rgba(230,57,70,0.35);
  --shadow-red-lg: 0 8px 48px rgba(230,57,70,0.4);
}
/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background-color: var(--navy-950);
  color: var(--ice-100);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* ---- Noise texture overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
/* ---- Typography ---- */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.02em; line-height: 1.0; }
h1 { font-size: clamp(48px, 12vw, 80px); }
h2 { font-size: clamp(32px, 8vw, 52px); }
h3 { font-size: clamp(24px, 6vw, 36px); }
p { line-height: 1.65; }
a { color: inherit; text-decoration: none; }
.label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-400);
}
.text-muted { color: var(--ice-400); }
.text-red { color: var(--red-500); }
.text-gold { color: var(--gold-400); }
.text-green { color: var(--green-400); }
/* ---- Cards ---- */
.card {
  background: var(--navy-800);
  border: 1px solid var(--navy-600);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}
.card-elevated {
  background: var(--navy-700);
  border-color: var(--navy-500);
}
.card-glow {
  border-color: rgba(230, 57, 70, 0.3);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(230, 57, 70, 0.1), inset 0 0 40px rgba(230, 57, 70, 0.03);
}
/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  padding: 15px 28px;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  position: relative;
  z-index: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: var(--red-500);
  color: white;
  box-shadow: var(--shadow-red);
  width: 100%;
}
.btn-primary:hover, .btn-primary:active {
  background: var(--red-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-red-lg);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: transparent;
  color: var(--ice-100);
  border: 1px solid var(--navy-600);
}
.btn-secondary:hover { border-color: var(--navy-500); background: var(--navy-800); }
.btn-ghost { background: transparent; color: var(--ice-400); }
.btn-ghost:hover { color: var(--ice-100); }
.btn-lg { font-size: 18px; padding: 18px 32px; border-radius: var(--radius-lg); }
.btn-sm { font-size: 14px; padding: 10px 20px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }
/* ---- Form inputs ---- */
.input-group { display: flex; flex-direction: column; gap: var(--space-2); }
.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ice-200);
  letter-spacing: 0.01em;
}
input, select, textarea {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--navy-800);
  border: 1.5px solid var(--navy-600);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--ice-100);
  width: 100%;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--ice-600); }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}
input.error { border-color: var(--red-500); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238BAFD4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; cursor: pointer; }
/* ---- Highlight boxes ---- */
.highlight-red {
  background: rgba(230, 57, 70, 0.08);
  border-left: 3px solid var(--red-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
}
.highlight-gold {
  background: var(--gold-glow);
  border-left: 3px solid var(--gold-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
}
.highlight-blue {
  background: rgba(74, 144, 217, 0.08);
  border-left: 3px solid var(--blue-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
}
.highlight-green {
  background: rgba(62, 189, 110, 0.08);
  border-left: 3px solid var(--green-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
}
/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-red { background: rgba(230,57,70,0.15); color: var(--red-400); border: 1px solid rgba(230,57,70,0.25); }
.badge-gold { background: var(--gold-glow); color: var(--gold-400); border: 1px solid rgba(244,166,32,0.25); }
.badge-blue { background: rgba(74,144,217,0.1); color: var(--blue-400); border: 1px solid rgba(74,144,217,0.2); }
.badge-green { background: rgba(62,189,110,0.1); color: var(--green-400); border: 1px solid rgba(62,189,110,0.2); }
/* ---- Divider ---- */
.divider { height: 1px; background: var(--navy-700); margin: var(--space-5) 0; }
/* ---- Loading skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--navy-800) 25%, var(--navy-700) 50%, var(--navy-800) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
/* ---- Expandable ---- */
.expandable { cursor: pointer; user-select: none; }
.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.expandable-content.open { max-height: 600px; opacity: 1; }
.expand-arrow {
  transition: transform 0.3s ease;
  display: inline-block;
}
.expandable.open .expand-arrow { transform: rotate(180deg); }
/* ---- Chat bubbles ---- */
.chat-message { display: flex; gap: var(--space-3); margin-bottom: var(--space-4); }
.chat-message.user { flex-direction: row-reverse; }
.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.55;
}
.chat-bubble.ai {
  background: var(--navy-800);
  border: 1px solid var(--navy-600);
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  background: var(--red-500);
  color: white;
  border-bottom-right-radius: 4px;
}
/* ---- Typing indicator ---- */
.typing-dots { display: flex; gap: 4px; padding: 12px 16px; }
.typing-dot {
  width: 6px; height: 6px;
  background: var(--ice-400);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
/* ---- Progress bar ---- */
.progress-bar {
  height: 3px;
  background: var(--navy-700);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--red-500);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  box-shadow: 0 0 8px var(--red-glow);
}
/* ---- Tab bar ---- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(8, 19, 34, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--navy-700);
  height: 72px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--ice-600);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.tab-item.active { color: var(--red-500); }
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--red-500);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
  box-shadow: 0 0 8px var(--red-glow);
}
.tab-icon { font-size: 20px; line-height: 1; }
/* ---- Top bar ---- */
.top-bar {
  position: sticky;
  top: 0;
  background: rgba(8, 19, 34, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--navy-700);
  z-index: 50;
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
/* ---- Puck spinner (loading) ---- */
@keyframes puckSpin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
.puck-spinner {
  width: 48px;
  height: 48px;
  background: var(--navy-700);
  border: 3px solid var(--red-500);
  border-radius: 50%;
  animation: puckSpin 1s linear infinite;
  margin: 0 auto;
}
/* ---- Utility ---- */
.container { max-width: 480px; margin: 0 auto; padding: 0 var(--space-5); }
.section { padding: var(--space-10) 0; }
.stack { display: flex; flex-direction: column; }
.stack-2 { gap: var(--space-2); }
.stack-3 { gap: var(--space-3); }
.stack-4 { gap: var(--space-4); }
.stack-5 { gap: var(--space-5); }
.stack-6 { gap: var(--space-6); }
.stack-8 { gap: var(--space-8); }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 18px; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.safe-bottom { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
/* ---- Fade in animation ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.4s ease forwards; }
.fade-in-1 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; animation-name: fadeInUp; animation-duration: 0.4s; animation-timing-function: ease; }
.fade-in-2 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; animation-name: fadeInUp; animation-duration: 0.4s; animation-timing-function: ease; }
.fade-in-3 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; animation-name: fadeInUp; animation-duration: 0.4s; animation-timing-function: ease; }
.fade-in-4 { animation-delay: 0.4s; opacity: 0; animation-fill-mode: forwards; animation-name: fadeInUp; animation-duration: 0.4s; animation-timing-function: ease; }
/* ---- Shake animation for errors ---- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.shake { animation: shake 0.4s ease; }
/* ---- Checklist ---- */
.checklist { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.checklist li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: 15px; }
.check-icon { width: 20px; height: 20px; background: rgba(230,57,70,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.check-icon::after { content: '✓'; font-size: 11px; color: var(--red-400); font-weight: 800; }
/* ---- FAQ accordion ---- */
.faq-item { border-bottom: 1px solid var(--navy-700); }
.faq-question {
  padding: var(--space-5) 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  user-select: none;
}
.faq-answer { padding-bottom: var(--space-5); color: var(--ice-400); font-size: 14px; line-height: 1.65; display: none; }
.faq-answer.open { display: block; }
.faq-arrow { transition: transform 0.25s ease; color: var(--ice-400); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
/* ---- Trial banner ---- */
.trial-banner {
  background: linear-gradient(135deg, rgba(230,57,70,0.15), rgba(230,57,70,0.08));
  border-bottom: 1px solid rgba(230,57,70,0.2);
  padding: var(--space-3) var(--space-5);
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}
.trial-banner a { color: var(--red-400); font-weight: 700; }
