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

:root {
  /* Color Palette */
  --color-bg: #050814; /* deep, modern background */
  --color-surface: #0b1021; /* elevated panels */
  --color-surface-alt: #10172f;

  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;

  --color-primary: #0ea5e9; /* energetic blue */
  --color-primary-soft: rgba(14, 165, 233, 0.1);
  --color-primary-strong: #0284c7;

  --color-accent: #22c55e; /* invigorating green */
  --color-accent-soft: rgba(34, 197, 94, 0.12);

  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-danger: #ef4444;

  --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 Neue", Arial, sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Font sizes (clamped for responsiveness) */
  --text-xs: 0.75rem;   /* 12px */
  --text-sm: 0.875rem;  /* 14px */
  --text-base: 1rem;    /* 16px */
  --text-lg: 1.125rem;  /* 18px */
  --text-xl: 1.25rem;   /* 20px */
  --text-2xl: 1.5rem;   /* 24px */
  --text-3xl: 1.875rem; /* 30px */
  --text-4xl: 2.25rem;  /* 36px */
  --text-5xl: clamp(2.5rem, 4vw, 3rem);

  /* Line heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-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 */

  /* Radii */
  --radius-sm: 0.25rem; /* 4px */
  --radius-md: 0.5rem;  /* 8px */
  --radius-lg: 0.75rem; /* 12px */
  --radius-xl: 1rem;    /* 16px */
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.25);
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.32);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.55);
  --shadow-soft-glow: 0 0 0 1px rgba(148, 163, 184, 0.25), 0 18px 40px rgba(15, 23, 42, 0.75);

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

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: 1.25rem;
}

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

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

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

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

body {
  min-height: 100vh;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section {
  display: block;
}

ol,
ul {
  list-style: none;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

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

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

textarea {
  resize: vertical;
}

[hidden] {
  display: none !important;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Headings: modern, confident scale */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: 0.01em;
  color: var(--color-text);
}

h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

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

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

h6 {
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: var(--space-2);
}

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

strong,
b {
  font-weight: 600;
}

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

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

/* Links */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base), opacity var(--transition-base);
}

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

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

/* Horizontal rule */

hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin: var(--space-8) 0;
}

/* ========================================================================== 
   Accessibility & Motion
   ========================================================================== */

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

:focus {
  outline: none;
}

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

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

/* Container */

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

/* Simple layout 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;
}

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

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

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

.m-auto {
  margin: auto;
}

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

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

.w-full {
  width: 100%;
}

.max-w-sm {
  max-width: 24rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

/* Screen reader only */

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

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

/* Buttons: primary CTAs for energetic, trustworthy feel */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-base),
              border-color var(--transition-base),
              color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: radial-gradient(circle at top left, var(--color-primary), var(--color-primary-strong));
  color: #0b1120;
  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: rgba(148, 163, 184, 0.7);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: rgba(15, 23, 42, 0.8);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.6);
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
}

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

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

/* Inputs & form controls */

.input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--color-text);
  font-size: var(--text-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(--gray-500);
}

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.4), 0 18px 40px rgba(15, 23, 42, 0.9);
  background-color: #020617;
  outline: none;
}

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

label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-200);
}

/* Cards: for memberships, trainers, amenities, etc. */

.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 50%),
              radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.12), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft-glow);
  overflow: hidden;
}

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

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

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

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

/* Badges for membership levels / class types */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--gray-100);
  background-color: rgba(15, 23, 42, 0.8);
}

.badge-primary {
  border-color: rgba(14, 165, 233, 0.8);
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge-success {
  border-color: rgba(34, 197, 94, 0.8);
  background-color: var(--color-accent-soft);
  color: var(--color-success);
}

/* Hero-style overlay utility for imagery */

.overlay-gradient {
  position: relative;
}

.overlay-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 12, 0.9), rgba(5, 7, 12, 0.25));
  pointer-events: none;
}

/* Tables (e.g., class schedules, membership comparisons) */

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

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  text-align: left;
}

th {
  font-weight: 600;
  color: var(--gray-200);
  background-color: rgba(15, 23, 42, 0.95);
}

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

/* Alerts (success, warning, danger) */

.alert {
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid transparent;
}

.alert-success {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(22, 163, 74, 0.12);
  color: var(--color-success);
}

.alert-warning {
  border-color: rgba(234, 179, 8, 0.5);
  background: rgba(250, 204, 21, 0.1);
  color: var(--color-warning);
}

.alert-danger {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(248, 113, 113, 0.12);
  color: var(--color-danger);
}

/* Chips / tags for class types, intensity levels */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 500;
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--gray-200);
}

/* Footer text utility */

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