/* TRAINERSTU — base: tokens, reset, typography, utilities, buttons, motion. Ported from app/globals.css. */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-tertiary: #8a8a8a;
  --accent-gold: #cba135;
  --accent-gold-light: #e6c875;
  --accent-gold-dark: #a67c1e;
  --gold: var(--accent-gold);
  --lv-brown: #3f3222;
  --lv-brown-light: #604d36;
  --error: #d32f2f;
  --success: #388e3c;

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --glass-blur: blur(16px);
  --liquid-shadow-light: 0 10px 40px -10px rgba(203, 161, 53, 0.3);
  --liquid-shadow-dark: 0 10px 40px -10px rgba(63, 50, 34, 0.3);

  --nav-height: 80px;
  --max-width: 1400px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-pill: 9999px;

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol { margin: 0; padding: 0; }

html, body {
  max-width: 100vw;
  overflow-x: clip; /* not "hidden": that would turn <body> into the scroll container */
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
html { scroll-behavior: smooth; }
body.ts-lock { overflow: hidden; }

a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent-gold); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Layout utilities ---------- */

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.ts-narrow { max-width: 48rem; }
.ts-wide { max-width: 72rem; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-mobile-2-desktop-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.mt-8 { margin-top: 2rem; } .mt-16 { margin-top: 4rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .mb-12 { margin-bottom: 3rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.text-center { text-align: center; }
.bg-secondary, .ts-bg-secondary { background: var(--bg-secondary); }
.ts-bg-primary { background: var(--bg-primary); }
.ts-bg-gradient { background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary)); }
.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:focus { position: fixed; top: 1rem; left: 1rem; width: auto; height: auto; clip: auto; z-index: 10000; background: #fff; padding: 0.75rem 1rem; border-radius: var(--border-radius-sm); }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

.section { padding: 6rem 0; }

/* ---------- Typography ---------- */

.heading-xl { font-size: clamp(3rem, 6vw, 5rem); line-height: 1.1; font-family: var(--font-serif); color: var(--text-primary); }
.heading-lg { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.2; font-family: var(--font-serif); }
.heading-md { font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.3; font-family: var(--font-serif); }
.font-serif { font-family: var(--font-serif); }
.text-body-lg { font-size: 1.2rem; line-height: 1.8; color: var(--text-secondary); font-weight: 300; }
.text-gold { color: var(--accent-gold); }
.subtitle { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.9rem; font-weight: 600; }

/* ---------- Glass + buttons ---------- */

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-md);
  transition: background 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft), transform 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft);
}
.glass-panel:hover { background: var(--glass-bg-hover); box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.1); transform: translateY(-2px); }

.btn-primary, .btn-accent {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 3.5rem;
  background: var(--lv-brown);
  color: #fff;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--border-radius-pill);
  overflow: hidden;
  isolation: isolate;
  transition: background 0.5s ease, transform 0.5s var(--ease-out), box-shadow 0.5s ease, opacity 0.3s ease;
  box-shadow: var(--liquid-shadow-dark);
  cursor: pointer;
}
.btn-primary::before, .btn-accent::before {
  content: '';
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
  z-index: -1;
}
.btn-primary:hover { background: var(--lv-brown-light); transform: translateY(-3px); box-shadow: 0 15px 50px -10px rgba(63, 50, 34, 0.5); color: #fff; }
.btn-primary:hover::before, .btn-accent:hover::before { left: 100%; }
.btn-primary:active { transform: translateY(-1px) scale(0.98); }
.btn-primary:disabled, .btn-primary.disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-accent { padding: 1.15rem 3rem; font-size: 1rem; background: var(--accent-gold); box-shadow: var(--liquid-shadow-light); }
.btn-accent:hover { background: var(--accent-gold-light); transform: translateY(-3px); color: var(--lv-brown); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.15rem 3rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  border-radius: var(--border-radius-pill);
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s var(--ease-out);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-outline:hover { background: var(--text-primary); color: var(--bg-primary); }
.btn-outline.is-light { color: #fff; border-color: #fff; }
.btn-outline.is-light:hover { background: #fff; color: var(--text-primary); }

/* ---------- Motion ---------- */

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.35); } }

.animate-fade-up { animation: fadeUp 0.8s var(--ease-out) both; }
.animate-float { animation: float 6s ease-in-out infinite; }

/* Scroll reveal: only hides content once JS is confirmed running (html.ts-js), never in the Elementor editor. */
.ts-js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.ts-js [data-reveal="zoom"] { transform: scale(0.96); }
.ts-js [data-reveal].is-visible { opacity: 1; transform: none; }
.elementor-editor-active [data-reveal] { opacity: 1 !important; transform: none !important; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(203, 161, 53, 0.15);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@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; }
  .ts-js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Elementor: let widgets own the layout ---------- */

.elementor-section.elementor-section-full_width > .elementor-container { max-width: none; }
.elementor-column-gap-no > .elementor-column > .elementor-element-populated { padding: 0; }
.elementor-widget-wrap > .elementor-widget:not(:last-child) { margin-bottom: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) and (min-width: 769px) {
  .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .section { padding: 2rem 0; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .grid-mobile-2-desktop-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .btn-primary, .btn-accent, .btn-outline { width: 100%; margin-top: 0.5rem; }
  .heading-xl { font-size: 2.5rem; }
}

/* Keep floating site chrome out of the way while editing in Elementor. */
.elementor-editor-active .cookie-banner, .elementor-editor-active .whatsapp-btn { display: none !important; }
