/* Freedom Church — site stylesheet
   No framework, no build step. Sections:
   1. Fonts & tokens  2. Base  3. Layout  4. Components  5. Header/nav
   6. Footer  7. Page-specific  8. Forms  9. Utilities
*/

/* 1. Fonts & tokens ======================================================== */

@font-face { font-family: "Avenir"; src: url("../fonts/AvenirLTStd-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Avenir"; src: url("../fonts/AvenirLTStd-Book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Avenir"; src: url("../fonts/Avenir-Regular.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Avenir"; src: url("../fonts/Avenir-Heavy.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Avenir"; src: url("../fonts/Avenir-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  /* brand */
  --navy-950: #0b111c;
  --navy-900: #0f1623;
  --navy-800: #162033;
  --navy-700: #22304a;
  --blue-500: #4d72a8;
  --blue-300: #9fb7d9;
  --blue-50:  #eef3fa;
  --gold:     #efbd6e;
  --gold-600: #c29348;

  /* neutrals */
  --ink:    #1b2433;
  --muted:  #5b6577;
  --line:   #e3e8ef;
  --paper:  #ffffff;
  --paper-2:#f6f8fb;

  /* status */
  --ok: #2f7d55;  --ok-bg: #e8f5ee;
  --err: #b42318; --err-bg: #fdecea;
  --info: #31588f; --info-bg: #eaf1fb;

  --font: "Avenir", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(15 22 35 / .06), 0 8px 24px rgb(15 22 35 / .08);
  --shadow-lg: 0 2px 4px rgb(15 22 35 / .06), 0 24px 48px rgb(15 22 35 / .14);

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 120px);
  --header-h: 72px;
}

/* 2. Base ================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue-500); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-700); }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; color: var(--navy-900); }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--navy-950); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; background: var(--gold); color: var(--navy-950); font-weight: 800; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

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

/* 3. Layout ================================================================ */

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 780px; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--navy-900); color: #d6deea; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a:not(.btn) { color: var(--gold); }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.section-head--row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; max-width: none; }
.section--dark .section-head p { color: var(--blue-300); }

.grid { display: grid; gap: clamp(16px, 2.5vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.split {
  display: grid; gap: clamp(28px, 5vw, 72px); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* 4. Components ============================================================ */

.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-600);
}
.section--dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--gold); }
.lead { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; color: var(--muted); font-weight: 400; }

/* buttons */
.btn {
  --btn-bg: var(--navy-900); --btn-fg: #fff; --btn-border: var(--btn-bg);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.4em;
  font: 800 .9rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  color: var(--btn-fg); background: var(--btn-bg); border: 2px solid var(--btn-border); border-radius: 999px;
  cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn svg { flex: none; width: 1.35em; height: 1.35em; }
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--navy-950); }
.btn--gold:hover { --btn-bg: #f4cb89; }
.btn--ghost { --btn-bg: transparent; --btn-fg: #fff; --btn-border: rgb(255 255 255 / .55); }
.btn--ghost:hover { --btn-bg: rgb(255 255 255 / .12); --btn-border: #fff; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--navy-900); --btn-border: var(--navy-900); }
.btn--outline:hover { --btn-bg: var(--navy-900); --btn-fg: #fff; }
.btn--sm { min-height: 38px; padding: 0 1.1em; font-size: .78rem; }
.btn--danger { --btn-bg: var(--err); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row--center { justify-content: center; }

.link-arrow { font-weight: 800; text-decoration: none; letter-spacing: .02em; color: var(--navy-900); }
.link-arrow::after { content: " \2192"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: 4px; }
.section--dark .link-arrow { color: var(--gold); }

/* cards */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-800); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card--link:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 22px 24px 26px; }
.card__body h3 { margin: 0; }
.card__body p { margin: 0; color: var(--muted); }
.card__title-link { color: inherit; text-decoration: none; }
.card__title-link::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card__meta { font-size: .85rem; color: var(--muted); }

/* photo tile (image card with overlaid text) */
.tile {
  position: relative; isolation: isolate; display: flex; align-items: flex-end;
  min-height: 340px; padding: 28px; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none;
}
.tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(11 17 28 / .05) 20%, rgb(11 17 28 / .88)); }
.tile:hover img { transform: scale(1.05); }
.tile h3 { color: #fff; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.tile p { margin: 0; color: #dbe3ef; font-size: .98rem; }

/* sermon card */
.sermon-card .card__media { aspect-ratio: 1; }
.sermon-card .card__media--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); }
.sermon-card .card__media--empty img { width: 30%; height: auto; opacity: .35; }
.pill {
  display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: var(--blue-50); color: var(--blue-500);
}

/* hero (home) */
.hero {
  position: relative; isolation: isolate; display: grid; align-items: center;
  min-height: min(92svh, 860px); padding: calc(var(--header-h) + 48px) 0 72px; color: #fff; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(11 17 28 / .92) 0%, rgb(11 17 28 / .65) 55%, rgb(11 17 28 / .35) 100%),
    linear-gradient(0deg, rgb(11 17 28 / .6), transparent 40%);
}
.hero h1 { color: #fff; text-transform: uppercase; max-width: 11ch; margin-bottom: .3em; }
.hero h1 span { color: var(--gold); }
.hero p { max-width: 560px; font-size: clamp(1.1rem, 2vw, 1.3rem); color: #d6deea; margin-bottom: 2em; }
.hero p strong { color: #fff; font-weight: 800; }

/* page hero (inner pages) */
.page-hero {
  position: relative; isolation: isolate; color: #fff; overflow: hidden;
  padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(48px, 7vw, 88px);
  background: var(--navy-900);
}
.page-hero img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(11 17 28 / .9), rgb(11 17 28 / .55)); }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 3.75rem); text-transform: uppercase; margin-bottom: .25em; }
.page-hero p { max-width: 640px; font-size: 1.15rem; color: #d6deea; margin: 0; }

/* service info strip */
.visit-strip { position: relative; z-index: 2; margin-top: -56px; }
.visit-strip__inner {
  display: grid; gap: 0; grid-template-columns: 1fr;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
@media (min-width: 760px) { .visit-strip__inner { grid-template-columns: repeat(3, 1fr); } }
.visit-strip__item { display: flex; gap: 16px; align-items: flex-start; padding: 26px 28px; }
.visit-strip__item + .visit-strip__item { border-top: 1px solid var(--line); }
@media (min-width: 760px) { .visit-strip__item + .visit-strip__item { border-top: 0; border-left: 1px solid var(--line); } }
.visit-strip__item svg { flex: none; width: 28px; height: 28px; color: var(--gold-600); margin-top: 2px; }
.visit-strip__item h3 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.visit-strip__item p { margin: 0; font-weight: 800; color: var(--navy-900); line-height: 1.35; }
.visit-strip__item a { font-weight: 800; }

/* quote / statement */
.statement { font-size: clamp(1.5rem, 3.2vw, 2.25rem); line-height: 1.3; font-weight: 300; color: var(--navy-900); margin: 0; }
.statement strong { font-weight: 800; }
.section--dark .statement { color: #fff; }

blockquote.scripture {
  margin: 0; padding: clamp(28px, 4vw, 44px); border-radius: var(--radius);
  background: var(--navy-900); color: #e3e9f2; font-size: 1.2rem; line-height: 1.55; font-weight: 300;
}
blockquote.scripture cite { display: block; margin-top: 14px; font-style: normal; font-weight: 800; color: var(--gold); font-size: .95rem; letter-spacing: .06em; }

/* core values */
.value { padding: 32px 28px; border-radius: var(--radius); background: var(--navy-800); color: #c8d3e3; display: flex; flex-direction: column; gap: 12px; }
.value img { width: 56px; height: 56px; }
.value h3 { color: #fff; text-transform: uppercase; letter-spacing: .02em; margin: 6px 0 0; }
.value h3 span { display: block; color: var(--gold); }
.value p { margin: 0; }
.value .verse { font-size: .95rem; font-style: italic; color: var(--blue-300); }
.value .verse b { font-style: normal; color: #fff; }
.value audio { width: 100%; margin-top: auto; height: 40px; }

/* people */
.pastor { display: grid; gap: clamp(20px, 4vw, 48px); align-items: start; grid-template-columns: 1fr; }
@media (min-width: 760px) { .pastor { grid-template-columns: minmax(220px, 340px) 1fr; } }
.pastor img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.pastor + .pastor { margin-top: clamp(40px, 6vw, 72px); }
.people { display: grid; gap: clamp(16px, 2.5vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.person { text-align: center; }
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: 14px; box-shadow: var(--shadow); background: var(--blue-50); }
.person h3 { font-size: 1.05rem; margin: 0; }
.person p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); line-height: 1.4; }

/* accordion (beliefs) */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 4px; cursor: pointer; list-style: none;
  font-weight: 800; font-size: 1.1rem; color: var(--navy-900); text-transform: uppercase; letter-spacing: .04em;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none; width: 12px; height: 12px; border-right: 2.5px solid var(--gold-600); border-bottom: 2.5px solid var(--gold-600);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.accordion .accordion__body { padding: 0 4px 24px; color: var(--muted); }
.accordion .refs { font-size: .92rem; color: var(--blue-500); font-weight: 500; margin: 0; }

/* feature list */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.feature { padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .98rem; }

/* age groups */
.age { padding: 28px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); border-top: 4px solid var(--gold); }
.age .eyebrow { margin-bottom: 6px; }
.age h3 { text-transform: uppercase; }
.age p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: var(--radius); padding: clamp(32px, 6vw, 64px); display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1.4fr auto; } }
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { color: var(--blue-300); margin: 0; }

/* embeds */
.embed { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--paper-2); }
.embed--video { aspect-ratio: 16 / 9; }
.embed iframe { width: 100%; height: 100%; border: 0; }
.embed--calendar iframe { height: 760px; }
.embed--map { aspect-ratio: 4 / 3; }

/* flash messages */
.flashes { display: grid; gap: 10px; margin-bottom: 24px; }
.flash { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 500; border-left: 4px solid; }
.flash--success { background: var(--ok-bg); color: var(--ok); }
.flash--error { background: var(--err-bg); color: var(--err); }
.flash--info { background: var(--info-bg); color: var(--info); }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0 12px;
  border-radius: 999px; text-decoration: none; font-weight: 800; color: var(--navy-900); border: 1px solid var(--line);
}
.pagination a:hover { border-color: var(--navy-900); }
.pagination [aria-current] { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* article prose */
.prose { font-size: 1.125rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose strong { color: var(--navy-900); }
.prose img { border-radius: var(--radius-sm); margin-inline: auto; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--gold); color: var(--muted); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; }

/* poll */
.poll { max-width: 640px; }
.poll-options { display: grid; gap: 12px; margin: 24px 0; padding: 0; border: 0; }
.poll-option {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); font-weight: 500;
  transition: border-color .15s, background-color .15s;
}
.poll-option:hover { border-color: var(--blue-300); }
.poll-option:has(input:checked) { border-color: var(--navy-900); background: var(--blue-50); }
.poll-option input { width: 20px; height: 20px; accent-color: var(--navy-900); flex: none; }
.results { display: grid; gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.result__label { display: flex; justify-content: space-between; gap: 12px; font-weight: 500; margin-bottom: 6px; }
.result__label b { color: var(--navy-900); }
.result__bar {
  --bar: var(--blue-500);
  appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 12px;
  border: 0; border-radius: 999px; background: var(--line); color: var(--bar); overflow: hidden;
}
.result__bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.result__bar::-webkit-progress-value { background: var(--bar); border-radius: 999px; }
.result__bar::-moz-progress-bar { background: var(--bar); border-radius: 999px; }
.result--mine .result__bar { --bar: var(--gold-600); }
.result--mine .result__label::after { content: "Your vote"; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-600); margin-left: auto; padding-left: 8px; }
.result__label .pct { min-width: 3.5ch; text-align: right; }
.poll-meta { color: var(--muted); font-size: .92rem; }

