/* ==========================================================================
   Forgeyn blog — blog.forgeyn.com
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --text: #202124;
  --text-2: #5f6368;
  --accent: #1a73e8;
  --accent-strong: #1765cc;
  --accent-soft: rgba(26, 115, 232, 0.08);
  --on-accent: #ffffff;
  --border: #e8eaed;
  --border-strong: #dadce0;
  --error: #d93025;
  --footer-bg: #202124;
  --footer-text: #9aa0a6;
  --footer-link: #dadce0;
  --hover-bg: rgba(60, 64, 67, 0.08);
  --shadow-1: 0 1px 3px rgba(60, 64, 67, 0.15);
  --shadow-2: 0 4px 8px 3px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
  --shadow-panel: 0 8px 24px rgba(60, 64, 67, 0.18);
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 64px;
  --page: 1240px;
  --font-head: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

[data-theme='dark'] {
  --bg: #131314;
  --surface: #1e1f20;
  --surface-2: #191a1b;
  --text: #e3e3e3;
  --text-2: #9aa0a6;
  --accent: #8ab4f8;
  --accent-strong: #aecbfa;
  --accent-soft: rgba(138, 180, 248, 0.12);
  --on-accent: #202124;
  --border: #2d2e30;
  --border-strong: #3c4043;
  --error: #f28b82;
  --footer-bg: #131314;
  --footer-text: #9aa0a6;
  --footer-link: #c4c7c5;
  --hover-bg: rgba(232, 234, 237, 0.1);
  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 10px 3px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.55);
  --shadow-panel: 0 8px 24px rgba(0, 0, 0, 0.55);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.25; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

button { font-family: inherit; color: inherit; }

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

::selection { background: var(--accent); color: var(--on-accent); }

[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 400;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 18px; border-radius: 8px; font-weight: 500;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-strong); text-decoration: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--hover-bg); color: var(--text); }
.icon-btn svg { width: 21px; height: 21px; }

/* Theme toggle icon swap */
.icon-sun { display: none; }
[data-theme='dark'] .icon-sun { display: block; }
[data-theme='dark'] .icon-moon { display: none; }

/* ==========================================================================
   Header / uni-nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border-strong);
}
.header-inner {
  max-width: var(--page); margin: 0 auto; padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 26px;
}

.brand {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 22px;
}
.brand:hover { text-decoration: none; }
.brand__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none; margin-left: 2px;
}
.brand__tag {
  margin-left: 12px; padding-left: 14px;
  border-left: 1px solid var(--border-strong);
  font-family: var(--font-body); font-weight: 400; font-size: 14px;
  color: var(--text-2); white-space: nowrap;
}

/* --- Primary nav (desktop) --- */
.main-nav { display: flex; margin-left: 6px; }
.nav-list { display: flex; align-items: stretch; }
.nav-item { position: static; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; margin: 0 2px;
  border: 0; background: none; border-radius: 8px;
  font-family: var(--font-body); font-size: 15.5px; font-weight: 500;
  color: var(--text-2); cursor: pointer; text-decoration: none;
}
.nav-link:hover { color: var(--text); background: var(--hover-bg); text-decoration: none; }
.nav-link__chevron { width: 18px; height: 18px; transition: transform 0.2s ease; }
.nav-item.is-open > .nav-link { color: var(--text); background: var(--hover-bg); }
.nav-item.is-open .nav-link__chevron { transform: rotate(180deg); }

/* --- Mega dropdown panel (full bleed under header) --- */
.nav-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 99;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-panel);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  pointer-events: none;
  transition: visibility 0s 0.2s, opacity 0.2s ease, transform 0.2s ease;
}
.nav-item.is-open .nav-panel {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  transition: visibility 0s, opacity 0.2s ease, transform 0.2s ease;
}
.panel-inner { max-width: var(--page); margin: 0 auto; padding: 32px 24px 26px; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 22px;
}
.panel-title { font-size: 22px; font-weight: 600; }
.see-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
}
.see-all svg { width: 17px; height: 17px; }
.panel-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px 40px;
}
.panel-group__title {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  color: var(--text-2); letter-spacing: 0.3px; margin-bottom: 8px;
}
.panel-links a {
  display: block; padding: 6px 0;
  font-size: 16.5px; color: var(--text); text-decoration: none;
}
.panel-links a:hover { color: var(--accent); text-decoration: underline; }
.panel-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--border);
}
.panel-foot__label {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  color: var(--text-2);
}
.learn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
}
.learn-link svg { width: 17px; height: 17px; }

