/* GymMaster — Docs & Landing
   Design system Arborae — HTML + CSS, zero build step
*/

:root {
  /* Brand palette — allineata ad Arborae */
  --bg: #070b0a;
  --bg-soft: #0b1110;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-hover: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(95, 179, 166, 0.35);

  --text: #eef4f2;
  --muted: #9db3ad;
  --dim: #64756f;

  --brand: #00b585;
  --brand-soft: #34d399;
  --teal: #5fb3a6;

  --gradient: linear-gradient(120deg, var(--brand-soft), var(--teal));

  --radius: 18px;
  --radius-lg: 24px;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

::selection { background: rgba(0, 181, 133, 0.35); }

img { max-width: 100%; border-radius: 8px; }

/* --- Background --- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(0, 181, 133, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 110%, rgba(95, 179, 166, 0.08), transparent 60%),
    var(--bg);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 80%);
}

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  font-weight: 700;
  line-height: 1.06;
  margin-bottom: 24px;
}

h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 12px; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }

p { margin: 0 0 16px; color: var(--muted); }

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

.accent-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(7, 11, 10, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-main {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; gap: 10px; align-items: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--brand);
  color: #04110d;
}

.btn.primary:hover {
  background: var(--brand-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 181, 133, 0.25);
}

.btn.ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn.ghost:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.btn.small { padding: 7px 14px; font-size: 0.85rem; border-radius: 8px; }

/* --- Hero --- */
.hero {
  padding: 150px 0 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 181, 133, 0.08);
  border: 1px solid rgba(0, 181, 133, 0.25);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brand-soft);
  margin-bottom: 28px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-soft);
  box-shadow: 0 0 12px var(--brand-soft);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.lead {
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 34px;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.topics { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 34px; }

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}

.pill:hover { border-color: var(--border-hover); color: var(--teal); }

/* --- App window frame --- */
.window {
  background: rgba(10, 16, 15, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 80px -30px rgba(0, 181, 133, 0.25);
}

.hero .window {
  max-width: 320px;
  max-height: 480px;
  margin-left: auto;
  position: relative;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero .window::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(10, 16, 15, 0.98));
  pointer-events: none;
}

.hero .window img {
  display: block;
  width: 100%;
  height: 446px;
  object-fit: cover;
  object-position: top;
}

.hero .window:hover {
  transform: perspective(1200px) rotateY(0) rotateX(0);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 100px -20px rgba(0, 181, 133, 0.35);
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.win-dot { width: 11px; height: 11px; border-radius: 50%; }
.win-dot.r { background: #ff5f57; }
.win-dot.y { background: #febc2e; }
.win-dot.g { background: #28c840; }

.win-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
}

.window img { display: block; width: 100%; border-radius: 0; }

/* --- Sections --- */
.section { padding-top: 96px; padding-bottom: 96px; }
.section-head { margin-bottom: 48px; max-width: 640px; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}

/* --- Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.card:hover {
  background: var(--panel-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; margin: 0; }
.card-icon { font-size: 1.4rem; margin-bottom: 14px; display: block; }

/* --- Screenshots gallery --- */
.shots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.shot { display: flex; flex-direction: column; gap: 10px; }
.shot figcaption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--dim); text-align: center; }
figure.shot { margin: 0; }

/* --- Code blocks --- */
pre, .code-block {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #c9e3db;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

pre code { background: none; border: none; padding: 0; font-size: inherit; }

.quickstart {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.quickstart .hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 14px 0 0;
}

/* --- CTA --- */
.cta-box {
  margin-top: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 181, 133, 0.1), rgba(95, 179, 166, 0.05));
  border: 1px solid rgba(0, 181, 133, 0.25);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-box h3 { font-size: 1.4rem; }
.cta-box p { margin: 6px 0 0; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 36px;
  padding-bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 0.88rem;
}

.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-right { display: flex; gap: 22px; }
.footer-right a { color: var(--dim); transition: color 0.2s; }
.footer-right a:hover { color: var(--text); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .hero .window { transform: none; }
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 130px; }
  .hero .window { transform: none; max-width: 500px; margin: 0 auto; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .shots-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .shots-grid { grid-template-columns: 1fr; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .cta-box { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .footer { flex-direction: column; align-items: flex-start; }
}
