/* =====================================================
   ANGELO MARTINELLI — Legal · Tax · Energy & Commodities
   Global Stylesheet
   ===================================================== */

/* ----- RESET & BASE ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0f1826;
  --ink:     #080d15;
  --burgundy:#8e2a2a;
  --silver:  #c8cdd4;
  --paper:   #f4f2ee;
  --white:   #ffffff;
  --text-dim:#8a9ab0;
  --border:  rgba(200,205,212,0.15);
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

html { font-size: 17px; scroll-behavior: smooth; max-width: 100vw; overflow-x: hidden; }

body {
  font-family: var(--font-serif);
  background: var(--navy);
  color: var(--silver);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ----- TYPOGRAPHY ----- */
h1, h2, h3, h4, h5 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.005em; line-height: 1.06; color: var(--white); }
h1 { font-size: clamp(2.2rem, 3.9vw, 3.53rem); }     /* ≈60 px a 1440 con base 17px */
h2 { font-size: clamp(1.6rem, 2.5vw, 2.24rem); }      /* ≈38 px a 1440 */
h3 { font-size: clamp(1.3rem, 1.65vw, 1.5rem); }      /* ≈25,5 px a 1440 */
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }

p { font-size: 1.05rem; line-height: 1.68; color: var(--silver); max-width: 68ch; }
a { color: inherit; text-decoration: none; }

.label {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.label-burgundy {
  color: var(--burgundy);
}

/* ----- LAYOUT ----- */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container-wide {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 6rem 0; }
section.tight { padding: 4rem 0; }

/* ----- TICKER BAR (always Inter — live numeric data) ----- */
.ticker-bar,
.ticker-bar * { font-family: var(--font-sans) !important; }
.ticker-bar {
  background: var(--ink);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  max-width: 100vw;
  overflow: hidden;
}
.tradingview-widget-container,
.tradingview-widget-container__widget,
.tradingview-widget-container iframe {
  max-width: 100% !important;
  width: 100% !important;
}
.ticker-label {
  display: inline-block;
  background: var(--burgundy);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  margin-right: 1rem;
  vertical-align: middle;
}

/* ----- NAVIGATION ----- */
nav.main-nav {
  position: sticky;
  top: 46px;
  z-index: 999;
  background: rgba(8,13,21,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: top var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.nav-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  max-width: 120px;
}

/* Monogram fallback shown inline before logo loads */
.nav-logo-monogram {
  width: 36px;
  height: 36px;
  background: var(--burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav-logo-text .firm-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
}
.nav-logo-text .firm-tagline {
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--burgundy);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-lang a {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.25rem 0.4rem;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.nav-lang a:hover, .nav-lang a.lang-active {
  color: var(--white);
  border-color: var(--border);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--silver);
  transition: all var(--transition);
}

/* ----- HERO ----- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 6rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(8,13,21,0.78) 0%,
    rgba(8,13,21,0.55) 40%,
    rgba(8,13,21,0.88) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 2rem;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hero-eyebrow .label { color: var(--text-dim); }
.hero-line {
  width: 48px;
  height: 1px;
  background: var(--burgundy);
}
.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero-deck {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--silver);
  max-width: 54ch;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9rem 1.8rem;
  border: 1px solid;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
}
.btn-primary:hover {
  background: #a33232;
  border-color: #a33232;
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--silver);
}
.btn-outline:hover {
  border-color: var(--silver);
  color: var(--white);
}

/* ----- HAIRLINE RULE ----- */
.rule { width: 100%; height: 1px; background: var(--border); }
.rule-sm { width: 48px; height: 1px; background: var(--burgundy); display: block; margin-bottom: 1rem; }

/* ----- SECTION HEADERS ----- */
.section-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: 4rem;
}
.section-header-solo { margin-bottom: 4rem; }
.section-header-solo .label { margin-bottom: 0.75rem; display: block; }

/* ----- CAPABILITIES GRID ----- */
.caps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.cap-card {
  background: var(--navy);
  padding: 2rem;
  transition: background var(--transition);
  position: relative;
}
.cap-card:hover { background: rgba(142,42,42,0.07); }
.cap-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4caf75;
  margin-bottom: 1rem;
}
.cap-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf75;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.cap-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.cap-desc {
  font-size: 0.98rem;
  color: var(--silver);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  max-width: 100%;
}
.cap-spec {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ----- FORUMS / JURISDICTIONS ----- */
.forums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.forum-item {
  padding: 1.5rem;
  border: 1px solid var(--border);
  position: relative;
  transition: border-color var(--transition);
}
.forum-item:hover { border-color: rgba(142,42,42,0.5); }
.forum-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--burgundy);
}
.forum-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.forum-type {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ----- MANIFESTO / CHIPS ----- */
.manifesto-block {
  background: var(--ink);
  border: 1px solid var(--border);
  padding: 4rem;
}
.manifesto-text {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  color: var(--white);
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 2.5rem;
  max-width: 100%;
}
.manifesto-text strong { font-weight: 700; color: var(--white); }
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.chip {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--silver);
  transition: all var(--transition);
}
.chip:hover {
  border-color: var(--burgundy);
  color: var(--white);
  background: rgba(142,42,42,0.1);
}

