/* ============================================
   Sweat-to Landing Website — Stylesheet
   Colors & design tokens from app_theme.dart
   ============================================ */

/* ── 1. CSS Custom Properties ── */
:root {
  --primary: #3a7bd5;
  --primary-dark: #2752a8;
  --primary-light: #e8f0fb;
  --accent: #2e9e6b;
  --accent-light: #e6f7f0;
  --orange: #e07b3a;
  --orange-light: #fdf0e8;
  --red: #d94f4f;
  --purple: #7b5ea7;
  --purple-light: #f0ecf5;

  --bg: #f0f4fa;
  --surface: #ffffff;
  --surface2: #f7f9fc;
  --border: #dde3ec;
  --text: #1e2d3d;
  --text-secondary: #4a5568;
  --text-muted: #8896a8;

  --gradient-hero: linear-gradient(135deg, #3a7bd5 0%, #2e9e6b 100%);
  --gradient-cta: linear-gradient(135deg, #1e2d3d 0%, #2752a8 100%);

  --radius: 12px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 50px;

  --shadow: 0 2px 12px rgba(58,123,213,0.08);
  --shadow-md: 0 4px 24px rgba(58,123,213,0.12);
  --shadow-lg: 0 8px 32px rgba(58,123,213,0.15);

  --font: 'Roboto', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;

  --transition: 0.3s ease;
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ── 3. Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); line-height: 1.7; }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ── 4. Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ── 5. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: #257d56;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: var(--primary);
}
.btn-white:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── 6. Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn {
  padding: 10px 22px;
  font-size: 0.9rem;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 999;
  padding: 100px 24px 40px;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  display: block;
  padding: 16px 20px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-menu .btn {
  margin-top: 16px;
  text-align: center;
}

/* ── 7. Hero Section ── */
.hero {
  background: var(--gradient-hero);
  padding: 140px 0 100px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-logo {
  height: 56px;
  width: auto;
  margin-bottom: 28px;
  object-fit: contain;
}

.hero h1 {
  color: #fff;
  font-size: 3.2rem;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  margin-bottom: 32px;
  max-width: 560px;
  line-height: 1.7;
}

.hero-small {
  padding: 120px 0 60px;
}

.hero-small h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero-small p {
  font-size: 1.1rem;
}

/* ── 8. Stats Strip ── */
.stats {
  background: var(--surface);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── 9. Feature Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card-icon.blue { background: var(--primary-light); color: var(--primary); }
.card-icon.green { background: var(--accent-light); color: var(--accent); }
.card-icon.orange { background: var(--orange-light); color: var(--orange); }
.card-icon.purple { background: var(--purple-light); color: var(--purple); }

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── 10. Steps Section ── */
.steps {
  background: var(--surface);
}

.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 480px;
  width: 100%;
}

.step-number {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text h3 { margin-bottom: 6px; }
.step-text p { font-size: 0.95rem; }

/* ── 11. Role Cards ── */
.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  border-top: 4px solid transparent;
  transition: all var(--transition);
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.role-card.owner { border-top-color: var(--primary); }
.role-card.member { border-top-color: var(--accent); }
.role-card.instructor { border-top-color: var(--orange); }

.role-card h3 {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.owner .role-badge { background: var(--primary-light); color: var(--primary); }
.member .role-badge { background: var(--accent-light); color: var(--accent); }
.instructor .role-badge { background: var(--orange-light); color: var(--orange); }

.role-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.role-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.owner .role-features li::before { background: var(--primary); }
.member .role-features li::before { background: var(--accent); }
.instructor .role-features li::before { background: var(--orange); }

/* ── 12. CTA Banner ── */
.cta-banner {
  background: var(--gradient-cta);
  padding: 80px 0;
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── 13. Features Page Sections ── */
.feature-section {
  padding: 60px 0;
}

.feature-section:nth-child(even) {
  background: var(--surface);
}

.feature-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.feature-section-title .badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--accent-light); color: var(--accent); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-purple { background: var(--purple-light); color: var(--purple); }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  transition: all var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-card .card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.feature-card h4 { margin-bottom: 6px; }
.feature-card p { font-size: 0.9rem; line-height: 1.6; }

/* ── 14. Contact Page ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58,123,213,0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-info-card h4 { margin-bottom: 4px; font-size: 1rem; }
.contact-info-card p { font-size: 0.9rem; }

.form-status {
  display: none;
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-weight: 500;
}

.form-status.success {
  display: block;
  background: var(--accent-light);
  color: var(--accent);
}

.form-status.error {
  display: block;
  background: #fde8e8;
  color: var(--red);
}

/* ── 15. Footer ── */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ── 16. Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 17. Responsive ── */

/* Tablet (601px+) */
@media (min-width: 601px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .contact-grid { grid-template-columns: 3fr 2fr; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  .steps-grid {
    flex-direction: row;
    justify-content: center;
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 260px;
  }
}

/* Desktop (901px+) */
@media (min-width: 901px) {
  h1 { font-size: 3.2rem; }
  h2 { font-size: 2.2rem; }

  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

  .nav-toggle { display: none !important; }
  .nav-links, .nav-cta { display: flex !important; }
}

/* Large desktop */
@media (min-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile overrides */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .hero { padding: 110px 0 60px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .hero-small { padding: 100px 0 40px; }
  .hero-small h1 { font-size: 1.8rem; }

  .section { padding: 48px 0; }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group .btn {
    text-align: center;
  }

  .stats-grid { gap: 24px; }
  .stat-number { font-size: 1.6rem; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 20px; }

  .feature-card {
    flex-direction: column;
  }
}
