/* ========== LANDING PAGE ========== */
.landing-page {
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  overflow-x: hidden;
}

/* Diagonal stripe pattern behind landing */
.landing-page::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 60px,
    rgba(204, 255, 0, 0.012) 60px,
    rgba(204, 255, 0, 0.012) 62px
  );
  pointer-events: none;
  z-index: 0;
}

.landing-page > * { position: relative; z-index: 1; }

/* Landing Nav */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.landing-nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.landing-nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.landing-nav-title {

  font-size: 1.5rem;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* Hero */
.landing-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 700px) {
  .landing-hero {
    grid-template-columns: 1.2fr 1fr;
    padding: 80px var(--space-lg) 60px;
  }
}

.landing-hero-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.06em;
  color: var(--lime);
  background: var(--lime-subtle);
  border: 1px solid var(--lime-border);
  border-radius: 8px;
  padding: 4px 12px;
  margin-bottom: var(--space-lg);
}

.landing-hero-title {

  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.landing-hero-accent {
  color: var(--lime);
  text-shadow: 0 0 80px rgba(204, 255, 0, 0.2);
}

.landing-hero-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--space-xl);
}

.landing-hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Phone Mockup */
.landing-phone-mockup {
  width: 260px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(204, 255, 0, 0.04);
  position: relative;
}

.landing-phone-mockup::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
}

.mockup-screen {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mockup-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mockup-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mockup-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: var(--lime);
  opacity: 0.5;
}

.mockup-stat-val {
  display: block;

  font-size: 1.375rem;
  color: var(--text-primary);
  line-height: 1;
}

