/* ============================================================
   VACCAYZ · shared component + layout CSS
   Consumers link vz/styles.css then this file.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Site-wide guard against horizontal scroll on mobile. `clip` (not `hidden`)
   preserves the sticky nav, which overflow:hidden would break. */
body { margin: 0; max-width: 100%; overflow-x: clip; }
img, video, iframe { display: block; max-width: 100%; }
/* Media & preformatted content must never push the page wider than the screen. */
pre, table { max-width: 100%; overflow-x: auto; }

/* ---------- Layout ---------- */
.vz-container { width: 100%; max-width: var(--container-xl); margin-inline: auto; padding-inline: var(--space-6); }
.vz-container.narrow { max-width: var(--container-md); }
.vz-container.lg { max-width: var(--container-lg); }
.vz-section { padding-block: var(--section-y); }
.vz-section.tight { padding-block: var(--space-16); }

.vz-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-brand);
  margin: 0 0 var(--space-3);
  display: inline-block;
}
.vz-eyebrow.teal { color: var(--text-link); }
.vz-eyebrow.on-dark { color: rgba(255,255,255,0.82); }

.vz-display { font-family: var(--font-display); font-weight: var(--weight-medium); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); color: var(--text-strong); margin: 0; }
.vz-h1 { font-size: var(--text-display-l); }
.vz-h2 { font-size: var(--text-display-m); }
.vz-h3 { font-size: var(--text-heading-l); }
.vz-h4 { font-size: var(--text-heading-m); }
.vz-lede { font-size: var(--text-body-l); line-height: var(--leading-relaxed); color: var(--text-muted); max-width: 60ch; margin: 0; }
.vz-muted { color: var(--text-muted); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-8); margin-bottom: var(--space-10); flex-wrap: wrap; }
.section-head p { margin: var(--space-2) 0 0; }

/* ---------- Navbar ---------- */
.vz-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-8); height: 72px; padding: 0 var(--space-8);
  background: rgba(251,248,242,0.82);
  -webkit-backdrop-filter: saturate(140%) blur(var(--blur-md));
  backdrop-filter: saturate(140%) blur(var(--blur-md));
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.vz-nav.transparent {
  position: absolute; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.vz-brand { font-family: var(--font-display); font-size: 26px; font-weight: var(--weight-semibold); letter-spacing: -0.01em; color: var(--ink-950); display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; }
.vz-brand:hover { text-decoration: none; color: var(--ink-950); }
.vz-brand .dot { color: var(--coral-500); font-size: 30px; line-height: 0; }
.vz-nav.transparent .vz-brand { color: var(--white); }
.vz-navlinks { display: flex; align-items: center; gap: var(--space-8); }
.vz-navlink { position: relative; font-family: var(--font-sans); font-size: var(--text-body-m); font-weight: var(--weight-medium); color: var(--ink-900); text-decoration: none; opacity: 0.82; padding-bottom: 3px; transition: opacity var(--dur-fast) var(--ease-out); }
.vz-navlink::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; border-radius: 2px; width: 0; background: var(--coral-500); transition: width var(--dur-base) var(--ease-out); }
.vz-navlink:hover, .vz-navlink.active { opacity: 1; text-decoration: none; color: var(--ink-900); }
.vz-navlink:hover::after, .vz-navlink.active::after { width: 100%; }
.vz-nav.transparent .vz-navlink { color: var(--white); }
.vz-nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.vz-nav-toggle { display: none; }

/* ---------- Button ---------- */
.vz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 22px;
  font-family: var(--font-sans); font-size: var(--text-body-m); font-weight: var(--weight-semibold);
  letter-spacing: 0.01em; line-height: 1;
  border-radius: var(--radius-md); border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap; user-select: none; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.vz-btn:hover { text-decoration: none; transform: translateY(-1px); }
.vz-btn:active { transform: translateY(0) scale(0.98); }
.vz-btn.sm { min-height: 36px; padding: 8px 16px; font-size: var(--text-body-s); border-radius: var(--radius-sm); gap: 6px; }
.vz-btn.lg { min-height: 56px; padding: 15px 30px; font-size: var(--text-body-l); gap: 10px; }
.vz-btn.block { width: 100%; }
.vz-btn.primary { background: var(--action-primary); color: var(--white); box-shadow: var(--shadow-sm); }
.vz-btn.primary:hover { background: var(--action-primary-hover); color: var(--white); box-shadow: var(--shadow-md); }
.vz-btn.secondary { background: transparent; color: var(--action-secondary); border-color: var(--action-secondary); }
.vz-btn.secondary:hover { background: var(--teal-50); color: var(--action-secondary); }
.vz-btn.tertiary { background: transparent; color: var(--text-brand); }
.vz-btn.tertiary:hover { background: var(--coral-50); color: var(--text-brand); }
.vz-btn.inverse { background: var(--white); color: var(--ink-950); box-shadow: var(--shadow-sm); }
.vz-btn.inverse:hover { background: var(--sand-100); color: var(--ink-950); box-shadow: var(--shadow-md); }
.vz-btn svg { width: 1.05em; height: 1.05em; }

