/* =========================================================
   BodyFiit Club Base Styles
   ========================================================= */

/* =========================================================
   1. Root Variables
   ========================================================= */
:root {
  /* Color Palette - Energetic Greens, Bold Blues, Crisp Whites */
  --color-background: #050914;           /* Deep navy base */
  --color-surface: #0b1220;              /* Elevated surface */
  --color-surface-alt: #111827;          /* Alt surface for sections */
  --color-text: #f9fafb;                 /* Primary text (near white) */
  --color-text-muted: #9ca3af;           /* Muted / secondary text */

  --color-primary: #22c55e;              /* Energizing green */
  --color-primary-soft: #16a34a;         /* Darker primary for hovers */
  --color-primary-subtle: rgba(34, 197, 94, 0.12);

  --color-accent: #3b82f6;               /* Bold blue accent */
  --color-accent-soft: #2563eb;
  --color-accent-subtle: rgba(59, 130, 246, 0.14);

  --color-success: #16a34a;
  --color-warning: #facc15;
  --color-danger: #ef4444;

  /* Neutral Grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (px) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Shadows - subtle depth, energetic glow accents */
  --shadow-soft: 0 6px 16px rgba(15, 23, 42, 0.35);
  --shadow-medium: 0 14px 40px rgba(15, 23, 42, 0.55);
  --shadow-glow-primary: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 14px 40px rgba(34, 197, 94, 0.28);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 260ms ease;

  /* Layout */
  --container-max-width: 1200px;
  --container-padding-x: 1.5rem;
}

/* =========================================================
   2. Reset / Normalize
   ========================================================= */

/* Box sizing and base resets */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

textarea {
  resize: vertical;
}

/* Remove default link underlines; will define base style later */
a {
  text-decoration: none;
  color: inherit;
}

/* Smooth font rendering */
body, input, textarea, button {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   3. Base Typography & Layout
   ========================================================= */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: radial-gradient(circle at top left, #1e293b 0, #020617 40%, #000 100%);
}

/* Ensure a comfortable max width for text-heavy sections */
body {
  text-rendering: optimizeLegibility;
}

/* Headings - modern, bold, fitness-oriented */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.01em;
  color: var(--gray-50);
}

h1 {
  font-size: clamp(2.4rem, 4vw, var(--font-size-5xl));
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.9rem, 3vw, var(--font-size-4xl));
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.5rem, 2.3vw, var(--font-size-3xl));
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

h6 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

/* Paragraphs - comfortable reading, limited measure */
p {
  margin-bottom: var(--space-4);
  max-width: 70ch;
  color: var(--color-text-muted);
}

strong, b {
  font-weight: 600;
}

small {
  font-size: var(--font-size-sm);
}

/* Links - primary accent with subtle hover underline */
a {
  color: var(--color-accent);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-soft);
}

a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

a:not(.btn):hover::after {
  width: 100%;
}

/* Lists */
ul, ol {
  margin: 0 0 var(--space-4) var(--space-5);
  padding: 0;
}


/* Sections spacing baseline */
section {
  padding-block: var(--space-16);
}

/* =========================================================
   4. Accessibility & Motion
   ========================================================= */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Visually hidden but accessible text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   5. Utilities
   ========================================================= */

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* Flex Helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Grid Helpers */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Centered section heading wrapper */
.section-heading {
  text-align: center;
  max-width: 52rem;
  margin: 0 auto var(--space-10);
}

/* Spacing Utilities (limited set around baseline) */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-8 { padding-top: var(--space-8); }
.pb-8 { padding-bottom: var(--space-8); }
.pt-16 { padding-top: var(--space-16); }
.pb-16 { padding-bottom: var(--space-16); }

/* Text alignment */
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Width */
.w-full { width: 100%; }

/* Badge utility for program / level tags */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--gray-100);
  background: rgba(15, 23, 42, 0.85);
}

.badge--primary {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
}

/* =========================================================
   6. Components
   ========================================================= */

/* Buttons - energetic, bold, with clear states */
.btn {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-soft);
  --btn-color: #0b1120;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base);
}

.btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-primary);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--primary {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-soft);
  --btn-color: #020617;
}

.btn--accent {
  --btn-bg: var(--color-accent);
  --btn-bg-hover: var(--color-accent-soft);
  --btn-color: #f9fafb;
}

.btn--outline {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(15, 23, 42, 0.9);
  --btn-color: var(--color-text);
  --btn-border: rgba(148, 163, 184, 0.7);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(31, 41, 55, 0.8);
  --btn-color: var(--color-text);
  --btn-border: transparent;
}

.btn--sm {
  padding: 0.5rem 1.1rem;
  font-size: var(--font-size-xs);
}

.btn--lg {
  padding: 0.9rem 1.9rem;
  font-size: var(--font-size-md);
}

/* Inputs & Form Controls */
.input,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.3;
  outline: none;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--gray-500);
}

.input:focus,
select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.6), 0 0 0 6px rgba(34, 197, 94, 0.15);
}

input[disabled],
textarea[disabled],
select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-100);
}

/* Cards - for memberships, trainers, classes, programs */
.card {
  position: relative;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.12) 0, rgba(15, 23, 42, 0.92) 40%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover::before {
  opacity: 1;
}

.card--flat {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: none;
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
}

.card-footer {
  margin-top: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Media wrapper for hero / trainers / classes images */
.media-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.media-cover img,
.media-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 320ms ease-out, filter 320ms ease-out;
}

.media-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0, rgba(15, 23, 42, 0.85) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.media-cover:hover img {
  transform: scale(1.05);
}

/* Schedule / table base styling */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--gray-200);
  background: rgba(15, 23, 42, 0.9);
}

.table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.7);
}

/* Status pills for class intensity / availability */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.status-pill--success {
  background: rgba(22, 163, 74, 0.2);
  color: #bbf7d0;
}

.status-pill--warning {
  background: rgba(234, 179, 8, 0.18);
  color: #fef9c3;
}

.status-pill--danger {
  background: rgba(239, 68, 68, 0.22);
  color: #fee2e2;
}

/* Hero-specific helpers (optional generic) */
.hero {
  padding-block: var(--space-20);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-3);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #a5f3fc;
}

.hero-kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.hero-title {
  font-size: clamp(2.6rem, 4.4vw, 3.4rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 34rem;
  margin-bottom: var(--space-6);
}

/* CTA group */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

@media (max-width: 640px) {
  section {
    padding-block: var(--space-12);
  }

  .hero {
    padding-block: var(--space-16);
  }
}
