/* =============================================================
   Calisthenics Chillout — style.css
   -------------------------------------------------------------
   TABLE OF CONTENTS
   0.  Design tokens (:root)
   1.  Reset & base
   2.  Layout & backdrop
   3.  Hero
   4.  Link buttons (linktree)
   5.  Chips & about
   6.  Legal views
   7.  Footer
   8.  Consent banner
   9.  Reveal animation
   10. Responsive (min-width breakpoints)
   11. Accessibility & fallbacks
   ============================================================= */

/* ---------- 0. Design tokens ---------- */
:root {
  --bg:            #070d0a;
  --bg-2:          #0e1c16;
  --surface:       rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text:          #eaf3ee;
  --text-muted:    #9db0a6;
  --text-dim:      #6f8478;

  --accent:        #7bdcb5;
  --accent-strong: #a6f0d0;
  --accent-ink:    #06110c;
  --accent-glow:   rgba(123, 220, 181, 0.18);

  --container:     32rem;   /* 512px */

  --radius-sm:   0.75rem;
  --radius-md:   1.1rem;
  --radius-lg:   1.5rem;
  --radius-pill: 9999px;

  --ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --trans: 0.25s var(--ease);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- 1. Reset & base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

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

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  z-index: 100;
  transition: top var(--trans);
}
.skip-link:focus { top: 0.75rem; }

/* ---------- 2. Layout & backdrop ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 50% -10%, var(--accent-glow), transparent 60%),
    radial-gradient(50rem 50rem at 85% 15%, rgba(80, 160, 130, 0.08), transparent 55%),
    linear-gradient(160deg, var(--bg-2) 0%, var(--bg) 55%);
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.view { display: block; }
.view[hidden] { display: none; }

/* ---------- 3. Hero ---------- */
.hero {
  text-align: center;
  padding: 2rem 0 1.75rem;
}
.hero-logo-link {
  display: inline-block;
  margin-bottom: 1.1rem;
  line-height: 0;
  border-radius: var(--radius-md);
  transition: transform var(--trans);
}
.hero-logo-link:hover { transform: translateY(-2px); }
.hero-mark {
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.hero-title {
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  margin-bottom: 0.7rem;
}
.hero-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 24rem;
  margin: 0 auto;
  text-wrap: balance;
}
.hero-schedule {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.1rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(123, 220, 181, 0.3);
  background: rgba(123, 220, 181, 0.08);
  border-radius: var(--radius-pill);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero-schedule svg { width: 1rem; height: 1rem; flex: 0 0 auto; }

/* ---------- 4. Link buttons (linktree) ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0.5rem 0 1.75rem;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--trans), background var(--trans),
              border-color var(--trans), box-shadow var(--trans);
}
.link-btn:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}
.link-btn:active { transform: translateY(0); }

.link-btn--feature {
  border-color: rgba(123, 220, 181, 0.35);
  background: linear-gradient(180deg, rgba(123, 220, 181, 0.12), rgba(123, 220, 181, 0.04));
  box-shadow: 0 0 0 1px rgba(123, 220, 181, 0.06), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.link-btn--feature:hover {
  border-color: rgba(123, 220, 181, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 40px rgba(123, 220, 181, 0.1);
}

.link-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  color: var(--accent);
}
.link-btn--feature .link-icon { background: rgba(6, 17, 12, 0.4); color: var(--accent-strong); }
.link-icon svg { width: 1.5rem; height: 1.5rem; }

.link-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.link-title { font-weight: 600; font-size: 1.02rem; }
.link-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  flex: 0 0 auto;
  color: var(--text-dim);
  transition: color var(--trans), transform var(--trans);
}
.link-arrow svg { width: 1.15rem; height: 1.15rem; display: block; }
.link-btn:hover .link-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- 5. Chips & about ---------- */
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.chips li {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.about {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 27rem;
  margin: 0 auto;
  text-wrap: pretty;
}

/* ---------- 6. Legal views ---------- */
.legal { padding-top: 1.5rem; }
.legal h1 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.legal h2 {
  font-size: 1rem;
  margin: 1.4rem 0 0.4rem;
  color: var(--accent);
}
.legal p, .legal ul { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 0.6rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.05rem 0.35rem;
  border-radius: 0.4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: color var(--trans), border-color var(--trans);
}
.back-link:hover { color: var(--text); border-color: var(--border-strong); }
.back-link svg { width: 1.05rem; height: 1.05rem; }

/* ---------- 7. Footer ---------- */
.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 1.5rem 1.25rem 2rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.footer-meta { margin-bottom: 0.35rem; }
.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.footer-links a, .link-reset {
  color: var(--text-muted);
  transition: color var(--trans);
}
.footer-links a:hover, .link-reset:hover { color: var(--accent); }
.link-reset {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

/* ---------- 8. Consent banner ---------- */
.consent {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: calc(100% - 1.5rem);
  max-width: 32rem;
  z-index: 60;
  background: rgba(14, 28, 22, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.consent[hidden] { display: none; }
.consent-inner { padding: 1.1rem 1.15rem; }
.consent-title { font-size: 1rem; margin-bottom: 0.35rem; }
.consent-text { color: var(--text-muted); font-size: 0.86rem; margin-bottom: 0.9rem; }
.consent-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
  flex: 1 1 auto;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--trans), background var(--trans), border-color var(--trans);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); }

/* ---------- 9. Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 10. Responsive ---------- */
@media (min-width: 640px) {
  main { padding-bottom: 3rem; }
  .hero { padding-top: 2.5rem; }
  .hero-mark { width: 108px; height: 108px; }
  .link-btn { padding: 1.05rem 1.2rem; }
}

/* ---------- 11. Accessibility & fallbacks ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Without JavaScript, never keep content hidden and show every view */
@media (scripting: none) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .view[hidden] { display: block !important; }
  .consent { display: none !important; }
}