/* ---------- Card ---------- */
.vz-card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.vz-card.pad { padding: var(--space-6); }
.vz-card.pad-lg { padding: var(--space-8); }
.vz-card.interactive { transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); cursor: pointer; }
.vz-card.interactive:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* ---------- ImageCard ---------- */
.vz-imgcard { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-sunken); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--white); transition: box-shadow var(--dur-base) var(--ease-out); }
.vz-imgcard:hover { box-shadow: var(--shadow-lg); text-decoration: none; color: var(--white); }
.vz-imgcard.wide { aspect-ratio: 3 / 4; }
.vz-imgcard.land { aspect-ratio: 4 / 3; }
.vz-imgcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform var(--dur-slow) var(--ease-out); }
.vz-imgcard:hover img { transform: scale(1.06); }
.vz-imgcard .scrim { position: absolute; inset: 0; background: var(--scrim-bottom); }
.vz-imgcard .badge-slot { position: absolute; top: var(--space-4); left: var(--space-4); z-index: 2; }
.vz-imgcard .ic-body { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-6); display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.vz-imgcard .ic-sub { font-family: var(--font-mono); font-size: var(--text-eyebrow); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: rgba(255,255,255,0.82); }
.vz-imgcard .ic-title { font-family: var(--font-display); font-size: var(--text-heading-m); font-weight: var(--weight-medium); line-height: var(--leading-snug); }
.vz-imgcard .ic-meta { font-size: var(--text-body-s); color: rgba(255,255,255,0.88); }
.vz-imgcard .ic-reveal { max-height: 0; opacity: 0; overflow: hidden; margin-top: 0; font-size: var(--text-body-s); color: rgba(255,255,255,0.9); transition: max-height var(--dur-slow) var(--ease-out), opacity var(--dur-base) var(--ease-out), margin var(--dur-base) var(--ease-out); }
.vz-imgcard:hover .ic-reveal { max-height: 120px; opacity: 1; margin-top: 8px; }

/* ---------- Badge / Tag ---------- */
.vz-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: var(--text-caption); font-weight: var(--weight-semibold); padding: 5px 11px; border-radius: var(--radius-pill); line-height: 1; }
.vz-badge.solid { background: var(--coral-500); color: var(--white); }
.vz-badge.teal { background: var(--teal-600); color: var(--white); }
.vz-badge.amber { background: var(--amber-100); color: var(--amber-600); }
.vz-badge.glass { background: rgba(255,255,255,0.9); color: var(--ink-900); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vz-badge.soft { background: var(--coral-50); color: var(--coral-600); }
.vz-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: var(--text-body-s); font-weight: var(--weight-medium); padding: 6px 13px; border-radius: var(--radius-pill); border: 1px solid var(--border-default); background: var(--surface-card); color: var(--text-body); }
.vz-tag.teal { background: var(--teal-50); border-color: var(--teal-200); color: var(--teal-700); }

/* ---------- Forms ---------- */
.vz-field { display: flex; flex-direction: column; gap: var(--space-2); }
.vz-label { font-family: var(--font-sans); font-size: var(--text-body-s); font-weight: var(--weight-semibold); color: var(--text-body); }
.vz-input, .vz-select, .vz-textarea {
  width: 100%; font-family: var(--font-sans); font-size: var(--text-body-m); color: var(--text-body);
  background: var(--surface-card); border: 1.5px solid var(--border-default); border-radius: var(--radius-md);
  padding: 13px 16px; min-height: 48px; transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.vz-input.lg { min-height: 56px; font-size: var(--text-body-l); }
.vz-input:focus, .vz-select:focus, .vz-textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: var(--shadow-focus); }
.vz-input::placeholder, .vz-textarea::placeholder { color: var(--text-subtle); }
.vz-inputgroup { position: relative; display: flex; align-items: center; }
.vz-inputgroup .icon { position: absolute; left: 15px; color: var(--text-subtle); display: inline-flex; pointer-events: none; }
.vz-inputgroup .vz-input { padding-left: 46px; }

