/* ============================================================
   The Snowboard Journal — Modern Stylesheet
   A clean, responsive, accessible design for a snowboarding
   magazine archive. Pure static CSS, no frameworks.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --color-ink: #1c2b39;          /* deep navy text */
  --color-ink-soft: #4a5a6a;     /* muted text */
  --color-accent: #e05d2a;       /* warm ember orange */
  --color-accent-dark: #c24a1c;
  --color-snow: #f4f7fa;         /* page background */
  --color-surface: #ffffff;      /* cards */
  --color-line: #e2e8f0;         /* borders */
  --color-navy: #16324a;         /* header/footer */
  --color-navy-soft: #1f405e;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(22, 50, 74, 0.08);
  --shadow-lg: 0 12px 34px rgba(22, 50, 74, 0.14);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-snow);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--color-ink); font-weight: 700; }
h1 { font-size: 2.1rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 6px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-soft) 100%);
  color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}
.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.brand-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: #bcd3e6;
  letter-spacing: 0.4px;
}

/* ---------- Navigation ---------- */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  display: block;
  color: #e8f0f7;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  background: var(--color-accent);
  color: #fff;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 1rem;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

/* ---------- Main ---------- */
main { padding: 34px 0 50px; }

.page-head {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--color-line);
}
.page-head .kicker {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 6px;
}
.page-head p.lede {
  font-size: 1.08rem;
  color: var(--color-ink-soft);
  max-width: 70ch;
  margin: 0;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card a.card-link { color: inherit; }
.card a.card-link:hover { text-decoration: none; }
.card-media { aspect-ratio: 3 / 4; background: #eef2f6; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px; }
.card-body h3 { margin-bottom: 6px; }
.card-body p { color: var(--color-ink-soft); font-size: 0.95rem; margin: 0; }
.card-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 6px;
}

/* ---------- Article / prose ---------- */
.article {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  max-width: 860px;
}
.article .byline {
  color: var(--color-ink-soft);
  font-style: italic;
  margin-bottom: 20px;
}
.article p { max-width: 70ch; }
.article .return-link {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
}

/* ---------- Hero (homepage) ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, #0f2436 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 44px 40px;
  margin-bottom: 34px;
  box-shadow: var(--shadow-lg);
}
.hero h1 { color: #fff; font-size: 2.4rem; margin-bottom: 12px; }
.hero p { color: #cfe0ee; font-size: 1.12rem; max-width: 60ch; }
.hero .btn-row { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 8px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--color-accent-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ---------- Section blocks ---------- */
.section { margin-bottom: 40px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-title h2 { margin: 0; }
.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--color-line);
}

/* ---------- Feature list (issue pages) ---------- */
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list .cat {
  flex: 0 0 110px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-accent);
}

/* ---------- Callout / info box ---------- */
.callout {
  background: #eef4fb;
  border-left: 4px solid var(--color-accent);
  border-radius: 6px;
  padding: 18px 20px;
  margin: 20px 0;
}
.callout p:last-child { margin: 0; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--color-ink);
}
.faq details p { margin: 12px 0 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy);
  color: #c7d6e4;
  margin-top: 40px;
  padding: 40px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 24px;
}
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #bcd3e6; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  font-size: 0.85rem;
  color: #8fa8bd;
  text-align: center;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  margin-bottom: 16px;
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: #b0bcc8;
}
.breadcrumbs a { color: var(--color-ink-soft); }
.breadcrumbs [aria-current="page"] { color: var(--color-ink); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.7rem; }
  .hero { padding: 30px 22px; }
  .hero h1 { font-size: 1.9rem; }
  .article { padding: 22px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px; }
  .feature-list li { flex-direction: column; gap: 2px; }
  .feature-list .cat { flex: none; }
}

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