/* ----- PROCESS STEPS ----- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.process-step {
  background: var(--navy);
  padding: 2.5rem 2rem;
  position: relative;
}
.step-num {
  font-size: 4rem;
  font-weight: 800;
  color: rgba(142,42,42,0.15);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.step-desc {
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 100%;
}

/* ----- PRINCIPLES ----- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.principle {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.principle-num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--burgundy);
  margin-bottom: 0.75rem;
  display: block;
}
.principle-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.principle-desc {
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 100%;
}

/* ----- NEWS / ACTUALIDAD ----- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.news-card {
  background: var(--ink);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color var(--transition);
}
.news-card:hover { border-color: rgba(142,42,42,0.5); }
.news-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) brightness(0.85);
  transition: filter var(--transition);
}
.news-card:hover .news-img { filter: grayscale(0%) brightness(0.95); }
.news-body { padding: 1.5rem; }
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.news-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  background: rgba(142,42,42,0.2);
  color: #c47a7a;
  border: 1px solid rgba(142,42,42,0.3);
}
.news-date {
  font-size: 0.65rem;
  color: var(--text-dim);
}
.news-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.news-excerpt {
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 100%;
}
.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-top: 1rem;
  transition: gap var(--transition);
}
.news-read-more:hover { gap: 0.7rem; }

/* ----- FAQ ----- */
.faq-list { max-width: 860px; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  gap: 1rem;
}
.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--silver);
  transition: all var(--transition);
}
.faq-item.open .faq-icon {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--white);
  transform: rotate(45deg);
}
.faq-a {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  max-width: 100%;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: 1.5rem;
}

/* ----- CONTACT ----- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-item-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.contact-item-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}
.contact-item-value a { transition: color var(--transition); }
.contact-item-value a:hover { color: var(--burgundy); }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.form-input, .form-select, .form-textarea {
  background: var(--ink);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  padding: 0.85rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--burgundy);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select option { background: var(--ink); }
.form-disclaimer {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 100%;
}

/* ----- PHOTO SECTION ----- */
.photo-full {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  filter: brightness(0.65) grayscale(20%);
}

/* ----- LIGHT SECTIONS ----- */
.section-paper {
  background: var(--paper);
}
.section-paper h2,
.section-paper h3,
.section-paper h4 { color: var(--ink); }
.section-paper p,
.section-paper .label { color: #4a5260; }
.section-paper .rule-sm { background: var(--burgundy); }
.section-paper .section-header-solo .label { color: #6b7280; }

/* ----- FOOTER ----- */
footer {
  background: var(--ink);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand .firm-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}
.footer-brand .firm-tagline {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 36ch;
}
.footer-col-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.footer-disclaimer {
  font-size: 0.7rem;
  color: var(--text-dim);
  max-width: 60ch;
  text-align: right;
  line-height: 1.5;
}
.footer-logo-img { height: 28px; width: auto; object-fit: contain; margin-bottom: 0.75rem; }

/* ----- PAGE HERO (sub-pages) ----- */
.page-hero {
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: grayscale(30%);
}
.page-hero-content { position: relative; z-index: 2; }

/* ----- TEAM / BIO ----- */
.bio-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 5rem;
  align-items: start;
}
.bio-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(15%);
  border: 1px solid var(--border);
}
.bio-facts { display: flex; flex-direction: column; gap: 2rem; }
.bio-fact-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}
.bio-fact-value {
  font-size: 0.9rem;
  color: var(--silver);
  line-height: 1.6;
  max-width: 100%;
}

/* ----- PRACTICE AREAS (detail pages) ----- */
.practice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.practice-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}
.practice-item::before {
  content: '—';
  color: var(--burgundy);
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.practice-item-text { font-size: 0.98rem; color: var(--silver); line-height: 1.5; max-width: 100%; }
.practice-item-text strong { color: var(--white); }

/* ----- STATS / METRICS ----- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 4rem 0;
}
.stat-cell {
  background: var(--navy);
  padding: 2.5rem 2rem;
}
.stat-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-desc {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ----- LANGUAGE NOTICE BANNER ----- */
.lang-banner {
  background: rgba(142,42,42,0.12);
  border: 1px solid rgba(142,42,42,0.25);
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: #c47a7a;
  margin-bottom: 2rem;
}

/* ----- SCROLL ANIMATIONS ----- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 1100px) {
  .caps-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .bio-grid { grid-template-columns: 1fr; }
  .bio-photo { max-width: 320px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; gap: 1rem; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--ink);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    z-index: 998;
  }
  .nav-toggle { display: flex; }
  .caps-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .forums-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-disclaimer { text-align: center; }
  .manifesto-block { padding: 2rem; }
  .section-header { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .hero { min-height: 100vh; }
}

/* ----- INLINE-GRID RESPONSIVE FIX (max-width: 900px) ----- */
/* Collapses grids set via style="grid-template-columns:…" that bypass CSS classes */
@media (max-width: 900px) {
  /* Attribute selectors catch both spaced and unspaced variants */
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr auto"],
  [style*="grid-template-columns:1fr auto"],
  [style*="grid-template-columns: minmax(0,5fr)"],
  [style*="grid-template-columns:minmax(0,5fr)"],
  [style*="grid-template-columns: minmax(0,7fr)"],
  [style*="grid-template-columns:minmax(0,7fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Prevent any element from causing horizontal overflow */
  img, video, table, iframe, svg {
    max-width: 100% !important;
    height: auto;
  }

  /* Ticker: hide label on very narrow screens so widget gets full width */
  .ticker-label { display: none; }

  /* Global overflow guard — nothing wider than the viewport */
  body { overflow-x: hidden; }
}
