/* ==========================================================================
   GYLF Pulse — design tokens
   ========================================================================== */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Poppins', var(--font-sans);

  --color-bg: #ffffff;
  --color-bg-soft: #eef1f8;
  --color-bg-muted: #f6f8fb;
  --color-text: #1a2b49;
  --color-text-muted: #5b6472;
  --color-border: #e6e9f1;

  --color-primary: #2e5eaa;
  --color-primary-dark: #1b3358;
  --color-primary-darker: #142744;

  --color-accent-yellow: #f6cb43;
  --color-accent-tan: #ddc9a3;
  --color-accent-tan-dark: #cbb384;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card: 0 1px 2px rgba(20, 39, 68, 0.04), 0 8px 24px rgba(20, 39, 68, 0.06);
  --shadow-card-hover: 0 4px 8px rgba(20, 39, 68, 0.06), 0 16px 32px rgba(20, 39, 68, 0.10);

  --container-width: 1200px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

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

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

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

p { margin: 0; }

button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.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: -999px;
  top: 0;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--color-primary-dark); color: #fff; }
.btn-primary:hover { background: var(--color-primary-darker); }

.btn-tan { background: var(--color-accent-tan); color: var(--color-primary-darker); }
.btn-tan:hover { background: var(--color-accent-tan-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
  padding: 10px 18px;
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

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

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-size: 420% auto;
  background-position: 2% 40%;
  box-shadow: inset 0 0 0 1px rgba(20, 39, 68, 0.08);
  flex-shrink: 0;
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
}
.brand__word strong { font-weight: 800; }

.main-nav {
  display: none;
  align-items: center;
  gap: 32px;
}

.main-nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav__link:hover { color: var(--color-text); }
.main-nav__link--active { color: var(--color-primary); border-color: var(--color-primary); }

.site-header__actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--color-border);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__link {
  padding: 12px 4px;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav__cta { justify-content: center; margin-top: 12px; }

@media (min-width: 860px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { background: var(--color-bg-soft); padding-block: 48px; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.hero__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-darker), var(--color-primary));
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.hero__media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
}
.hero__media-month { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.05em; }
.hero__media-year { font-size: 3rem; font-weight: 800; opacity: 0.85; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}
.tag--new { background: var(--color-accent-yellow); color: #5c4300; }
.tag--special { background: var(--color-accent-tan); color: var(--color-primary-darker); }

.hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.hero__description {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  max-width: 54ch;
  margin-bottom: 28px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 860px) {
  .hero { padding-block: 72px; }
  .hero__grid { grid-template-columns: 5fr 6fr; gap: 56px; }
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stats { border-bottom: 1px solid var(--color-border); }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding-block: 40px;
  text-align: center;
}

.stats__item { display: flex; flex-direction: column; gap: 4px; }

.stats__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-primary);
}

.stats__label { font-size: 0.875rem; color: var(--color-text-muted); }

@media (min-width: 640px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Archive
   ========================================================================== */
.archive { background: var(--color-bg-muted); padding-block: 56px; }

.archive__header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.archive__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.archive__subtitle { color: var(--color-text-muted); font-size: 0.9375rem; }

.year-tabs {
  display: flex;
  gap: 6px;
  background: #fff;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  width: fit-content;
}

.year-tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.year-tab:hover { color: var(--color-text); }
.year-tab--active { background: var(--color-primary-dark); color: #fff; }

@media (min-width: 860px) {
  .archive__header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

.edition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .edition-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .edition-grid { grid-template-columns: repeat(3, 1fr); }
}

.edition-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-text-muted);
  padding-block: 32px;
}

.edition-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.edition-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.edition-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-soft);
}
.edition-card__media img { width: 100%; height: 100%; object-fit: cover; }

.edition-card__media-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-darker));
}

.edition-card__month {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(20, 39, 68, 0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.edition-card__body { padding: 20px; }

.edition-card__year {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.edition-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.edition-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: gap 0.15s ease;
}
.edition-card__link:hover { gap: 10px; }

/* ==========================================================================
   Subscribe
   ========================================================================== */
.subscribe { padding-block: 56px; background: var(--color-primary-darker); color: #fff; }

.subscribe__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.subscribe h2 { color: #fff; font-size: 1.5rem; margin-bottom: 8px; }
.subscribe p { color: rgba(255, 255, 255, 0.75); }

.subscribe__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.subscribe__form input {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.9375rem;
  width: 100%;
}
.subscribe__form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.subscribe__form input:focus { outline: 2px solid #fff; outline-offset: 2px; }

@media (min-width: 860px) {
  .subscribe__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .subscribe__form { flex-direction: row; width: auto; min-width: 380px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--color-primary-darker); color: rgba(255, 255, 255, 0.85); padding-block: 40px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

.site-footer__inner {
  display: grid;
  gap: 32px;
}

.site-footer__banner {
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 320px;
  margin-bottom: 12px;
}

.site-footer__tagline { font-size: 0.875rem; color: rgba(255, 255, 255, 0.6); }

.site-footer__about h2 { color: #fff; font-size: 1.125rem; margin-bottom: 8px; }
.site-footer__about p { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.7); max-width: 60ch; }

.site-footer__meta { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.5); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

@media (min-width: 860px) {
  .site-footer__inner { grid-template-columns: 1fr 1.4fr; }
  .site-footer__meta { grid-column: 1 / -1; }
}

/* ==========================================================================
   Flash + toast
   ========================================================================== */
.flash {
  text-align: center;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.flash--success { background: #e7f5ec; color: #1e6b3c; }
.flash--error { background: #fbe9e9; color: #a13030; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-primary-darker);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  box-shadow: var(--shadow-card-hover);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   404
   ========================================================================== */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  font-family: var(--font-display);
}
.not-found h1 { font-size: 4rem; color: var(--color-primary); }