/* --- Header actions --- */
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.region-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px; background: none;
  font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer;
}
.region-btn:hover { background: var(--hover-bg); color: var(--text); }
.region-btn svg { width: 19px; height: 19px; }
.region-menu {
  position: absolute; top: calc(100% + 10px); right: 24px; z-index: 98;
  min-width: 240px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-panel);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: visibility 0s 0.15s, opacity 0.15s ease, transform 0.15s ease;
}
.region-menu.is-open {
  visibility: visible; opacity: 1; transform: none;
  transition: visibility 0s, opacity 0.15s ease, transform 0.15s ease;
}
.region-menu__current {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 500; color: var(--text); margin-bottom: 6px;
}
.region-menu__current svg { width: 17px; height: 17px; color: var(--accent); }
.region-menu__note { font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; }
.region-menu__link { font-size: 14.5px; font-weight: 500; }

.menu-btn { display: none; }

/* --- Mobile menu (< 1024px) --- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 300;
  background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  visibility: hidden; opacity: 0;
  transition: visibility 0s 0.25s, opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu.is-open {
  transform: none; visibility: visible; opacity: 1;
  transition: visibility 0s, opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu__bar {
  height: var(--header-h); flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--border);
}
.mobile-menu__body { flex: 1; overflow-y: auto; padding: 18px 24px 40px; }
.mm-link {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  padding: 15px 4px; border: 0; background: none;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body); font-size: 17px; font-weight: 500;
  color: var(--text); cursor: pointer; text-align: left; text-decoration: none;
}
a.mm-link:hover { text-decoration: none; color: var(--accent); }
.mm-link__chevron { width: 20px; height: 20px; color: var(--text-2); transition: transform 0.2s ease; }
.mm-acc.is-open .mm-link__chevron { transform: rotate(180deg); }
.mm-sub {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.mm-sub.is-open { grid-template-rows: 1fr; }
.mm-sub__inner { overflow: hidden; }
.mm-sub a {
  display: block; padding: 10px 4px 10px 16px;
  font-size: 15.5px; color: var(--text-2); border-bottom: 1px solid var(--border);
}
.mm-sub a:hover { color: var(--accent); text-decoration: none; }
.mm-foot { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.mm-foot a { font-size: 15px; font-weight: 500; }

/* ==========================================================================
   Search overlay
   ========================================================================== */
