/* ===========================================================================
   Bemaxx — marketing landing styles
   Brand: matte black + molten gold. "Underground gym at 5am."
   Shared by index.html and the /legal pages.
   ======================================================================== */

:root {
  --bg-0: #0a0b0d;
  --bg-1: #0e1013;
  --bg-2: #15171b;
  --elev-1: #141619;
  --elev-2: #1c1f24;
  --stroke: #23262c;
  --stroke-strong: #33373f;
  --ink: #f5f5f4;
  --ink-2: #a6acb8;
  --ink-3: #6b7280;
  --gold: #e8b23a;
  --gold-2: #f0c254;
  --gold-dim: #8a6a22;
  --glow: rgba(232, 178, 58, 0.18);

  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1140px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius-card: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint film-grain over the matte black for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: var(--gold); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--gold-2); }

::selection { background: rgba(232, 178, 58, 0.28); color: #fff; }

/* ---- shared layout helpers ------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { position: relative; z-index: 1; padding-block: clamp(72px, 11vw, 140px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }

.section-head { max-width: 640px; }
.section-head h2 { font-size: clamp(30px, 5vw, 46px); margin-top: 18px; }
.section-head p { color: var(--ink-2); font-size: clamp(15px, 1.6vw, 18px); margin-top: 16px; }

.gold-text {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 45%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ===========================================================================
   NAV
   ======================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--stroke);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #0a0b0d !important;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--glow); color: #0a0b0d !important; }

/* EN/ES language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(245, 245, 244, 0.05);
  border: 1px solid var(--stroke-strong);
}
.lang-toggle button {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.lang-toggle button:hover:not(.active) { color: var(--ink); }
.lang-toggle button.active { background: var(--gold); color: #0a0b0d; }

/* ===========================================================================
   HERO
   ======================================================================== */
.hero { position: relative; overflow: hidden; z-index: 1; padding-block: clamp(54px, 8vw, 96px) clamp(60px, 9vw, 110px); }
.hero::before {
  content: "";
  position: absolute;
  top: -28%;
  right: -8%;
  width: 760px;
  height: 760px;
  max-width: 95vw;
  background: radial-gradient(circle, var(--glow) 0%, rgba(232, 178, 58, 0.05) 38%, transparent 68%);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { font-size: clamp(40px, 7.2vw, 78px); letter-spacing: -0.03em; }
.hero-sub {
  color: var(--ink-2);
  font-size: clamp(16px, 1.9vw, 20px);
  margin-top: 22px;
  max-width: 30ch;
}
.hero-tag { margin-bottom: 24px; }

.soon-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: rgba(232, 178, 58, 0.06);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.soon-ribbon .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(232, 178, 58, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 178, 58, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(232, 178, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 178, 58, 0); }
}

/* store badges */
.badges { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  min-width: 184px;
  border-radius: 13px;
  background: #000;
  border: 1px solid #2b2b2b;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.badge:hover { transform: translateY(-2px); border-color: var(--gold-dim); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.badge svg { flex: none; }
.badge .b-text { display: flex; flex-direction: column; line-height: 1.1; }
.badge .b-small { font-size: 10px; color: #cfcfcf; letter-spacing: 0.02em; }
.badge .b-big { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }

/* QR codes */
.qr-row { display: flex; gap: 18px; margin-top: 34px; flex-wrap: wrap; }
.hero .qr-row { justify-content: center; }
.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.qr-card {
  width: 116px;
  height: 116px;
  padding: 9px;
  border-radius: 16px;
  background: #f5f5f4;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qr-card img { width: 100%; height: 100%; border-radius: 7px; }
.qr:hover .qr-card { transform: translateY(-3px); box-shadow: 0 14px 34px var(--glow); }
.qr-cap { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.qr-cap b { color: var(--ink); font-weight: 600; }

.hero-trust {
  margin-top: 30px;
  font-size: 13px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-trust svg { flex: none; color: var(--gold); }

/* hero phone */
.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  width: 115%;
  height: 70%;
  top: 16%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

/* ---- device frame --------------------------------------------------------- */
.phone {
  position: relative;
  border-radius: 44px;
  background: linear-gradient(155deg, #26282e 0%, #0d0e11 60%);
  padding: 9px;
  border: 1px solid rgba(245, 245, 244, 0.1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.06);
  z-index: 1;
}
.phone::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: 11px;
  background: #050608;
  border-radius: 999px;
  z-index: 3;
}
.phone img { width: 100%; border-radius: 36px; display: block; }
.phone.hero-phone { width: clamp(248px, 33vw, 340px); }

/* ===========================================================================
   SHOWCASE
   ======================================================================== */
.showcase { background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 50%, var(--bg-0)); }
.showcase .section-head { margin-inline: auto; text-align: center; }
.showcase .section-head .eyebrow { justify-content: center; }
.showcase .section-head .eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.gallery {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(14px, 2vw, 26px);
  margin-top: 64px;
  padding-bottom: 10px;
}
.frame { text-align: center; flex: none; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.frame .phone { width: clamp(150px, 17vw, 200px); }
.frame .cap {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
/* fanned / staggered desktop arrangement */
.frame:nth-child(1) { transform: translateY(26px) rotate(-5deg); }
.frame:nth-child(2) { transform: translateY(10px) rotate(-2.5deg); }
.frame:nth-child(3) { transform: translateY(0) rotate(0deg); z-index: 2; }
.frame:nth-child(4) { transform: translateY(10px) rotate(2.5deg); }
.frame:nth-child(5) { transform: translateY(26px) rotate(5deg); }
.gallery:hover .frame { transform: translateY(10px) rotate(0deg); }
.frame:hover { transform: translateY(-6px) rotate(0deg) !important; z-index: 5; }

/* ===========================================================================
   FEATURES
   ======================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 60px;
}
.card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--elev-1), #101216);
  border: 1px solid var(--stroke);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(232, 178, 58, 0.4), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--stroke-strong); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.card:hover::before { opacity: 1; }
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(232, 178, 58, 0.1);
  border: 1px solid rgba(232, 178, 58, 0.22);
  color: var(--gold);
  margin-bottom: 20px;
}
.card h3 { font-size: 19px; letter-spacing: -0.01em; }
.card p { color: var(--ink-2); font-size: 14.5px; margin-top: 10px; }

/* ===========================================================================
   PROGRESS BAND
   ======================================================================== */
.progress { background: linear-gradient(180deg, var(--bg-0), #0b0d10); position: relative; }
.progress-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.progress-visual { display: flex; justify-content: center; position: relative; }
.progress-visual::before {
  content: "";
  position: absolute;
  width: 110%;
  height: 75%;
  top: 12%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  filter: blur(24px);
}
.progress-visual .phone { width: clamp(240px, 30vw, 320px); }
.stat-row { display: flex; gap: 30px; margin-top: 30px; flex-wrap: wrap; }
.stat .num { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--gold); line-height: 1; }
.stat .lbl { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.checks { margin-top: 28px; display: grid; gap: 13px; }
.check { display: flex; align-items: flex-start; gap: 11px; color: var(--ink-2); font-size: 15px; }
.check svg { flex: none; color: var(--gold); margin-top: 3px; }

/* ===========================================================================
   FINAL CTA
   ======================================================================== */
.cta { position: relative; overflow: hidden; text-align: center; }
.cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 600px;
  max-width: 120vw;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  z-index: -1;
}
.cta h2 { font-size: clamp(32px, 5.5vw, 56px); max-width: 16ch; margin-inline: auto; }
.cta p { color: var(--ink-2); font-size: clamp(15px, 1.8vw, 19px); margin: 18px auto 0; max-width: 46ch; }
.cta .badges, .cta .qr-row { justify-content: center; }
.cta .qr-row { margin-top: 30px; }

/* ===========================================================================
   FOOTER
   ======================================================================== */
.footer { border-top: 1px solid var(--stroke); padding-block: 56px 40px; position: relative; z-index: 1; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer .brand .wordmark { font-size: 18px; }
.footer-tagline { color: var(--ink-3); font-size: 14px; margin-top: 14px; max-width: 34ch; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a, .footer-links span { color: var(--ink-2); font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col .h { color: var(--ink-3); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 12.5px;
}
.footer-disclaimer { max-width: 60ch; line-height: 1.6; }

/* ===========================================================================
   SCROLL REVEAL
   ======================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ===========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero .eyebrow, .hero .badges, .hero .qr-row, .hero .soon-ribbon, .hero-trust { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 18px; }
  .progress-grid { grid-template-columns: 1fr; }
  .progress-visual { order: -1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row, .progress .eyebrow { justify-content: center; }
  .progress .section-head { margin-inline: auto; text-align: center; }
  .progress .checks { max-width: 380px; margin-inline: auto; }
}

@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links { gap: 12px; }
  .nav-cta { padding: 9px 15px; }
  /* gallery becomes a horizontal snap carousel on mobile */
  .gallery {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding: 12px var(--gutter) 16px;
    -webkit-overflow-scrolling: touch;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .frame { scroll-snap-align: center; transform: none !important; }
  .frame .phone { width: 200px; }
  .gallery:hover .frame { transform: none; }
}

@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .badge { flex: 1 1 100%; }
  .qr-row { gap: 14px; }
  .footer-top { flex-direction: column; }
}

/* compact nav so wordmark + EN/ES toggle + CTA fit small phones without wrapping */
@media (max-width: 430px) {
  .brand .wordmark { font-size: 17px; letter-spacing: 0.08em; }
  .nav-links { gap: 10px; }
  .nav-cta { white-space: nowrap; font-size: 13px; padding: 8px 13px; }
  .lang-toggle button { padding: 5px 11px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===========================================================================
   LEGAL PAGES
   ======================================================================== */
.legal-nav { border-bottom: 1px solid var(--stroke); position: sticky; top: 0; z-index: 50; background: rgba(10, 11, 13, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.legal-wrap { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter) 100px; position: relative; z-index: 1; }
.legal-actions { display: flex; align-items: center; gap: 16px; }
.legal-back { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.legal-back:hover { color: var(--ink); }
.legal-wrap h1 { font-size: clamp(32px, 6vw, 46px); }
.legal-updated { color: var(--ink-3); font-size: 13px; margin-top: 10px; }
.legal-intro { color: var(--ink-2); font-size: 17px; margin-top: 22px; line-height: 1.7; }
.legal-section { margin-top: 40px; }
.legal-section h2 { font-size: 21px; color: var(--ink); letter-spacing: -0.01em; }
.legal-section p { color: var(--ink-2); font-size: 15.5px; line-height: 1.75; margin-top: 13px; }
.legal-section p:first-of-type { margin-top: 14px; }
.legal-divider { height: 1px; background: var(--stroke); margin-top: 56px; }
.legal-foot { margin-top: 28px; color: var(--ink-3); font-size: 13px; display: flex; gap: 22px; flex-wrap: wrap; }
