/* A11y utility — visually hidden but available to AT/crawlers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Nav */
.tz-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.tz-nav.scrolled { border-bottom-color: var(--line); }
.tz-nav .inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 32px;
}
.tz-logo {
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: -0.04em;
  font-size: 22px;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.tz-logo .mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--ink);
  position: relative;
}
.tz-logo .mark::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 3px;
  background: var(--accent);
}
.tz-nav ul:not(.tz-mm-list) { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.tz-nav ul:not(.tz-mm-list) > li > a {
  font-size: 14px; color: var(--ink-2); letter-spacing: -0.005em;
  padding: 6px 0; position: relative;
}
.tz-nav ul:not(.tz-mm-list) > li > a:hover { color: var(--ink); }
.tz-nav ul:not(.tz-mm-list) > li > a.active { color: var(--ink); }
.tz-nav ul:not(.tz-mm-list) > li > a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.tz-nav .spacer { flex: 1; }
.tz-nav .right { display: flex; align-items: center; gap: 12px; }
.tz-theme-btn {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg-elev);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-2);
}
.tz-theme-btn:hover { color: var(--ink); }
.tz-theme-btn svg { width: 16px; height: 16px; }
:root[data-theme="dark"] .tz-theme-btn .sun { display: block; }
:root[data-theme="dark"] .tz-theme-btn .moon { display: none; }
.tz-theme-btn .sun { display: none; }
.tz-theme-btn .moon { display: block; }

@media (max-width: 720px) {
  .tz-nav ul:not(.tz-mm-list) { display: none; }
}
@media (max-width: 560px) {
  .tz-nav .inner { gap: 12px; padding: 12px var(--gutter); }
  .tz-nav .right { gap: 8px; }
  .tz-nav .right .chip { display: none !important; }
  .tz-nav .right .btn { padding: 8px 14px; font-size: 13px; }
  .tz-nav .right .btn .arrow { display: none; }
  .tz-theme-btn { width: 32px; height: 32px; }
  .tz-logo { font-size: 18px; gap: 8px; }
  .tz-logo .mark { width: 18px; height: 18px; }
}

/* Services dropdown */
.tz-nav ul li { position: static; }
.tz-nav ul li.has-dropdown > a { display: inline-flex; align-items: center; gap: 6px; }
.tz-caret { color: var(--ink-3); transition: transform .2s ease, color .2s ease; display: inline-flex; }
.tz-nav ul li.has-dropdown:hover .tz-caret,
.tz-nav ul li.has-dropdown.open .tz-caret { transform: rotate(180deg); color: var(--ink); }

