/* ==========================================================================
   Gymstrata — public marketing site
   Design system: dark premium SaaS · bento grid · glass surfaces
   No external request: the two fonts are self-hosted and preloaded.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-var.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

:root {
  --bg: #060a14;
  --bg-2: #0a1120;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eef2ff;
  --muted: #9aa8c7;
  --brand: #4f7cff;
  --brand-2: #22d3ee;
  --accent: #f97316;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 30px 70px -40px rgba(0, 0, 0, .95);
  --glow: 0 0 0 1px rgba(79, 124, 255, .35), 0 18px 50px -22px rgba(79, 124, 255, .55);
  --font-head: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(79, 124, 255, .22), transparent 62%),
    radial-gradient(900px 520px at 96% -4%, rgba(34, 211, 238, .16), transparent 58%),
    radial-gradient(700px 700px at 50% 108%, rgba(249, 115, 22, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* A faint grid keeps the dark background from looking flat. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
}

main, header.site-header, footer.site-footer { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0 0 .45em;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
strong { color: var(--text); font-weight: 600; }
:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.section { padding: 92px 0; }
.section.tight { padding: 58px 0; }
.center { text-align: center; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.row { display: flex; gap: .7rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(6, 10, 20, .72);
  border-bottom: 1px solid var(--border);
}

.site-header .bar {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; display: block; }

.site-nav { display: flex; gap: .25rem; margin-left: auto; }
.site-nav a {
  color: var(--muted);
  padding: .45rem .7rem;
  border-radius: 9px;
  font-size: .93rem;
  font-weight: 500;
  transition: color .18s ease, background-color .18s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.site-actions { display: flex; gap: .5rem; align-items: center; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .68rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: 600 .95rem/1 var(--font);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), #6d5bff);
  color: #fff;
  box-shadow: 0 12px 30px -16px rgba(79, 124, 255, .9);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 18px 38px -16px rgba(79, 124, 255, 1); }
.btn.ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn.ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn.accent {
  background: linear-gradient(135deg, var(--accent), #fb923c);
  color: #160c02;
}
.btn.accent:hover { transform: translateY(-1px); }
.btn.lg { min-height: 52px; padding: .9rem 1.7rem; font-size: 1.02rem; }
.btn.block { width: 100%; }

/* ------------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(8px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .34rem .72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.badge.brand {
  border-color: rgba(79, 124, 255, .45);
  background: rgba(79, 124, 255, .14);
  color: #cfe0ff;
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--brand-2);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------- hero */

.hero { position: relative; padding: 76px 0 40px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 54px;
  align-items: center;
}
.hero h1 { margin: .55rem 0 .8rem; }
.hero .lede { font-size: 1.08rem; max-width: 56ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.2rem; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.trust div { display: flex; flex-direction: column; }
.trust b { font-family: var(--font-head); font-size: 1.45rem; line-height: 1.2; }
.trust span { font-size: .82rem; color: var(--muted); }

/* The hero visual: a live canvas chart inside a glass panel. */
.visual {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(79, 124, 255, .14), rgba(34, 211, 238, .05) 42%, rgba(6, 10, 20, .6));
  box-shadow: var(--shadow);
  padding: 20px;
}
.visual canvas { display: block; width: 100%; height: 260px; }
.visual .caption {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px; margin-top: 10px;
}
.visual .legend { display: flex; gap: 1rem; }
.visual .legend span { display: inline-flex; align-items: center; gap: .4rem; }
.visual .legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.floating {
  position: absolute;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(10, 17, 32, .88);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: .82rem;
  display: flex; gap: .6rem; align-items: center;
}
.floating b { font-family: var(--font-head); font-size: 1.05rem; display: block; line-height: 1.2; }
.floating .k { color: var(--muted); font-size: .74rem; }
.floating.one { top: -20px; right: -12px; }
.floating.two { bottom: 44px; left: -16px; }

/* ------------------------------------------------------------------- bento */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.bento .card { display: flex; flex-direction: column; gap: .55rem; grid-column: span 3; }
.bento .card.wide { grid-column: span 4; }
.bento .card.narrow { grid-column: span 2; }
.bento .card.half { grid-column: span 3; }

.bento .ic {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(79, 124, 255, .16);
  border: 1px solid rgba(79, 124, 255, .28);
  color: #b9cdff;
}
.bento .ic svg { width: 21px; height: 21px; }
.bento p { margin: 0; font-size: .93rem; }
.bento h3 { margin: 0; }

