/* ============================================================
   Forge Fitness — Custom CSS
   Font system: Barlow Condensed (display), Barlow (labels),
                Inter (body), JetBrains Mono (data/code only)
   ============================================================ */

/* ── CSS custom properties ───────────────────────────────── */
:root {
  --font-display: 'Barlow Condensed', sans-serif;
  --font-label:   'Barlow', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --color-bg:     #1E2428;
  --color-card:   #282E33;
  --color-green:  #66CC66;
  --color-green-dark: #4DA64D;
  --color-orange: #FF8C00;
  --color-red:    #FF4444;
  --color-secondary: #B3B3B3;
  --color-muted:  #666666;
}

/* ── Base typography ─────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

/* ── Selection ───────────────────────────────────────────── */
::selection {
  background: rgba(102, 204, 102, 0.25);
  color: #fff;
}

/* ── Scrollbar (WebKit) ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1E2428; }
::-webkit-scrollbar-thumb { background: #3a4248; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #66CC66; }

/* ── Forge Logo — Draw-on entrance animation ─────────────── */

/* Glow bloom behind the hero logo */
#forge-hero-glow {
  animation: heroPulse 4s ease-in-out infinite;
  transform-origin: center center;
}
@keyframes heroPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(1.06); }
}

/* Draw-on: the SVG paths start with full stroke-dashoffset and animate to 0 */
.forge-draw-path {
  fill-opacity: 0;
  stroke: #88CC00;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Stage 1: stroke draws in */
.forge-draw-path.animate {
  animation:
    drawStroke  1.1s ease-in-out forwards,
    fillFadeIn  0.5s ease-out 0.85s forwards,
    strokeFade  0.3s ease-in  1.1s  forwards;
}

.forge-draw-path.animate:nth-child(2) {
  animation:
    drawStroke  1.3s ease-in-out 0.1s forwards,
    fillFadeIn  0.5s ease-out    1.0s forwards,
    strokeFade  0.3s ease-in     1.3s forwards;
}

@keyframes drawStroke {
  from { stroke-dashoffset: var(--path-length, 2000); }
  to   { stroke-dashoffset: 0; }
}

@keyframes fillFadeIn {
  from { fill-opacity: 0; }
  to   { fill-opacity: 1; }
}

@keyframes strokeFade {
  from { stroke-width: 3; stroke-opacity: 1; }
  to   { stroke-width: 0; stroke-opacity: 0; }
}

/* ── Particle canvas ─────────────────────────────────────── */
#hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Section spacing ─────────────────────────────────────── */
.section {
  padding-top: 56px;
  padding-bottom: 56px;
}

.section-sm {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* ── Cards ───────────────────────────────────────────────── */
.forge-card {
  background: var(--color-card);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  isolation: isolate;
}
.forge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  border-color: rgba(102,204,102,0.3);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--color-green);
  color: #000;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover  { background: var(--color-green-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: var(--color-green);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1.5px solid var(--color-green);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-secondary:hover { background: rgba(102,204,102,0.1); }

/* ── Section label ───────────────────────────────────────── */
.section-label {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-green);
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Gradient text ───────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #C8E820, #66CC66, #4A8A00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Pills / badges ──────────────────────────────────────── */
.forge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.forge-pill-green  { background: rgba(102,204,102,0.15); color: #66CC66; }
.forge-pill-orange { background: rgba(255,140,  0,0.15); color: #FF8C00; }
.forge-pill-red    { background: rgba(255, 68, 68,0.15); color: #FF4444; }
.forge-pill-gray   { background: rgba(255,255,255,0.08); color: #B3B3B3; }

/* ── Feature icon containers ─────────────────────────────── */
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(102,204,102,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 1rem;
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-green);
}

/* ── Lock icon (research page) ───────────────────────────── */
.research-lock-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  filter: drop-shadow(0 0 16px rgba(102,204,102,0.4));
  animation: lockFloat 4s ease-in-out infinite;
  margin: 0 auto 1.5rem;
}
.research-lock-icon svg {
  width: 72px;
  height: 72px;
}
@keyframes lockFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── Phone mockup ────────────────────────────────────────── */
.phone-mockup {
  width: 260px;
  min-height: 500px;
  background: #151a1e;
  border-radius: 36px;
  border: 1px solid rgba(102,204,102,0.25);
  box-shadow: 0 0 60px rgba(102,204,102,0.1), 0 20px 60px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.25rem 1.5rem;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

/* ── Side-by-side showcase ───────────────────────────────── */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .showcase-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}
.showcase-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── Subscription tier cards ─────────────────────────────── */
.tier-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--color-card);
  transition: border-color 150ms ease, transform 150ms ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tier-card:hover { border-color: rgba(102,204,102,0.3); transform: translateY(-2px); }
.tier-card.featured {
  border-color: var(--color-green);
  box-shadow: 0 0 28px rgba(102,204,102,0.15);
}

/* ── Scroll-reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
  isolation: isolate;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Blog markdown (prose-forge) ─────────────────────────── */
.prose-forge {
  color: var(--color-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
  font-family: var(--font-body);
}
.prose-forge h1, .prose-forge h2, .prose-forge h3 {
  font-family: var(--font-display);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.prose-forge h1 { font-size: 2rem; }
.prose-forge h2 { font-size: 1.5rem; }
.prose-forge h3 { font-size: 1.2rem; }
.prose-forge p  { margin-bottom: 1.25rem; }
.prose-forge a  { color: var(--color-green); text-decoration: underline; text-underline-offset: 3px; }
.prose-forge a:hover { color: #88EE44; }
.prose-forge strong { color: #fff; }
.prose-forge ul, .prose-forge ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose-forge li { margin-bottom: 0.4rem; }
.prose-forge blockquote {
  border-left: 3px solid var(--color-green);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #888;
  font-style: italic;
}
.prose-forge code {
  font-family: var(--font-mono);
  background: rgba(102,204,102,0.1);
  color: #88EE44;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
}
.prose-forge pre {
  background: #181c20;
  border-radius: 10px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,0.07);
}
.prose-forge pre code { background: none; padding: 0; color: #88EE44; }
.prose-forge img { border-radius: 10px; margin: 1.5rem 0; max-width: 100%; }
.prose-forge hr { border-color: rgba(255,255,255,0.08); margin: 2rem 0; }
.prose-forge table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.prose-forge th {
  font-family: var(--font-label);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-green);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.prose-forge td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--color-secondary);
}

/* ── Nav active underline ────────────────────────────────── */
.nav-link {
  position: relative;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-secondary);
  transition: color 150ms ease;
  text-decoration: none;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-green);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 150ms ease;
  transform-origin: left center;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--color-green); }
