/* ============================================================
   LOOPVILLE TCG — STYLES

   Palette: Emerald & Magenta on a light base.
     • Green  (--accent)   = primary actions, links, active marks
     • Pink   (--accent-2) = secondary highlight (the "TCG" tag,
                             card hovers, the holo card)
   Change colors here; change content in config.js.

   Display font is "Gila" (self-hosted — drop the font file into
   assets/fonts/, see @font-face below). It falls back to
   Space Grotesk until that file is present, so the layout is
   never broken by a missing font.
   ============================================================ */

/* ---------- FONTS ---------- */
/* Gila — self-hosted display font (by Khurasan). Regular + Bold
   live in assets/fonts/. Space Grotesk is the fallback if a file
   is ever missing. */
@font-face {
  font-family: "Gila";
  src: url("assets/fonts/gila.otf") format("opentype"),
       url("assets/fonts/gila.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gila";
  src: url("assets/fonts/gila-bold.otf") format("opentype"),
       url("assets/fonts/gila-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "Gila", "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;

  --max-width: 1120px;
  --radius: 4px;

  /* Neutrals (light) */
  --bg: #f6f6f3;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-soft: #565b66;
  --ink-faint: #9297a3;
  --line: #e4e3dd;
  --nav-bg: rgba(246, 246, 243, 0.9);

  /* Brand hues (Emerald & Magenta) */
  --brand-green: #10b981;
  --brand-green-deep: #059669;
  --brand-green-deeper: #047857;
  --brand-pink: #ec4899;
  --brand-pink-deep: #db2777;

  /* Semantic accents */
  --accent: var(--brand-green-deep);
  --accent-strong: var(--brand-green-deeper);
  --accent-2: var(--brand-pink-deep);
  --accent-ink: #ffffff;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
}

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

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

img { max-width: 100%; display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--accent:hover { background: var(--accent-strong); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink-soft); }

/* ---------- NAV ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Logo image — the horizontal LOOPVILLE wordmark, links to home. */
.nav__logo-img {
  height: 30px;
  width: auto;
  display: block;
}

/* Collapsible region: links + socials + subscribe.
   A flex row on desktop; a dropdown panel on mobile. */
.nav__collapse {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  margin-right: auto;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.nav__links a {
  position: relative;
  padding-bottom: 2px;
}

.nav__links a:hover { color: var(--ink); }

.nav__links a.is-active { color: var(--ink); }

.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Social icons in the nav */
.nav__socials {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav__social {
  display: inline-flex;
  color: var(--ink-soft);
  transition: color 0.15s ease, transform 0.15s ease;
}

.nav__social:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.nav__social svg {
  width: 20px;
  height: 20px;
  display: block;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- HERO ---------- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.hero__headline {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.hero__subhead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 1.25rem 0 2rem;
}

.hero__ctas {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero__art {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__card {
  width: 250px;
  height: auto;
  border-radius: 12px;
  transform: rotate(-6deg);
  box-shadow: 0 30px 55px -22px rgba(0, 0, 0, 0.4);
}

.hero__since {
  position: absolute;
  bottom: -1.6rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-weight: 500;
}

/* ---------- STATS STRIP (Home) ---------- */

.stats-strip {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.stat__label {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- SECTIONS (shared) ---------- */

.section__head {
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.section__head p {
  color: var(--ink-soft);
  margin: 0;
}

.videos, .about, .contact, .blog {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--line);
}

/* ---------- BLOG (index + single post) ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.blog-grid__status {
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.post-card__thumb {
  aspect-ratio: 16 / 9;
  background: #0f1115;
  overflow: hidden;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card__thumb--empty {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-pink));
  opacity: 0.85;
}

.post-card__body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.post-card__cat {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.25;
  margin: 0;
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.post-card__date {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0.2rem 0 0;
  margin-top: auto;
}

/* Single post */
.post {
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.post__status {
  color: var(--ink-faint);
}

.post__back {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.post__back:hover { text-decoration: underline; }

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}
.post__cat {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.post__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1.5rem;
}

.post__hero {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.post__body {
  font-size: 1.02rem;
  color: var(--ink);
}
.post__body h2,
.post__body h3 {
  font-family: var(--font-display);
  margin: 2rem 0 0.75rem;
}
.post__body h2 { font-size: 1.5rem; }
.post__body h3 { font-size: 1.2rem; }
.post__body p { margin: 0 0 1.1rem; }
.post__body ul,
.post__body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.post__body li { margin-bottom: 0.4rem; }
.post__body a { color: var(--accent); text-decoration: underline; }
.post__body img { border-radius: var(--radius); margin: 1.5rem 0; }
.post__body code {
  background: var(--line);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}
.post__body pre {
  background: #0f1115;
  color: #f6f6f3;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0 0 1.4rem;
}
.post__body pre code { background: none; padding: 0; }
.post__body blockquote {
  margin: 0 0 1.2rem;
  padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 3px solid var(--accent-2);
  color: var(--ink-soft);
}
.post__body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

/* ---------- VIDEOS ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.video-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.video-card__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f1115;
}

.video-card__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card__body {
  padding: 1rem 1.1rem 1.2rem;
}

.video-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}

.video-card__date {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin: 0;
}

.video-grid__status {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

.section__cta {
  margin-top: 2rem;
}

/* ---------- ABOUT ---------- */

.members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.member {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.member__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--line);
  object-fit: cover;
}

.member__name {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

.member__role {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
}

.member__bio {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}

.achievements {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.achievements h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.achievements ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.achievements li {
  padding-left: 1.2rem;
  position: relative;
  color: var(--ink-soft);
}

.achievements li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- CONTACT ---------- */

.contact__intro {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 0 2.5rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 760px;
}

.contact__block-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.6rem;
}

.contact__link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--accent);
  word-break: break-word;
}

.contact__link:hover { color: var(--accent-strong); }

.contact__socials {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact__socials a {
  display: inline-flex;
  color: var(--ink-soft);
  transition: color 0.15s ease, transform 0.15s ease;
}

.contact__socials a:hover { color: var(--accent); transform: translateY(-1px); }

.contact__socials svg { width: 24px; height: 24px; display: block; }

.contact__note {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin: 2.5rem 0 0;
}

/* ---------- FOOTER ---------- */

.footer {
  border-top: 1px solid var(--line);
}

.footer__partners {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0.5rem;
}

.footer__partners-label {
  color: var(--ink-faint);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.partners__strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
}

.partners__item {
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.partners__item:hover { opacity: 1; }

.partners__item img {
  max-height: 44px;
  width: auto;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.footer__socials {
  display: flex;
  gap: 1rem;
}

.footer__socials a:hover { color: var(--ink); }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3rem;
  }
  .hero__art { order: -1; margin-bottom: 1.5rem; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav__toggle {
    display: flex;
    margin-left: auto;
  }

  /* Collapse becomes a dropdown panel under the header. */
  .nav__collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.3);
    padding: 1.25rem 1.5rem 1.6rem;
  }

  .nav__collapse.is-open { display: flex; }

  .nav__links {
    flex-direction: column;
    gap: 1rem;
    margin-right: 0;
    width: 100%;
    font-size: 1rem;
  }

  .nav__links a.is-active::after { display: none; }
  .nav__links a.is-active { color: var(--accent); font-weight: 600; }

  .nav__socials { gap: 1.1rem; }
  .nav__social svg { width: 22px; height: 22px; }

  .video-grid { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; gap: 0.75rem; text-align: center; }
  .footer__socials { justify-content: center; flex-wrap: wrap; }
}