/* ---------- Footer ---------- */
.vz-footer { background: var(--surface-inverse); color: var(--text-inverse); padding-block: var(--space-16) var(--space-8); }
.vz-footer a { color: rgba(251,248,242,0.72); }
.vz-footer a:hover { color: var(--white); }
.vz-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--space-10); margin-bottom: var(--space-12); }
.vz-footer .col h5 { font-family: var(--font-sans); font-size: var(--text-body-s); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: rgba(251,248,242,0.5); margin: 0 0 var(--space-4); }
.vz-footer .col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.vz-footer .brand { font-family: var(--font-display); font-size: 28px; color: var(--white); display: inline-flex; align-items: baseline; gap: 2px; }
.vz-footer .brand .dot { color: var(--coral-400); font-size: 32px; line-height: 0; }
.vz-footer .brand-blurb { color: rgba(251,248,242,0.6); max-width: 34ch; margin: var(--space-4) 0 0; line-height: var(--leading-relaxed); }
.vz-footer-base { display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); padding-top: var(--space-8); border-top: 1px solid rgba(251,248,242,0.14); color: rgba(251,248,242,0.5); font-size: var(--text-body-s); flex-wrap: wrap; }

/* ---------- Utility ---------- */
.grid { display: grid; gap: var(--space-6); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.stat-list { display: flex; gap: var(--space-10); flex-wrap: wrap; }
.stat .n { font-family: var(--font-display); font-size: var(--text-display-m); color: var(--text-strong); line-height: 1; }
.stat .l { font-size: var(--text-body-s); color: var(--text-muted); margin-top: var(--space-2); }
.divider { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }
.icon-16 { width: 16px; height: 16px; }
.icon-20 { width: 20px; height: 20px; }
.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal-up.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .vz-footer-grid { grid-template-columns: 1fr 1fr; }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .vz-navlinks, .vz-nav-actions .desktop-only { display: none; }
  .vz-nav { padding-inline: var(--space-5); }
  .vz-h1 { font-size: 40px; }
  .vz-h2 { font-size: 30px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .g-2, .g-3, .g-4, .vz-footer-grid { grid-template-columns: 1fr; }
  .stat-list { gap: var(--space-6); }
}

/* ============================================================
   Tweaks drawer — spacing & rhythm controls
   ============================================================ */
#vz-tweaks-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  width: 320px; max-width: calc(100vw - 40px);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  font-family: var(--font-sans);
  color: var(--text-body);
  overflow: hidden;
  animation: vzt-in 180ms var(--ease-out, ease-out);
}
#vz-tweaks-panel[hidden] { display: none; }
@keyframes vzt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vzt-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-brand-soft);
}
.vzt-eyebrow {
  display: block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--coral-600);
}
.vzt-head h3 { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 19px; color: var(--text-strong); margin: 3px 0 0; }
.vzt-x {
  border: 0; background: transparent; cursor: pointer; font-size: 22px; line-height: 1;
  color: var(--text-muted); padding: 0 2px; border-radius: var(--radius-sm);
}
.vzt-x:hover { color: var(--text-strong); }
.vzt-body { padding: 6px 18px 10px; display: flex; flex-direction: column; gap: 14px; max-height: 62vh; overflow-y: auto; }
.vzt-row { display: block; padding-top: 10px; }
.vzt-rowtop { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.vzt-label { font-size: var(--text-body-s); font-weight: var(--weight-semibold); color: var(--text-strong); }
.vzt-val { font-family: var(--font-mono); font-size: 12px; color: var(--coral-600); }
.vzt-hint { display: block; font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.vzt-row input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  border-radius: var(--radius-pill); background: var(--sand-200); outline: none; cursor: pointer;
}
.vzt-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--coral-500); border: 2px solid var(--white); box-shadow: var(--shadow-sm); cursor: pointer;
}
.vzt-row input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--coral-500);
  border: 2px solid var(--white); box-shadow: var(--shadow-sm); cursor: pointer;
}
.vzt-row input[type="range"]:focus-visible { box-shadow: var(--shadow-focus-brand); }
.vzt-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--border-subtle); background: var(--surface-sunken);
}
.vzt-reset {
  border: 1px solid var(--border-default); background: var(--surface-card); cursor: pointer;
  font-family: var(--font-sans); font-size: var(--text-body-s); font-weight: var(--weight-semibold);
  color: var(--text-strong); padding: 7px 12px; border-radius: var(--radius-pill);
}
.vzt-reset:hover { border-color: var(--coral-400); color: var(--coral-600); }
.vzt-note { font-size: 11px; color: var(--text-muted); }
