/* ==========================================================================
   Pulse Fitness Studio — design tokens
   Bright, clean, cobalt accent. The signature feature is that every value
   below marked "editable" can be changed live from /admin without a deploy.
   ========================================================================== */

:root {
  --paper:         #F5F6F8;  /* primary background */
  --paper-raised:  #ECEEF2;  /* card / raised surface */
  --ink:           #14171A;  /* primary text */
  --muted:         #565C68;  /* secondary text */
  --line:          rgba(20, 23, 26, 0.10);
  --line-strong:   rgba(20, 23, 26, 0.22);
  --success:       #1F8A5F;  /* confirmation states — kept separate from the editable brand accent */
  --error:         #B3261E;

  /* Editable at runtime: overwritten by js/main.js from the admin's chosen
     theme, so these :root values are only the default before any fetch. */
  --accent:        #2A5DD9;
  --accent-deep:   #1E47AD;
  --accent-tint:   rgba(42, 93, 217, 0.10);

  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-body: "Karla", "Segoe UI", sans-serif;
  --font-mono: "DM Mono", "Consolas", monospace;

  --fs-hero: clamp(2.5rem, 4.8vw + 1rem, 4.75rem);
  --fs-h2: clamp(1.85rem, 2.2vw + 1rem, 2.6rem);
  --fs-h3: clamp(1.2rem, 1vw + 0.9rem, 1.4rem);
  --fs-lead: clamp(1.05rem, 0.5vw + 0.9rem, 1.25rem);

  --wrap: 1240px;
  --gutter: 1.25rem;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) { :root { --gutter: 2rem; } }

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
button { font: inherit; cursor: pointer; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; border-radius: var(--radius);
  z-index: 200; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); display: flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block; }
.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.6; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section-alt { background: var(--paper-raised); }
.section-head { max-width: 38rem; margin-bottom: 2.5rem; }
.section-head h2 { margin-top: 0.85rem; }
.section-head .lead { margin-top: 0.85rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  border-radius: 999px; border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(245, 246, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 1.1rem; gap: 1rem; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
.wordmark__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ==========================================================================
   Hero
   ========================================================================== */

/* Height comes from content (min-height), not the image's own aspect ratio —
   locking the box to the image's ratio clipped the heading on narrow
   screens once the text needed more than ~3 short lines. */
.hero { position: relative; overflow: hidden; min-height: 34rem; display: flex; align-items: center; }
@media (min-width: 700px) { .hero { min-height: 38rem; } }
.hero-figure { position: absolute; inset: 0; z-index: 0; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,23,26,0.35) 0%, rgba(20,23,26,0.55) 100%);
}
.hero-copy {
  position: relative; z-index: 1; width: 100%;
  padding-block: 3rem;
}
.hero-title { font-size: var(--fs-hero); color: #fff; max-width: 20ch; }
.hero-sub { color: rgba(255,255,255,0.85); margin-top: 1.1rem; max-width: 32rem; font-size: var(--fs-lead); }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* ==========================================================================
   Services
   ========================================================================== */

.service-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -20px rgba(20,23,26,0.25); }
.service-card__icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.service-card h3 { font-size: var(--fs-h3); }
.service-card p { color: var(--muted); margin-top: 0.65rem; font-size: 0.95rem; }

/* ==========================================================================
   Testimonial
   ========================================================================== */

.quote-block { max-width: 40rem; margin-inline: auto; text-align: center; }
.quote-block blockquote { font-family: var(--font-display); font-size: clamp(1.3rem, 1.6vw + 1rem, 1.7rem); font-weight: 500; line-height: 1.45; }
.quote-block cite { display: block; margin-top: 1.25rem; font-style: normal; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }

/* ==========================================================================
   Gallery / about split
   ========================================================================== */

.about-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.about-figure { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.about-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 20rem; display: flex; align-items: center;
}
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: rgba(20,23,26,0.6); }
.cta-band__inner { position: relative; z-index: 1; padding: 3rem; color: #fff; max-width: 30rem; }
.cta-band__inner h2 { color: #fff; }
.cta-band__inner p { color: rgba(255,255,255,0.85); margin-top: 0.85rem; }
.cta-band__inner .btn { margin-top: 1.5rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; text-align: center; }
.site-footer p { color: var(--muted); font-size: 0.88rem; }
.site-footer a { color: var(--accent); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--reveal-delay, 0s); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   Loading / empty states (while content fetches from Supabase)
   ========================================================================== */

.skeleton { background: linear-gradient(90deg, var(--paper-raised) 25%, #fff 37%, var(--paper-raised) 63%); background-size: 400% 100%; animation: skeleton-shimmer 1.4s ease infinite; border-radius: 6px; }
@keyframes skeleton-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.load-error { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }

.mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted); }