/* Megamenu — fixed under nav bar, full-width flyout */
.tz-megamenu {
  position: fixed;
  left: 0; right: 0;
  top: var(--tz-nav-h, 64px);
  padding: 10px var(--gutter) 0;
  pointer-events: none;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 60;
}
.tz-nav ul li.has-dropdown.open .tz-megamenu,
.tz-nav ul li.has-dropdown:hover .tz-megamenu,
.tz-nav ul li.has-dropdown:focus-within .tz-megamenu {
  opacity: 1; transform: none; pointer-events: auto;
}
.tz-mm {
  max-width: var(--container-wide);
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(10, 10, 11, 0.18), 0 4px 14px -8px rgba(10, 10, 11, 0.08);
  overflow: hidden;
}
.tz-mm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}
.tz-mm-col { padding: 24px 28px 20px; }
.tz-mm-col + .tz-mm-col { border-left: 1px solid var(--line); }
.tz-mm-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line);
}
.tz-mm-head .tz-mm-eyebrow {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: 0.16em; color: var(--ink-3);
  text-transform: uppercase;
}
.tz-mm-head .tz-mm-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 580;
  letter-spacing: -0.02em; color: var(--ink); margin: 0;
}
.tz-mm-head .tz-mm-count {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3);
}
.tz-mm-list {
  list-style: none; margin: 0; padding: 0;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.tz-mm-list > li { display: block; position: static; }
.tz-mm-list a {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 10px; border-radius: 10px;
  text-decoration: none;
  transition: background .15s ease;
}
.tz-mm-list a::after { display: none !important; }
.tz-mm-list a:hover { background: var(--bg-sunken); }
.tz-mm-code {
  flex-shrink: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: 0.06em; color: var(--ink-3);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  min-width: 34px; text-align: center;
  margin-top: 1px;
}
.tz-mm-col.tz-mm-sec .tz-mm-code { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 30%, var(--line)); }
.tz-mm-text { min-width: 0; display: block; }
.tz-mm-label {
  display: block; font-size: 14px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.005em; line-height: 1.3;
}
.tz-mm-meta {
  display: block; font-size: 12px; color: var(--ink-3);
  margin-top: 2px; line-height: 1.4;
}
.tz-mm-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 28px;
  background: var(--bg-sunken);
  border-top: 1px solid var(--line);
}
.tz-mm-foot-left {
  display: flex; align-items: center; gap: 18px;
  font-size: 13px; color: var(--ink-3);
}
.tz-mm-foot-left strong { color: var(--ink); font-weight: 540; letter-spacing: -0.005em; }
.tz-mm-foot-link {
  font-size: 13px; color: var(--accent);
  text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.tz-mm-foot-link::after { display: none !important; }
.tz-mm-foot-link:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .tz-mm-list { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .tz-mm-grid { grid-template-columns: 1fr; }
  .tz-mm-col + .tz-mm-col { border-left: 0; border-top: 1px dashed var(--line); }
}
@media (max-width: 720px) {
  .tz-megamenu { display: none; }
}

/* Legacy rules kept harmless for any page still using old .tz-dropdown */
/* Legacy rules kept harmless for any page still using old .tz-dropdown */
.tz-dropdown { display: none !important; }

/* Mobile hamburger */
.tz-burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2); background: var(--bg-elev);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 0;
}
.tz-burger span { display: block; width: 16px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
.tz-nav.drawer-open .tz-burger span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.tz-nav.drawer-open .tz-burger span:nth-child(2) { opacity: 0; }
.tz-nav.drawer-open .tz-burger span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

@media (max-width: 900px) {
  .tz-nav .right .chip { display: none !important; }
}
@media (max-width: 720px) {
  .tz-burger { display: inline-flex; }
  .tz-nav .tz-theme-btn { display: none; }
  .tz-nav .right .btn { display: none; }
}

/* Mobile drawer */
.tz-drawer {
  position: fixed; inset: 64px 0 0 0; z-index: 49;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
  overflow-y: auto;
}
.tz-nav.drawer-open ~ .tz-drawer,
body.tz-drawer-open .tz-drawer {
  opacity: 1; pointer-events: auto; transform: none;
}
.tz-drawer-inner {
  padding: 24px var(--gutter) 80px;
  display: flex; flex-direction: column; gap: 4px;
  max-width: 560px;
}
.tz-dr-link {
  display: block;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: -0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.tz-dr-group { border-bottom: 1px solid var(--line); }
.tz-dr-group summary {
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: -0.02em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.tz-dr-group summary::-webkit-details-marker { display: none; }
.tz-dr-group summary svg { color: var(--ink-3); transition: transform .2s ease; }
.tz-dr-group[open] summary svg { transform: rotate(180deg); }
.tz-dr-sub { display: grid; gap: 2px; padding: 4px 0 16px; }
.tz-dr-sub a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-sunken);
  color: var(--ink);
}
.tz-dr-sub a span { display: block; font-size: 15px; font-weight: 500; }
.tz-dr-sub a em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.tz-dr-cta { align-self: flex-start; margin-top: 20px; }

body.tz-drawer-open { overflow: hidden; }

/* Footer */
.tz-foot {
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.tz-foot .inner {
  max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 0.9fr; gap: 40px;
}
.tz-foot h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; font-weight: 500; }
.tz-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tz-foot ul a { color: var(--ink-2); font-size: 15px; }
.tz-foot ul a:hover { color: var(--accent); }
.tz-foot .brand { font-family: var(--font-display); font-size: 44px; font-weight: 580; letter-spacing: -0.03em; line-height: 0.95; color: var(--ink); max-width: 16ch; }
.tz-foot .legal {
  max-width: var(--container-wide); margin: 64px auto 0; padding: 24px var(--gutter) 0;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  color: var(--ink-3); font-size: 13px;
}
.tz-foot .legal a:hover { color: var(--ink); }
@media (max-width: 820px) {
  .tz-foot .inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tz-foot .brand { grid-column: 1 / -1; font-size: 32px; }
}
@media (max-width: 480px) {
  .tz-foot { padding: 40px 0 28px; }
  .tz-foot .inner { grid-template-columns: 1fr; gap: 28px; }
  .tz-foot .brand { font-size: 28px; }
  .tz-foot .legal { margin-top: 40px; gap: 12px; flex-direction: column; align-items: flex-start; }
}

/* Tweaks panel */
#tz-tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; width: 240px;
  box-shadow: var(--shadow-l);
  font-family: var(--font-body); font-size: 13px;
}
#tz-tweaks .tt-head { font-family: var(--font-mono); text-transform: uppercase; font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 10px; }
#tz-tweaks .tt-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
#tz-tweaks .tt-btn { border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; }
#tz-tweaks input[type="color"] { width: 44px; height: 28px; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; cursor: pointer; padding: 0; }

/* Reveal — progressive enhancement: only hide when JS has marked the body */
.js-reveal .reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s ease, transform .8s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* Image placeholder */
.img-ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklab, var(--ink) 5%, transparent) 0 1px, transparent 1px 10px),
    var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.img-ph .lbl {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 999px;
}
