/* Just 90 Days — Main Stylesheet */
/* Brand: Deep charcoal + Electric orange + Clean white */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Syne:wght@700;800&display=swap');

:root {
  --orange:     #FF5A1F;
  --orange-dk:  #D94400;
  --orange-lt:  #FFF0EB;
  --charcoal:   #1A1A1A;
  --charcoal-2: #2D2D2D;
  --charcoal-3: #3F3F3F;
  --gray:       #6B7280;
  --gray-lt:    #F3F4F6;
  --gray-bd:    #E5E7EB;
  --white:      #FFFFFF;
  --green:      #10B981;
  --green-lt:   #ECFDF5;
  --red:        #EF4444;
  --red-lt:     #FEF2F2;
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.14);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gray-lt);
  color: var(--charcoal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ─────────────────────────── */
h1, h2, h3 { font-family: 'Syne', sans-serif; font-weight: 800; line-height: 1.1; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { line-height: 1.7; color: var(--gray); }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dk); }

/* ── Layout ─────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Navbar ─────────────────────────────── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-bd);
  padding: .875rem 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
}
.navbar__brand {
  display: flex; align-items: center; gap: .75rem;
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1.1rem; color: var(--charcoal);
}
.navbar__brand img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--orange);
}
.navbar__brand span.accent { color: var(--orange); }
.navbar__cta {
  background: var(--orange); color: var(--white); border: none;
  padding: .5rem 1.25rem; border-radius: 999px;
  font-weight: 600; font-size: .875rem; cursor: pointer;
  transition: background .15s;
}
.navbar__cta:hover { background: var(--orange-dk); }

/* ── Hero ────────────────────────────────── */
.hero {
  background: var(--charcoal);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(255,90,31,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero__grid {
  display: grid; grid-template-columns: 1fr 420px; gap: 3rem; align-items: center;
}
.hero__badge {
  display: inline-block;
  background: rgba(255,90,31,.2); color: #FFAA88;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .375rem .875rem; border-radius: 999px;
  border: 1px solid rgba(255,90,31,.3);
  margin-bottom: 1.25rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero__sub { font-size: 1.1rem; color: rgba(255,255,255,.7); margin-bottom: 2rem; max-width: 480px; }
.hero__stats {
  display: flex; gap: 2.5rem; margin-bottom: 2.5rem;
}
.hero__stat-num {
  font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800;
  color: var(--orange); display: block;
}
.hero__stat-lbl { font-size: .8rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .05em; }
.hero__actions { display: flex; gap: 1rem; align-items: center; }
.btn-primary {
  background: var(--orange); color: var(--white); border: none;
  padding: .875rem 2rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: .5rem;
}
.btn-primary:hover { background: var(--orange-dk); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(255,90,31,.4); }
.btn-ghost {
  background: transparent; color: rgba(255,255,255,.7); border: 1.5px solid rgba(255,255,255,.25);
  padding: .875rem 1.75rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.6); color: var(--white); }

/* Trainer card in hero */
.trainer-card {
  background: var(--charcoal-2);
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.trainer-card img { width: 100%; display: block; }
.trainer-card__info { padding: 1.25rem 1.5rem; }
.trainer-card__name { font-family: 'Syne', sans-serif; font-size: 1.2rem; color: var(--white); font-weight: 800; }
.trainer-card__title { font-size: .875rem; color: rgba(255,255,255,.5); margin-top: .25rem; }
.trainer-card__badges { display: flex; gap: .5rem; margin-top: .875rem; flex-wrap: wrap; }
.badge {
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: .25rem .625rem; border-radius: 999px;
  background: rgba(255,90,31,.15); color: #FFAA88; border: 1px solid rgba(255,90,31,.25);
}

/* ── Chat Section ────────────────────────── */
.chat-section { padding: 3rem 0 6rem; }
.chat-wrapper {
  display: grid; grid-template-columns: 320px 1fr; gap: 2rem; align-items: start;
}
.chat-sidebar {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-bd); overflow: hidden;
  position: sticky; top: 80px;
}
.sidebar-header {
  background: var(--charcoal); padding: 1.5rem;
  display: flex; align-items: center; gap: .875rem;
}
.sidebar-header img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--orange); object-fit: cover; }
.sidebar-header__name { font-weight: 700; color: var(--white); font-size: .95rem; }
.sidebar-header__status { font-size: .75rem; color: var(--green); display: flex; align-items: center; gap: .35rem; }
.sidebar-header__status::before { content: ''; width: 6px; height: 6px; background: var(--green); border-radius: 50%; display: block; }
.sidebar-steps { padding: 1.25rem; }
.sidebar-steps h4 { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); margin-bottom: 1rem; }
.step-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .625rem 0; border-bottom: 1px solid var(--gray-bd);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--gray-bd); color: var(--gray);
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-num.active { background: var(--orange); color: var(--white); }
.step-num.done { background: var(--green); color: var(--white); }
.step-lbl { font-size: .825rem; color: var(--charcoal); font-weight: 500; margin-top: .1rem; }
.step-sub { font-size: .725rem; color: var(--gray); margin-top: .1rem; }

/* Chat window */
.chat-window {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-bd); overflow: hidden;
  display: flex; flex-direction: column; height: 680px;
}
.chat-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-bd);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-header__title { font-weight: 700; font-size: .95rem; }
.chat-header__sub { font-size: .75rem; color: var(--gray); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--gray-bd); border-radius: 999px; }

/* Messages */
.msg {
  display: flex; gap: .75rem; max-width: 85%; animation: msgIn .2s ease;
}
.msg--ai { align-self: flex-start; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }

