/* ============================================================
   IRONFLOW CLUB - Main Stylesheet
   Shared styles across all pages
   ============================================================ */

/* ── CSS Reset ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0;
  padding: 0;
}

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

body { margin: 0; }

img { 
  max-width: 100%; 
  display: block; 
}

a { 
  color: inherit; 
  text-decoration: none; 
}

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

:focus-visible { 
  outline: 3px solid rgba(255,193,7,.55); 
  outline-offset: 3px; 
  border-radius: 12px; 
}

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

/* ── CSS Variables ── */
:root {
  --bg: #fbfbfd;
  --ink: rgba(17,20,28,.94);
  --text: rgba(17,20,28,.88);
  --muted: rgba(17,20,28,.62);
  --muted-2: rgba(17,20,28,.45);
  --accent: #ffc107;
  --accent-2: #ff9800;
  --stroke: rgba(17,20,28,.10);
  --stroke-2: rgba(17,20,28,.18);
  --radius: 22px;
  --radius-lg: 28px;
  --radius-sm: 16px;
  --pill: 999px;
  --shadow: 0 22px 70px rgba(17,20,28,.10);
  --shadow-soft: 0 14px 40px rgba(17,20,28,.08);
  --container: 1120px;
  --pad: 18px;
  --nav-h: 72px;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  --font-display: Outfit, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, sans-serif;
  --night-1: #1c1f3a;
  --night-2: #11142a;
  --night-3: #0b0d1a;
}

/* ── Body Base ── */
body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 18% 0%, rgba(255,193,7,.20), transparent 55%),
    radial-gradient(900px 650px at 100% 100%, rgba(0,170,255,.08), transparent 52%),
    linear-gradient(180deg, #fff 0%, #fbfbfd 70%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(env(safe-area-inset-bottom) + 14px);
}

/* ── Container ── */
.container {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Header ── */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,251,253,.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--stroke);
}

/* Only homepage animates */
body.home header {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform .6s var(--ease-out), opacity .6s var(--ease-out);
}

body.home header.go {
  transform: none;
  opacity: 1;
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255,193,7,.30);
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 24px rgba(17,20,28,.08);
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand strong {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
}

.brand small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(161,115,0,.92);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.nav-btn, .lang-switch, .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--stroke-2);
  background: rgba(255,255,255,.70);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(17,20,28,.06);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .15s var(--ease-bounce), background .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  cursor: pointer;
}

.nav-btn:hover, .lang-switch:hover, .nav-cta:hover {
  background: rgba(255,193,7,.14);
  border-color: rgba(255,193,7,.35);
}

.nav-btn:active, .lang-switch:active, .nav-cta:active {
  transform: scale(.97);
}

/* ── Main Content ── */
main {
  display: block;
  padding: 18px 0 22px;
}

#site-content {
  opacity: 0;
  transition: opacity .5s ease;
}

#site-content.visible {
  opacity: 1;
}

/* ── Buttons ── */
.btn {
  min-height: 60px;
  border-radius: var(--pill);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 24px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: all .25s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #141414;
  box-shadow: 0 16px 44px rgba(255,193,7,.28);
}

.btn-ghost {
  background: rgba(255,255,255,.90);
  border-color: rgba(17,20,28,.16);
  color: rgba(17,20,28,.92);
  box-shadow: 0 12px 30px rgba(17,20,28,.08), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(10px);
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,.28);
  animation: ripple .6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  skewX: -20deg;
  animation: btnShimmer 3.5s 1.5s ease-in-out infinite;
}

@keyframes btnShimmer {
  0% { left: -60%; }
  30%, 100% { left: 130%; }
}

/* ── Footer ── */
footer {
  padding: 28px 0;
  background: #0e0f14;
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.90);
  font-weight: 800;
}

.footer-copy {
  margin: 0;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
}

/* ── Animations ── */
.enter {
  opacity: 0;
  transform: translateY(10px);
  animation: enter .55s var(--ease-out) forwards;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: none;
  }
}

.s-enter {
  opacity: 0;
  transform: translateY(22px);
}

.s-enter.go {
  animation: sEnter .7s var(--ease-out) forwards;
  animation-delay: var(--sd, 0ms);
}

@keyframes sEnter {
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s var(--ease-out), transform .65s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Loading States ── */
.state-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  border: 3px solid rgba(255,193,7,.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Responsive ── */
@media (min-width: 768px) {
  :root {
    --pad: 40px;
    --nav-h: 78px;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .enter,
  .s-enter,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  header {
    transform: none !important;
    opacity: 1 !important;
  }

  #site-content {
    opacity: 1 !important;
  }
}