.mockup-stat-lbl {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: none;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

.mockup-workout {
  background: var(--bg-secondary);
  border: 1px solid var(--lime-border);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.mockup-workout::after {
  content: '';
  position: absolute;
  right: -10px; top: -10px;
  width: 50px; height: 50px;
  background: repeating-linear-gradient(-45deg, var(--lime-subtle), var(--lime-subtle) 3px, transparent 3px, transparent 9px);
  opacity: 0.5;
  border-radius: 8px;
}

.mockup-workout-label {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.mockup-workout-name {

  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-bottom: 10px;
}

.mockup-btn {
  background: var(--lime);
  color: #000;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  position: relative;
  z-index: 2;
}

.mockup-week {
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.mockup-day {
  flex: 1;
  text-align: center;

  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 6px 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-tertiary);
}

.mockup-day.done {
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.mockup-day.active {
  border-color: var(--lime-border);
  background: var(--lime-subtle);
  color: var(--lime);
}

/* Features */
.landing-features {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  border-top: 1px solid var(--border-primary);
}

.landing-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 600px) {
  .landing-features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.landing-feature {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.landing-feature:hover {
  border-color: var(--lime-border);
}

.landing-feature-icon {
  color: var(--lime);
  margin-bottom: var(--space-md);
}

.landing-feature h3 {

  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-bottom: var(--space-xs);
}

.landing-feature p {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* How it works */
.landing-how {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.landing-section-title {

  font-size: 2rem;
  letter-spacing: 0.04em;
  text-transform: none;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.landing-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 600px) {
  .landing-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.landing-step {
  text-align: center;
}

.landing-step-num {

  font-size: 3rem;
  color: var(--lime);
  line-height: 1;
  margin-bottom: var(--space-sm);
  text-shadow: 0 0 40px rgba(204, 255, 0, 0.15);
}

.landing-step h4 {

  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-bottom: var(--space-xs);
}

.landing-step p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA */
.landing-cta {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  border-top: 1px solid var(--border-primary);
}

.landing-cta h2 {

  font-size: 2.25rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--lime);
  margin-bottom: var(--space-sm);
}

.landing-cta p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.landing-cta .landing-hero-actions {
  justify-content: center;
}

/* Footer */
.landing-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.landing-footer-brand {

  font-size: 1.125rem;
  color: var(--text-tertiary);
  text-transform: none;
  letter-spacing: 0.08em;
}

.landing-footer-copy {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ========== NATIVE AUTH SCREEN (iOS) ========== */
#nativeAuthScreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000000;
  z-index: 50;
  animation: authScreenIn 0.6s ease-out;
}

@keyframes authScreenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes authLogoIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes authActionsIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.native-auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: var(--space-xl);
  padding-top: calc(var(--space-xl) + env(safe-area-inset-top, 0px));
}

.native-auth-logo-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  animation: authLogoIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.native-auth-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin-bottom: var(--space-md);
  box-shadow: 0 0 60px rgba(204, 255, 0, 0.15), 0 0 120px rgba(204, 255, 0, 0.05);
}

.native-auth-title {

  font-size: 3.5rem;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.native-auth-tagline {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  text-align: center;
  line-height: 1.4;
}

.native-auth-actions {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
  animation: authActionsIn 0.6s ease-out 0.3s both;
}

.native-auth-terms {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ========== AUTH (modal-based) ========== */
.auth-form h2 {

  font-size: 1.75rem;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  text-transform: none;
}

.auth-switch {
  text-align: center;
  margin-top: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-switch a {
  color: var(--lime);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--lime-border);
  transition: border-color 0.2s;
}

.auth-switch a:hover {
  border-color: var(--lime);
}

.coach-invite-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: radial-gradient(circle at top, rgba(204, 255, 0, 0.08), transparent 60%), var(--bg-primary);
}

.coach-invite-banner {
  width: 100%;
  max-width: 440px;
  height: 120px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(135deg, rgba(204, 255, 0, 0.22), rgba(204, 255, 0, 0.05));
  background-size: cover;
  background-position: center;
  margin-bottom: -60px;
}

.coach-invite-card {
  width: 100%;
  max-width: 440px;
  padding: var(--space-lg);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.coach-invite-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  background-size: cover;
  background-position: center;
  border: 3px solid var(--bg-primary);
  margin-top: -56px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--lime);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.coach-invite-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0;
}

.coach-invite-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 4px 0 var(--space-xs);
  color: var(--text-primary);
}

.coach-invite-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}

.coach-invite-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.coach-invite-bio {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 var(--space-md);
  font-size: 0.95rem;
}

.coach-invite-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.coach-invite-chip {
  background: var(--lime-subtle);
  border: 1px solid var(--lime-border);
  color: var(--lime);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.coach-invite-rate {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.coach-invite-rate span {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
}

.coach-invite-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
}

.coach-invite-footnote {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: var(--space-md) 0 0;
}

.signup-coach-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: var(--space-md);
  background: rgba(190, 242, 100, 0.08);
  border: 1px solid rgba(190, 242, 100, 0.25);
  border-radius: 12px;
}

.signup-coach-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.signup-coach-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.signup-coach-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signup-coach-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
  color: var(--danger);
  font-size: 0.875rem;
}

/* Informational, not a failure. "We sent you an email" in a red box reads as
   an error to the user even when the words say otherwise. */
.notice-msg {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
  color: var(--text-secondary);
  font-size: var(--fs-md);
}

/* Default-hidden in CSS rather than an inline style; JS sets display:block to
   reveal, matching how #authError is toggled. */
#authNotice,
#verifyEmailCoachNote { display: none; }

/* ========== FORMS ========== */
.form-group {
  margin-bottom: var(--space-md);
}

#assignDatesContainer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 10px;
  color: var(--text-primary);

  font-size: 17px;
  outline: none;
  transition: box-shadow 0.15s;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 2px rgba(204, 255, 0, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-tertiary);
}

textarea { resize: vertical; }


/* ==================== COACH LANDING + APPLICATION ==================== */

.landing-nav-tag {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
  padding-left: 2px;
}

/* The footer link is deliberately the only route to /coach from the client
   page — quiet, but findable by a coach who is looking for it. */
.landing-footer-link {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  text-decoration: none;
  border-bottom: 1px solid var(--border-primary);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.landing-footer-link:hover {
  color: var(--lime);
  border-bottom-color: var(--lime-border);
}

.coach-apply {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  /* Fixed height with the body as the only scroller: the step header and the
     Back/Continue pair must stay put while the questions scroll under them,
     or a long step pushes the buttons off a phone screen entirely. */
  max-height: min(88vh, 760px);
}

.coach-apply .modal-header { flex-shrink: 0; align-items: flex-start; }

.coach-apply-step {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.coach-apply-progress {
  flex-shrink: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  overflow: hidden;
  margin-bottom: var(--space-md);
}
.coach-apply-progress-bar {
  height: 100%;
  width: 20%;
  background: var(--lime);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.coach-apply-body {
  flex: 1;
  /* min-height:0 is required — a flex item won't shrink below its content
     size without it, which would defeat the whole fixed-height layout. */
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ca-subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  margin-bottom: var(--space-md);
}

.ca-hint {
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  margin-top: calc(var(--space-xs) * -1);
  margin-bottom: var(--space-sm);
}

.coach-apply-actions {
  flex-shrink: 0;
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.coach-apply-actions .btn-outline { flex: 0 0 auto; }
.coach-apply-actions .btn-primary { flex: 1; }

/* ---- Chips (multi-select) ---- */
.ca-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.ca-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: var(--fs-md);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ca-chip:hover { border-color: var(--lime-border); color: var(--text-primary); }
.ca-chip.selected {
  background: var(--lime-tint);
  border-color: var(--lime);
  color: var(--lime);
}

/* ---- Options (single-select) ---- */
.ca-options { display: flex; flex-direction: column; gap: 6px; }
.ca-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: var(--fs-base);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ca-option:hover { border-color: var(--lime-border); color: var(--text-primary); }
.ca-option.selected {
  background: var(--lime-tint-soft);
  border-color: var(--lime);
  color: var(--text-primary);
}
.ca-option-dot {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ca-option.selected .ca-option-dot {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 3px var(--lime);
}

/* ---- Review block on the final step ---- */
.ca-review {
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}
.ca-review-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 6px 0;
  font-size: var(--fs-md);
}
.ca-review-row span { color: var(--text-tertiary); flex-shrink: 0; }
.ca-review-row strong { color: var(--text-primary); font-weight: 500; text-align: right; }

/* Initial-state hiding for screens JS later shows by setting an inline
   display. Inline styles win over this, so the toggle still works — it just
   keeps `style="display:none"` out of the markup.

   The compound selectors are load-bearing, not belt-and-braces: `.modal` sets
   `display:flex` in modals-nav.css, which loads AFTER this file, so a bare
   `.is-hidden` loses the tie on source order and the coach wizard painted over
   the landing page on every visit. Two classes (0,2,0) beat one (0,1,0)
   regardless of order — and both still lose to an inline style, which is what
   makes showing the modal work at all. Do NOT reach for !important here: that
   would win over the inline display too, and nothing could ever open. */
.is-hidden { display: none; }
.modal.is-hidden,
.landing-page.is-hidden { display: none; }

.ca-followup.is-hidden { display: none; }

.ca-note {
  text-align: center;
  margin-top: var(--space-xs);
}