.msg__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 1.5px solid var(--orange);
}
.msg__avatar--user {
  background: var(--orange); color: var(--white); font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
}
.msg__bubble {
  padding: .75rem 1rem; border-radius: var(--radius-md);
  font-size: .9rem; line-height: 1.6;
}
.msg--ai .msg__bubble {
  background: var(--gray-lt); color: var(--charcoal);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
}
.msg--user .msg__bubble {
  background: var(--orange); color: var(--white);
  border-radius: var(--radius-md) 4px var(--radius-md) var(--radius-md);
}
.msg__bubble p { color: inherit; margin-bottom: .5rem; }
.msg__bubble p:last-child { margin-bottom: 0; }
.msg__bubble strong { font-weight: 600; }
.msg__bubble ul, .msg__bubble ol { padding-left: 1.25rem; }
.msg__bubble li { margin-bottom: .25rem; }

/* Typing indicator */
.typing { display: flex; align-items: center; gap: 4px; padding: .5rem 0; }
.typing span {
  width: 7px; height: 7px; background: var(--gray); border-radius: 50%;
  animation: bounce .9s infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }

/* Quick reply chips */
.quick-replies {
  padding: .75rem 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem;
  border-top: 1px solid var(--gray-bd);
}
.chip {
  background: var(--white); border: 1.5px solid var(--gray-bd);
  color: var(--charcoal); font-size: .8rem; font-weight: 500;
  padding: .375rem .875rem; border-radius: 999px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip--active { border-color: var(--orange); background: var(--orange-lt); color: var(--orange-dk); }

/* Chat input */
.chat-input-area {
  padding: 1rem 1.5rem; border-top: 1px solid var(--gray-bd);
  display: flex; gap: .75rem; align-items: flex-end;
}
.chat-input {
  flex: 1; border: 1.5px solid var(--gray-bd); border-radius: var(--radius-md);
  padding: .625rem 1rem; font-size: .9rem; resize: none;
  font-family: inherit; line-height: 1.5; max-height: 120px;
  transition: border-color .15s; background: var(--white); color: var(--charcoal);
}
.chat-input:focus { outline: none; border-color: var(--orange); }
.chat-input::placeholder { color: var(--gray); }
.send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange); color: var(--white); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.send-btn:hover { background: var(--orange-dk); transform: scale(1.05); }
.send-btn:disabled { background: var(--gray-bd); cursor: not-allowed; transform: none; }
.send-btn svg { width: 16px; height: 16px; }

/* ── Payment Modal ───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  max-width: 500px; width: 100%; padding: 2rem;
  transform: translateY(20px); transition: transform .2s;
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal__header { margin-bottom: 1.5rem; }
.modal__title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.5rem; }
.modal__sub { color: var(--gray); font-size: .9rem; margin-top: .375rem; }
.price-display {
  background: var(--orange-lt); border-radius: var(--radius-md);
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  display: flex; align-items: baseline; gap: .5rem;
}
.price-display .amount { font-family: 'Syne', sans-serif; font-size: 2.5rem; font-weight: 800; color: var(--orange); }
.price-display .period { font-size: .875rem; color: var(--gray); }
.includes-list { margin-bottom: 1.5rem; }
.includes-item { display: flex; gap: .625rem; align-items: flex-start; margin-bottom: .625rem; font-size: .875rem; }
.includes-item::before { content: '✓'; color: var(--green); font-weight: 700; margin-top: .1rem; }
#stripe-elements { margin-bottom: 1rem; }
#payment-element { border: 1.5px solid var(--gray-bd); border-radius: var(--radius-md); padding: .875rem 1rem; }
.pay-btn {
  width: 100%; padding: 1rem; background: var(--orange); color: var(--white);
  border: none; border-radius: var(--radius-md); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.pay-btn:hover { background: var(--orange-dk); }
.pay-btn:disabled { background: var(--gray); cursor: not-allowed; }
.secure-note { text-align: center; font-size: .75rem; color: var(--gray); margin-top: .875rem; }
#payment-error { color: var(--red); font-size: .875rem; margin-bottom: .75rem; display: none; }

/* ── Plans Page ──────────────────────────── */
.plans-page { padding: 3rem 0; }
.plans-tabs {
  display: flex; gap: .5rem; background: var(--white);
  border-radius: var(--radius-lg); padding: .375rem;
  border: 1px solid var(--gray-bd); width: fit-content;
  margin-bottom: 2rem; overflow-x: auto;
}
.tab-btn {
  padding: .625rem 1.25rem; border-radius: var(--radius-md);
  border: none; background: transparent; font-weight: 600; font-size: .875rem;
  cursor: pointer; color: var(--gray); white-space: nowrap;
  transition: all .15s;
}
.tab-btn.active { background: var(--orange); color: var(--white); }
.plan-content { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid var(--gray-bd); }
.plan-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.plan-content th { background: var(--charcoal); color: var(--white); padding: .625rem 1rem; text-align: left; font-size: .825rem; }
.plan-content td { padding: .625rem 1rem; border-bottom: 1px solid var(--gray-bd); font-size: .875rem; }
.plan-content tr:hover td { background: var(--gray-lt); }
.plan-content h2, .plan-content h3 { color: var(--charcoal); margin: 1.5rem 0 .75rem; font-family: 'Syne', sans-serif; }
.plan-content ul, .plan-content ol { padding-left: 1.5rem; color: var(--charcoal); }
.plan-content li { margin-bottom: .375rem; font-size: .9rem; }

/* Loading spinner */
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--gray-bd);
  border-top-color: var(--orange); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────── */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .trainer-card { max-width: 300px; margin: 0 auto; }
  .chat-wrapper { grid-template-columns: 1fr; }
  .chat-sidebar { position: static; }
  .chat-window { height: 560px; }
}
@media (max-width: 600px) {
  .hero { padding: 3rem 0; }
  .hero__stats { gap: 1.5rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
}