/* sermon filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 36px; }
.filters input[type="search"] { flex: 1 1 260px; }
.filters select { flex: 0 1 260px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: -16px 0 32px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); font-size: .85rem; font-weight: 500; text-decoration: none; color: var(--ink); }
.chip:hover { border-color: var(--navy-900); color: var(--navy-900); }
.chip[aria-current] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* sermon detail */
.page-hero--post h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); text-transform: none; margin-bottom: .5em; }
.page-hero--post .eyebrow { text-decoration: none; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--blue-300); font-size: 1rem; }
.post-meta b { color: #fff; font-weight: 800; }
.post-video { margin-bottom: 40px; }
.post-cover { width: 100%; max-width: 440px; border-radius: var(--radius); box-shadow: var(--shadow-lg); margin: 0 0 36px; }
.post-nav { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.post-nav a { display: block; padding: 18px 20px; border-radius: var(--radius-sm); border: 1px solid var(--line); text-decoration: none; color: var(--navy-900); font-weight: 800; line-height: 1.35; }
.post-nav a:hover { border-color: var(--navy-900); }
.post-nav small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.post-nav .next { text-align: right; }

/* 5. Header / nav ========================================================== */

/* Fixed on every page; each page starts with a hero that reserves --header-h of top padding. */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: rgb(15 22 35 / .94); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  transition: background-color .25s ease, box-shadow .25s ease;
}
body.has-hero .site-header { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.has-hero .site-header.is-scrolled, body.nav-open .site-header { background: rgb(15 22 35 / .96); box-shadow: 0 1px 0 rgb(255 255 255 / .06); }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font-weight: 900; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1; }
.brand:hover { color: #fff; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__list { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 999px;
  color: #dbe3ef; text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap;
}
.nav__link:hover, .nav__link[aria-current="page"] { color: #fff; background: rgb(255 255 255 / .08); }
.nav__item--parent > .nav__link::after {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .7;
}
.nav__sub {
  position: absolute; top: calc(100% + 6px); left: 50%; min-width: 200px; margin: 0; padding: 8px; list-style: none;
  background: var(--paper); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nav__sub::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; } /* hover bridge */
.nav__item--parent:hover .nav__sub, .nav__item--parent:focus-within .nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav__sub a { display: block; padding: 10px 14px; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav__sub a:hover, .nav__sub a[aria-current="page"] { background: var(--paper-2); color: var(--navy-900); }
.nav .btn { margin-left: 10px; }

.nav-toggle {
  display: none; width: 48px; height: 48px; margin-right: -8px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: #fff; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; margin: auto; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s ease, background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 32px; overflow-y: auto; background: var(--navy-900);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open { overflow: hidden; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__item { border-bottom: 1px solid rgb(255 255 255 / .08); }
  .nav__link { height: 56px; padding: 0 4px; font-size: 1.15rem; border-radius: 0; background: none !important; }
  .nav__item--parent > .nav__link::after { display: none; }
  .nav__sub { position: static; opacity: 1; visibility: visible; transform: none; background: none; box-shadow: none; padding: 0 0 12px 12px; min-width: 0; }
  .nav__sub::before { display: none; }
  .nav__sub a { color: var(--blue-300); padding: 8px 4px; }
  .nav__sub a:hover, .nav__sub a[aria-current="page"] { background: none; color: #fff; }
  .nav .btn { margin: 24px 0 0; }
}

/* 6. Footer ================================================================ */

.site-footer { background: var(--navy-950); color: #9aa8bd; padding: clamp(56px, 8vw, 88px) 0 32px; font-size: .97rem; }
.site-footer a { color: #dbe3ef; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-grid h2 { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand img { width: 64px; margin-bottom: 16px; }
.footer-brand p { max-width: 34ch; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / .06); }
.social a:hover { background: var(--gold); color: var(--navy-950); }
.social svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .08); font-size: .85rem; }

/* 7. Page-specific ========================================================= */

.welcome { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) { .welcome { grid-template-columns: 1.1fr .9fr; } }
.welcome__img { position: relative; }
.welcome__img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.welcome__img::after { content: ""; position: absolute; right: -14px; bottom: -14px; width: 40%; height: 40%; border: 3px solid var(--gold); border-radius: var(--radius); z-index: -1; }

.poll-teaser { display: grid; gap: 20px; align-items: center; padding: clamp(28px, 5vw, 48px); border-radius: var(--radius); background: var(--blue-50); }
@media (min-width: 860px) { .poll-teaser { grid-template-columns: 1fr auto; } }
.poll-teaser h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }

.contact-grid { display: grid; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: .9fr 1.1fr; } }
.contact-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; }
.contact-list svg { flex: none; width: 24px; height: 24px; color: var(--gold-600); margin-top: 3px; }
.contact-list b { display: block; color: var(--navy-900); }

.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }

/* 8. Forms ================================================================= */

.form { display: grid; gap: 20px; }
.form-card { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-lg); }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 800; font-size: .9rem; color: var(--navy-900); }
.field .hint { font-size: .85rem; color: var(--muted); }
.field .error { font-size: .88rem; color: var(--err); font-weight: 500; }
.field-row { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid #cfd7e3; border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgb(77 114 168 / .18); }
.field--invalid input, .field--invalid textarea, .field--invalid select { border-color: var(--err); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--navy-900); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* 9. Utilities ============================================================= */

.center { text-align: center; }
.align-center { align-items: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: clamp(32px, 5vw, 56px); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
