/* ========================================================================== 
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-background: #050608;
  --color-surface: #101218;
  --color-elevated: #181b23;

  --color-text: #f5f5f7;
  --color-text-muted: #a3a7b3;
  --color-border-subtle: #262936;

  --color-primary: #e02233; /* energetic deep red */
  --color-primary-soft: #ff4b5f;
  --color-primary-dark: #a01423;

  --color-success: #21c36b;
  --color-warning: #f7b500;
  --color-danger: #ff3b30;

  --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;

  /* Metallic / accent tones */
  --color-metallic-soft: #8d9098;
  --color-metallic-strong: #c0c3cc;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif;
  --font-heading: "Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

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

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

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

  /* Shadows - slightly dramatic for bold, modern look */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 0 1px rgba(224, 34, 51, 0.6), 0 0 24px rgba(224, 34, 51, 0.55);

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

  /* Layout */
  --container-max-width: 1120px;
}

@media (min-width: 1200px) {
  :root {
    --container-max-width: 1200px;
  }
}


/* ========================================================================== 
   Reset / Normalize
   ========================================================================== */

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

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

body {
  margin: 0;
}

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

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

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

img {
  height: auto;
}

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

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

textarea {
  resize: vertical;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ========================================================================== 
   Base Styles
   ========================================================================== */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #161824 0, #050608 55%, #000000 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

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

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

h3 {
  font-size: clamp(var(--font-size-xl), 2.4vw, var(--font-size-3xl));
  margin-bottom: var(--space-3);
}

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

h5 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-2);
}

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

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

a {
  color: var(--color-primary-soft);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-base);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-soft));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

a:hover {
  color: var(--color-primary);
}

a:hover::after {
  transform: scaleX(1);
}

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

code, pre {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

pre {
  padding: var(--space-4);
  background-color: #05070c;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}


/* ========================================================================== 
   Utilities
   ========================================================================== */

/* Layout helpers */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section--dense {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.section--hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

/* Flex */

.flex {
  display: flex;
}

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

.flex-row {
  flex-direction: row;
}

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

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

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs {
  gap: var(--space-2);
}

.gap-sm {
  gap: var(--space-3);
}

.gap-md {
  gap: var(--space-4);
}

.gap-lg {
  gap: var(--space-6);
}

.gap-xl {
  gap: var(--space-8);
}

/* Grid */

.grid {
  display: grid;
}

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

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

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

/* Alignment & text */

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

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: uppercase;
}

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

/* Spacing utilities (selected, can be extended as needed) */

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.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-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }

.pb-4 { padding-bottom: var(--space-4); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* Background helpers */

.bg-surface {
  background-color: var(--color-surface);
}

.bg-elevated {
  background-color: var(--color-elevated);
}

.bg-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-soft));
}

/* Visibility / accessibility */

.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;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Focus-visible outline for all interactive elements */

:where(a, button, input, textarea, select, summary, [tabindex="0"]):: -moz-focus-inner {
  border: 0;
}

:where(a, button, input, textarea, select, summary, [tabindex="0"]):focus-visible {
  outline: 2px solid var(--color-primary-soft);
  outline-offset: 3px;
}


/* ========================================================================== 
   Components
   ========================================================================== */

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-fast);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-soft));
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

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

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-subtle);
}

.btn--outline:hover {
  border-color: var(--color-primary-soft);
  color: var(--color-primary-soft);
  box-shadow: var(--shadow-xs);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.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-base);
}

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

.btn:focus-visible {
  box-shadow: var(--shadow-glow-primary);
}

/* Icon alignment inside buttons */

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


/* Form controls */

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: #05070c;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--color-primary-soft);
  box-shadow: var(--shadow-glow-primary);
}

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

.label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.form-field {
  margin-bottom: var(--space-4);
}

.form-helper {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card component - for memberships, trainers, classes, etc. */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: radial-gradient(circle at top left, rgba(224, 34, 51, 0.08), transparent 45%),
              var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(224, 34, 51, 0.18), transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

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

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

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

.card__subtitle {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-metallic-soft);
  margin-bottom: var(--space-2);
}

.card__body {
  position: relative;
  z-index: 1;
}

.card__footer {
  position: relative;
  z-index: 1;
  margin-top: var(--space-4);
}

/* Badge / pill for statuses (e.g., NEW, PRO, VIP) */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-metallic-strong);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.badge--primary {
  border-color: rgba(224, 34, 51, 0.7);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(224, 34, 51, 0.85), rgba(255, 75, 95, 0.9));
}

/* Tag list inside cards */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background-color: rgba(255, 255, 255, 0.04);
}

/* Utility: dark overlay for hero images */

.overlay-dark {
  position: relative;
}

.overlay-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.95));
  pointer-events: none;
}

.overlay-dark > * {
  position: relative;
  z-index: 1;
}

/* Schedule / table base styles (for class timetables) */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.table th {
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--color-metallic-soft);
}

.table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

.table tr:hover {
  background-color: rgba(224, 34, 51, 0.11);
}

/* Chip for time / difficulty labels */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
}

.chip--success {
  background-color: rgba(33, 195, 107, 0.16);
  color: #9af3c1;
}

.chip--warning {
  background-color: rgba(247, 181, 0, 0.16);
  color: #ffe08a;
}

.chip--danger {
  background-color: rgba(255, 59, 48, 0.16);
  color: #ffb0a9;
}

/* Global helper for metallic separators */

.divider-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-metallic-soft);
}

.divider-label::before,
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-metallic-soft));
}

.divider-label::after {
  background: linear-gradient(90deg, var(--color-metallic-soft), transparent);
}
