/* ==========================================================================
   National Nutrition Week 2026 - Component-based stylesheet
   --------------------------------------------------------------------------
   THEME: all colours are defined once in the :root variables below.
   Change the campaign colours here and the whole site updates.
   [PLACEHOLDER COLOURS - replace with official NNW 2026 brand colours]
   ========================================================================== */

:root {
  /* Colour system */
  --bg: #ffffff;               /* primary background colour */
  --bg-alt: #f4f9f1;          /* alternating section background */
  --text: #1f2a24;            /* primary text colour */
  --muted: #55665c;           /* secondary text colour */
  --primary: #285C4D;         /* accent 1 (buttons, links, hero) */
  --primary-dark: #285C4D;
  --primary-light: #e8f3e8;
  --accent: #f57c00;          /* accent 2 (highlights, hovers) */
  --accent-dark: #e65100;
  --footer-line-1: #285C4D;   /* footer dual-line colour 1 */
  --footer-line-2: #f57c00;    /* footer dual-line colour 2 */
  --footer-bg: #1f2a24;
  --footer-text: #e6ece8;
  --border: #d8e2da;
  --focus-ring: #f57c00;

  /* Typography [PLACEHOLDER - replace with official brand font if provided] */
  --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container-max: 1140px;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(31, 42, 36, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; color: var(--text); }

a { color: var(--primary-dark); }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.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;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; }

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

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.brand-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: contain; }

.brand-text { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.brand-text span { color: var(--primary); margin-left: 0.35rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.6rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar { width: 22px; height: 2px; background: var(--text); transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.primary-nav a:hover { background: var(--primary-light); color: var(--primary-dark); }
.primary-nav a.active { background: var(--primary); color: #fff; }

@media (max-width: 62em) {
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 0.75rem;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 0.7rem 0.9rem; }
}

/* --------------------------------------------------------------------------
   Hero banner
   -------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--accent));
  color: #fff;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.hero-inner { max-width: 46rem; }

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.85rem;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  color: #fff;
}

.hero-tagline { margin: 0 0 1.75rem; font-size: 1.15rem; color: #f2f7f2; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --------------------------------------------------------------------------
   Buttons (CTA components)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

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

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

.btn-secondary { background: transparent; color: inherit; border-color: currentColor; }
.hero .btn-secondary { color: #fff; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.btn-tertiary { background: transparent; color: var(--primary-dark); border-color: var(--primary); }
.btn-tertiary:hover { background: var(--primary-light); color: var(--primary-dark); }

.text-link { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Sections, headers, text blocks
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section-alt { background: var(--bg-alt); }

.page { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section-header { margin-bottom: 2rem; max-width: 46rem; }

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.section-header h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.section-header h2 { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2.1rem); }

.paragraph-block { max-width: 46rem; }
.paragraph-block p { margin: 0 0 1rem; }

.bullet-list {
  max-width: 46rem;
  margin: 0;
  padding-left: 1.25rem;
}
.bullet-list li { margin-bottom: 0.65rem; }
.bullet-list.numbered { list-style: none; counter-reset: obj; padding-left: 0; }
.bullet-list.numbered > li {
  counter-increment: obj;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  margin-bottom: 0.75rem;
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  position: relative;
}
.bullet-list.numbered > li::before {
  content: counter(obj);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
}

.center { text-align: center; }
.note { color: var(--muted); font-size: 0.88rem; }
.note-inline { font-weight: 400; font-size: 0.8rem; opacity: 0.85; }

.cta-block {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 46rem;
}

/* --------------------------------------------------------------------------
   Messages
   -------------------------------------------------------------------------- */
.message-list { display: grid; gap: 1.25rem; max-width: 46rem; }

.message-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.message-block h2 { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--primary-dark); }
.message-block p { margin: 0; }

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.accordion { max-width: 46rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.accordion-item + .accordion-item { border-top: 1px solid var(--border); }

.accordion-heading { margin: 0; }

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.05rem 1.25rem;
  background: var(--bg);
  border: none;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.accordion-trigger:hover { background: var(--primary-light); }

.accordion-icon {
  flex: 0 0 auto;
  position: relative;
  width: 14px;
  height: 14px;
}
.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--primary-dark);
  transition: transform 0.2s;
}
.accordion-icon::before { width: 14px; height: 2px; }
.accordion-icon::after { width: 2px; height: 14px; }
.accordion-trigger[aria-expanded="true"] .accordion-icon::after { transform: scaleY(0); }

.accordion-panel { padding: 0 1.25rem 1.25rem; }
.accordion-panel p { margin: 0; }

/* --------------------------------------------------------------------------
   Collaborator grid
   -------------------------------------------------------------------------- */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.collab-grid.collab-detailed { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.collab-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.collab-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  margin-bottom: 0.75rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.collab-card img { max-height: 120px; object-fit: contain; margin: 0 auto 0.75rem; width: auto; }
.collab-card p, .collab-card h2 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.collab-card h2 { font-size: 1.05rem; }

.new-collab-slot {
  max-width: 46rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

/* --------------------------------------------------------------------------
   Quick links strip (home)
   -------------------------------------------------------------------------- */
.quick-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.quick-card strong { color: var(--primary-dark); }
.quick-card span { font-size: 0.88rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Archive tabs
   -------------------------------------------------------------------------- */
.tabs { max-width: 46rem; }

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
}

.tab-btn {
  padding: 0.55rem 1.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tab-btn:hover { background: var(--primary-light); }
.tab-btn[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

.tab-panel { animation: fade-in 0.25s ease; }
.tab-panel h2 { margin: 0 0 0.75rem; font-size: 1.35rem; }

.archive-group {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.archive-group h3 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--primary-dark); }

.download-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.download-list .btn { justify-self: start; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   Footer (dual-line colours)
   -------------------------------------------------------------------------- */
.site-footer { margin-top: 3rem; color: var(--footer-text); }

.footer-lines { display: flex; height: 8px; }
.footer-line-1 { flex: 1; background: var(--footer-line-1); }
.footer-line-2 { flex: 1; background: var(--footer-line-2); }

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-block: 2.5rem 2rem;
  background: var(--footer-bg);
}

.footer-col .footer-heading {
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-links a { color: var(--footer-text); text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

.social-placeholder {
  padding: 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.copyright { font-size: 0.82rem; color: #b9c4bd; margin: 0; }
.footer-note { font-size: 0.88rem; color: #b9c4bd; margin: 0; }

@media (max-width: 48em) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 30em) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Scroll reveal animation (progressive enhancement)
   -------------------------------------------------------------------------- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tab-panel { animation: none; }
}