.search-overlay {
  position: fixed; inset: 0; z-index: 350;
  display: flex; align-items: flex-start; justify-content: center;
  padding: min(12vh, 110px) 20px 20px;
}
.search-overlay[hidden] { display: none; }
.search-backdrop {
  position: absolute; inset: 0;
  background: rgba(32, 33, 36, 0.55);
}
[data-theme='dark'] .search-backdrop { background: rgba(0, 0, 0, 0.65); }
.search-panel {
  position: relative; width: min(640px, 100%);
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel); overflow: hidden;
}
.search-input-row { display: flex; align-items: center; }
.search-input-row svg { width: 21px; height: 21px; margin-left: 22px; color: var(--text-2); flex: none; }
.search-input {
  flex: 1; height: 64px; padding: 0 12px 0 14px;
  border: 0; background: none; color: var(--text);
  font-family: var(--font-body); font-size: 17px;
}
.search-input:focus { outline: none; }
.search-input::placeholder { color: var(--text-2); }
.search-close { margin-right: 8px; }
.search-results { border-top: 1px solid var(--border); max-height: 52vh; overflow-y: auto; padding: 8px 0 10px; }
.search-result {
  display: block; width: 100%; padding: 13px 24px;
  border: 0; background: none; text-align: left; cursor: pointer;
  border-radius: 0;
}
.search-result:hover, .search-result:focus-visible {
  background: var(--surface-2); text-decoration: none; outline-offset: -2px;
}
.search-result__top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.search-result__title { font-size: 16px; font-weight: 500; color: var(--text); }
.search-result__meta { font-size: 13px; color: var(--text-2); }
.search-result__snippet {
  margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.search-empty { padding: 26px 24px; color: var(--text-2); font-size: 15.5px; }

/* ==========================================================================
   Cards + hero grid
   ========================================================================== */
.section { padding-top: clamp(48px, 7vw, 84px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-title { font-size: clamp(24px, 3vw, 32px); font-weight: 600; }

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover, .card:focus-within { box-shadow: var(--shadow-2); transform: translateY(-3px); }
.card__media { overflow: hidden; background: var(--surface-2); }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card__media img, .card:focus-within .card__media img { transform: scale(1.035); }
.card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.card__tag {
  display: inline-block; padding: 4px 12px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.2px;
}
.card__title { font-size: 18.5px; font-weight: 600; line-height: 1.35; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--accent); text-decoration: none; }
.card__snippet { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.card__more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 8px;
  font-size: 15px; font-weight: 500; color: var(--accent);
}
.card__more svg { width: 17px; height: 17px; transition: transform 0.2s ease; }
.card:hover .card__more svg { transform: translateX(3px); }
.card__hint { font-size: 13.5px; color: var(--text-2); }
.card__link { color: inherit; }
.card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero grid: 1 large + 4 small */
.hero-grid {
  display: grid; gap: 22px;
  grid-template-columns: 1.35fr 1fr 1fr;
}
.card--large { grid-row: span 2; border-radius: var(--radius-lg); }
.card--large .card__media { flex: 1 1 auto; min-height: 280px; }
.card--large .card__title { font-size: clamp(24px, 2.4vw, 31px); font-weight: 600; line-height: 1.25; }
.card--large .card__snippet { font-size: 16px; }
.card--large .card__body { padding: 24px 28px 28px; gap: 12px; }
.card--small .card__media { aspect-ratio: 16 / 10; }

/* ==========================================================================
   Newsletter band
   ========================================================================== */
.newsletter {
  position: relative;
  margin-top: clamp(56px, 8vw, 100px);
  background-color: var(--bg);
  background-image: url('images/newsletter-bg.png');
  background-size: cover;
  background-position: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.newsletter::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.35) 82%,
    rgba(255, 255, 255, 0.1) 100%);
}
[data-theme='dark'] .newsletter::before { display: none; }
[data-theme='dark'] .newsletter {
  background-image: none;
  background-color: var(--surface-2);
  border-color: var(--border);
}
.newsletter__inner { position: relative; max-width: 640px; padding: clamp(52px, 7vw, 88px) 0; }
.newsletter__title { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; margin-bottom: 12px; }
.newsletter__sub { font-size: 16.5px; color: var(--text-2); margin-bottom: 28px; }
.newsletter__form { display: flex; gap: 12px; }
.newsletter__input {
  flex: 1; height: 48px; min-width: 0; padding: 0 20px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-family: var(--font-body); font-size: 15.5px;
}
.newsletter__input::placeholder { color: var(--text-2); }
.newsletter__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.newsletter__input[aria-invalid='true'] { border-color: var(--error); }
.newsletter__error {
  margin-top: 10px; color: var(--error); font-size: 14px; font-weight: 500;
}
.newsletter__privacy { margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.newsletter__success { display: flex; gap: 18px; align-items: flex-start; }
.newsletter__success[hidden] { display: none; }
.newsletter__success-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.newsletter__success-icon svg { width: 22px; height: 22px; }
.newsletter__success-title { font-family: var(--font-head); font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.newsletter__success-text { color: var(--text-2); font-size: 15.5px; }
.newsletter__success-note { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }

/* ==========================================================================
   What's new feed (newsflash)
   ========================================================================== */
.newsflash-list { border-top: 1px solid var(--border); }
.nf-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 6px 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.nf-date { font-size: 13.5px; color: var(--text-2); padding-top: 5px; }
.nf-title { font-family: var(--font-body); font-size: 19px; font-weight: 500; line-height: 1.4; }
.nf-title a { color: var(--text); }
.nf-title a:hover { color: var(--accent); text-decoration: none; }
.nf-snippet { margin-top: 6px; font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.nf-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 2px 0;
  border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 500;
  color: var(--accent);
}
.nf-toggle:hover { text-decoration: underline; }
.nf-toggle__chevron { width: 16px; height: 16px; transition: transform 0.25s ease; }
.nf-item.is-open .nf-toggle__chevron { transform: rotate(180deg); }
.nf-extra {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.nf-extra.is-open { grid-template-rows: 1fr; }
.nf-extra__inner { overflow: hidden; }
.nf-extra__text { padding-top: 10px; font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.nf-extra__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 10px 0 2px; font-size: 14.5px; font-weight: 500;
}
.nf-extra__link svg { width: 16px; height: 16px; }

/* ==========================================================================
   Article pages
   ========================================================================== */
.article-hero { margin: 36px 0 0; }
.article-hero__img {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.article-head { max-width: 720px; margin: 44px auto 0; }
.article-head .card__tag { margin-bottom: 18px; }
.article-title { font-size: clamp(32px, 4.6vw, 44px); font-weight: 600; line-height: 1.18; }
.article-byline { margin-top: 18px; font-size: 15px; color: var(--text-2); }
.article-share { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: none; color: var(--text-2);
  font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.share-btn svg { width: 16px; height: 16px; }
.share-btn.is-copied { border-color: var(--accent); color: var(--accent); }

.article-body {
  max-width: 720px; margin: 44px auto 0; padding-bottom: 8px;
  font-size: clamp(17px, 1.25vw, 18.5px); line-height: 1.7;
}
.article-body p { margin-top: 1.4em; }
.article-body p:first-child { margin-top: 0; }
.article-body a { text-underline-offset: 3px; }

.pull-quote {
  margin: 1.9em 0; padding: 6px 0 6px 26px;
  border-left: 4px solid var(--accent);
  font-family: var(--font-head); font-size: clamp(20px, 2.3vw, 25px);
  font-weight: 500; line-height: 1.45; color: var(--text);
}

.terminal {
  margin-top: 1.9em;
  background: #202124;
  color: #f8f9fa;
  border: 1px solid rgba(248, 249, 250, 0.08);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  padding: 20px 24px;
  font-family: var(--font-mono); font-size: 14.5px; line-height: 2;
  overflow-x: auto;
}
.terminal__line { white-space: pre; }
.terminal__prompt { color: #8ab4f8; margin-right: 10px; user-select: none; }

/* Related cards */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: clamp(64px, 9vw, 110px);
  background: var(--footer-bg); color: var(--footer-text);
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: 48px 64px;
  padding: clamp(44px, 6vw, 64px) 0 40px;
}
.footer-brand {
  color: #ffffff; font-family: var(--font-head); font-weight: 600; font-size: 24px;
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none;
}
.footer-brand:hover { text-decoration: none; }
.footer-brand .brand__dot { background: var(--accent); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px 72px; margin-left: auto; }
.footer-col h3 {
  font-family: var(--font-body); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.7px; text-transform: uppercase; color: var(--footer-text);
  margin-bottom: 14px;
}
.footer-col a { display: block; padding: 5px 0; color: var(--footer-link); font-size: 15px; }
.footer-col a:hover { color: #ffffff; text-decoration: none; }
.footer-social { display: flex; gap: 6px; }
.footer-social .icon-btn { color: var(--footer-text); }
.footer-social .icon-btn:hover { background: rgba(232, 234, 237, 0.1); color: #ffffff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(154, 160, 166, 0.25);
  font-size: 13.5px;
}
.footer-bottom a { color: var(--footer-text); }
.footer-bottom a:hover { color: #ffffff; text-decoration: none; }
.footer-bottom .copyright { margin-left: auto; }

/* ==========================================================================
   404
   ========================================================================== */
.error-page { max-width: 640px; margin: 0 auto; padding: clamp(80px, 14vh, 160px) 24px 80px; text-align: center; }
.error-page .brand { justify-content: center; font-size: 26px; margin-bottom: 28px; }
.error-title { font-size: clamp(30px, 5vw, 42px); font-weight: 600; margin-bottom: 14px; }
.error-text { color: var(--text-2); font-size: 17px; margin-bottom: 32px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1023px) {
  .main-nav, .header-actions .region-btn span, .header-actions .region-btn { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-panel, .region-menu { display: none; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .card--large { grid-row: auto; grid-column: 1 / -1; }
  .card--large .card__media { min-height: 0; aspect-ratio: 16 / 9; flex: none; }
}

@media (max-width: 639px) {
  body { font-size: 16px; }
  .page { padding: 0 18px; }
  .header-inner { padding: 0 18px; gap: 12px; }
  .brand__tag { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .card--small .card__media { aspect-ratio: 16 / 10; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form .btn { width: 100%; }
  .nf-item { grid-template-columns: 1fr; gap: 4px; }
  .nf-date { padding-top: 0; }
  .article-share { gap: 8px; }
  .footer-cols { margin-left: 0; }
  .footer-bottom .copyright { margin-left: 0; }
}

@media (min-width: 1600px) {
  :root { --page: 1360px; }
}

/* ---------- Reduced motion ---------- */
@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;
  }
}