/* ------------------------------------------------------------- role panels */

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.role { padding: 26px; }
.role .ic {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 13px; background: rgba(34, 211, 238, .14);
  border: 1px solid rgba(34, 211, 238, .3); color: #a9ecf7; margin-bottom: .8rem;
}
.role .ic svg { width: 23px; height: 23px; }
.role ul { margin: .8rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .93rem; }
.role li { margin-bottom: .35rem; }

/* ------------------------------------------------------------------ steps */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h3 { margin: .5rem 0 .3rem; }
.step p { font-size: .93rem; margin: 0; }

/* ----------------------------------------------------------------- pricing */

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.plan {
  display: flex; flex-direction: column; gap: .8rem;
  padding: 28px;
  position: relative;
}
.plan.featured {
  border-color: rgba(79, 124, 255, .55);
  background: linear-gradient(170deg, rgba(79, 124, 255, .12), rgba(255, 255, 255, .03));
  box-shadow: var(--glow);
}
.plan .tag {
  position: absolute; top: -12px; left: 28px;
  padding: .25rem .7rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #6d5bff);
  color: #fff; font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.plan .price { font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.plan .price small { font-size: .95rem; font-weight: 500; color: var(--muted); font-family: var(--font); }
.plan ul { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.plan li { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; color: var(--muted); }
.plan li svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 3px; color: var(--ok); }
.plan .btn { margin-top: .5rem; }

.compare { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: .92rem; }
.compare th, .compare td { padding: .75rem .8rem; text-align: left; border-bottom: 1px solid var(--border); }
.compare thead th { color: var(--text); font-family: var(--font-head); font-weight: 600; }
.compare tbody td { color: var(--muted); }
.compare tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.compare td.yes { color: var(--ok); }
.compare .scroll { overflow-x: auto; }

/* -------------------------------------------------------------- faq + blog */

.faq-list { display: grid; gap: 10px; }
details.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 4px 18px;
}
details.faq-item summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '';
  width: 10px; height: 10px; flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
details.faq-item[open] summary::after { transform: rotate(-135deg); }
details.faq-item p { margin: 0 0 14px; font-size: .94rem; }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post { display: flex; flex-direction: column; gap: .5rem; }
.post .cover {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 124, 255, .3), rgba(34, 211, 238, .14));
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: #cfe0ff;
}
.post .cover svg { width: 30px; height: 30px; opacity: .8; }
.post h3 { margin: 0; }
.post h3 a { color: var(--text); }
.post h3 a:hover { color: var(--brand-2); text-decoration: none; }
.post .meta { font-size: .8rem; color: var(--muted); }

/* -------------------------------------------------------------------- CTA */

.cta-band {
  border-radius: 26px;
  border: 1px solid rgba(79, 124, 255, .38);
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(79, 124, 255, .3), transparent 70%),
    radial-gradient(500px 280px at 90% 100%, rgba(34, 211, 238, .18), transparent 70%),
    rgba(10, 17, 32, .7);
  padding: 56px 40px;
  text-align: center;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 52px 0 34px;
  background: rgba(4, 7, 14, .55);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
}
.site-footer h4 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.site-footer a { color: var(--muted); font-size: .92rem; }
.site-footer a:hover { color: var(--text); }
.site-footer .bottom {
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .85rem; color: var(--muted);
}
.trademark {
  font-size: .78rem;
  color: rgba(154, 168, 199, .72);
  margin-top: 10px;
}

/* ------------------------------------------------------------------- forms */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 46px;
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(4, 8, 16, .6);
  color: var(--text);
  font: 400 .95rem var(--font);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 124, .22);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(154, 168, 199, .6); }

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

.lang-select {
  min-height: 40px;
  padding: .4rem .6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 500 .88rem var(--font);
  cursor: pointer;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #0f1a30;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: .8rem 1.2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 90;
  font-size: .92rem;
}
.toast.err { border-color: rgba(239, 68, 68, .6); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .bento .card.wide, .bento .card.narrow, .bento .card.half { grid-column: span 6; }
  .roles, .plans, .posts { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: .2rem;
    padding: 12px 22px 18px;
    background: rgba(6, 10, 20, .97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .site-actions .btn.ghost { display: none; }
  .section { padding: 62px 0; }
  .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .floating.one { right: 4px; top: -14px; }
  .floating.two { left: 4px; bottom: -18px; }
}

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

@media (prefers-contrast: more) {
  :root { --muted: #c3cce4; --border: rgba(255, 255, 255, .22); }
}
