/* Build 19 v2: unified header + footer chrome for all public pages.
   Inlined HTML on each page references these classes; the CSS is the
   single source of truth.

   Flow coverage sweep (OEG-BRIEF-2026-FLOW-01, 2026-06-25): the header
   and footer are the connective tissue every public page shares, so they
   carry the flow. The header is the FLOW RAIL by default: a frosted cream
   bar with ink links, not the old dark slab, so a page reads as one
   continuous cream surface from the rail down instead of a dark bar
   bolted over a cream page. The footer is the page's terminal navy
   PUNCTUATION: it feathers up out of the surrounding cream into navy with
   no fencing rule, the same way the landing's deep zones feather. Both
   are shared-layer only (every marketing page already loads this sheet
   and renders .oc-nav / the injected .oc-foot), so the flow reaches every
   linked page with no per-page markup. The live dashboard and embedded
   app render their own chrome (chrome.js) and never use .oc-nav / .oc-foot,
   so they are untouched. Colour is token-driven to the locked palette:
   cream paper, navy ink, teal action, gold the signature mark only. */

.oc-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  /* the flow rail: a frosted cream bar that lifts the page, not a dark slab */
  background: color-mix(in srgb, var(--oddly-canvas, #FAFAF7) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--oddly-border, #E8E6E0);
  transition: background 240ms var(--oddly-ease, ease),
    border-color 240ms var(--oddly-ease, ease),
    box-shadow 240ms var(--oddly-ease, ease);
}
.oc-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.oc-mark {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--oddly-ink, #1A1A2E);
  text-decoration: none;
  display: inline-block;
}
/* Titan 2026-06-15: the brand mark is the GOLD "o", restored across every
 * header to match the masthead and footer (the teal-o was a regression).
 * 5-degree tilt matches the canonical halo logomark. */
.oc-mark .oc-o {
  color: var(--oddly-gold, #B08D57);
  display: inline-block;
  transform: rotate(5deg);
  transform-origin: 50% 60%;
}
.oc-mark:hover { text-decoration: none; }
.oc-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.oc-nav-links a {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--oddly-ink, #1A1A2E);
  text-decoration: none;
  white-space: nowrap;
}
.oc-nav-links a:hover { color: var(--oddly-teal, #2C7873); }
.oc-nav-links .oc-cta {
  background: var(--oddly-teal, #2C7873);
  color: var(--oddly-canvas, #FAFAF7);
  padding: 9px 18px;
  border-radius: 0;
  font-weight: 600;
  transition: background 120ms ease;
}
.oc-nav-links .oc-cta:hover { background: var(--oddly-teal-hover, #246059); color: var(--oddly-canvas, #FAFAF7); }

/* Titan 2026-06-15: header dropdown pattern. oddly-nav.js groups the flat
 * inline links (which stay in the crawlable HTML) into Product + Resources
 * mega-menus at runtime; this styles the trigger + panel. Desktop only:
 * the mobile overlay keeps the flat list. */
.oc-group { position: relative; display: inline-flex; align-items: center; }
.oc-trigger {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--oddly-ink, #1A1A2E);
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.oc-trigger:hover, .oc-group.open .oc-trigger, .oc-group:hover .oc-trigger { color: var(--oddly-teal, #2C7873); }
.oc-trigger .oc-caret {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}
.oc-group.open .oc-trigger .oc-caret { transform: translateY(1px) rotate(-135deg); }
.oc-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  min-width: 230px;
  background: var(--oddly-surface, #FFFFFF);
  border: 1px solid var(--oddly-border, #E8E6E0);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--oddly-shadow-pop, 0 18px 40px rgba(26, 26, 46, 0.12));
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  z-index: 60;
}
/* a hover bridge so the pointer can cross the gap to the panel */
.oc-group::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.oc-group:hover .oc-menu, .oc-group.open .oc-menu, .oc-group:focus-within .oc-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.oc-menu a {
  display: block;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--oddly-ink, #1A1A2E);
  border-radius: 6px;
  white-space: nowrap;
}
.oc-menu a:hover { background: var(--oddly-surface-sunken, #F4F2EC); color: var(--oddly-teal, #2C7873); }

/* Defaults: keep mobile-only elements hidden on desktop. The media query
   blocks at the bottom flip these on for narrow viewports. */
#mobile-nav { display: none; }
#mobile-nav.open { display: flex; align-items: center; justify-content: center; }

/* Hamburger + full-screen mobile overlay (Build 24.5/24.6) */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  /* 44px square: the WCAG 2.5.5 target size, up from 40 (a11y QA 2026-06-24). */
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  padding: 11px 10px;
  cursor: pointer;
  position: relative;
  z-index: 10000;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--oddly-ink, #1A1A2E);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
  transform-origin: center;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.98);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  width: 100%;
  max-width: 360px;
}
.mn-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: 0 0 8px;
  list-style: none;
  padding: 0;
}
.mn-links a {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 32px;
  font-weight: 500;
  color: #fafaf7;
  text-decoration: none;
  transition: color 160ms ease;
}
.mn-links a:hover, .mn-links a:active, .mn-links a:focus { color: #2c7873; }
.mn-cta {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  width: 100%;
  display: block;
  text-align: center;
  background: #2c7873;
  color: #fafaf7;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 160ms ease;
  margin-top: 8px;
}
.mn-cta:hover, .mn-cta:focus { background: #1f5f5b; color: #fafaf7; }

/* Build 26: dedicated close button injected by oddly-nav.js. Sits in the
   top-right of the overlay above the menu content so the user always has
   an explicit way out, regardless of header stacking context. */
.mn-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(250, 250, 249, 0.08);
  color: #fafaf7;
  font-size: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: background 160ms ease, transform 160ms ease;
}
.mn-close:hover, .mn-close:focus { background: rgba(250, 250, 249, 0.16); transform: scale(1.05); }
.mn-close:focus-visible { outline: 2px solid #2c7873; outline-offset: 2px; }

body.mn-open { overflow: hidden; }

@media (max-width: 768px) {
  .oc-nav-links { gap: 0; }
  .oc-nav-links a { display: none; }
  .oc-nav-links .oc-group, .oc-nav-links .oc-trigger { display: none; }
  .hamburger { display: flex; }
}
@media (min-width: 769px) {
  .mobile-nav-overlay { display: none !important; }
}

/* Footer (Build 52.x IA redesign; flowed 2026-06-25).
 * Four labeled link columns over a logo + trust + entity row. Token-driven:
 * the marketing pages load /_shared/oddly-tokens.css via oddly-footer.js, and
 * color-mix carries the muted-on-dark text without a hardcoded value.
 *
 * Flow coverage sweep: the footer is the page's terminal navy PUNCTUATION,
 * not a slab bolted on with a gold rule. It feathers up out of the
 * surrounding cream into navy (the same move the landing's deep zones make),
 * so a cream page resolves into the footer with no hard seam. The old
 * border-top gold rule (a fencing stroke, and gold is signature-only) is
 * gone. The feather's top colour is the page's neighbour: it defaults to the
 * cream canvas, and a page whose last zone is already navy (the landing's
 * close) sets --oc-foot-top to the ink token so the descent stays
 * navy-on-navy continuous. The content clears the feather via the top
 * padding so every label sits on solid navy at full contrast. */
.oc-foot {
  --oc-foot-feather: clamp(72px, 9vw, 112px);
  background: linear-gradient(
    180deg,
    var(--oc-foot-top, var(--oddly-canvas)) 0,
    var(--oddly-ink) var(--oc-foot-feather),
    var(--oddly-ink) 100%);
  color: color-mix(in srgb, var(--oddly-canvas) 78%, transparent);
  padding: calc(var(--oc-foot-feather) + var(--oddly-space-5)) var(--oddly-space-5) var(--oddly-space-6);
}
.oc-foot-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--oddly-font-sans);
}
.oc-foot-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--oddly-space-6);
  margin-bottom: var(--oddly-space-6);
}
.oc-foot-col {
  display: flex;
  flex-direction: column;
  gap: var(--oddly-space-2);
}
.oc-foot-col-label {
  font: var(--oddly-text-label);
  letter-spacing: var(--oddly-tracking-label);
  text-transform: uppercase;
  color: color-mix(in srgb, var(--oddly-canvas) 55%, transparent);
  margin: 0 0 var(--oddly-space-1);
}
.oc-foot-col a {
  color: color-mix(in srgb, var(--oddly-canvas) 80%, transparent);
  text-decoration: none;
  font-size: var(--oddly-font-size-small);
  font-weight: var(--oddly-weight-medium);
}
.oc-foot-col a:hover {
  color: var(--oddly-canvas);
  text-decoration: underline;
}
.oc-foot-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--oddly-space-2);
  text-align: center;
  padding-top: var(--oddly-space-5);
  border-top: 1px solid color-mix(in srgb, var(--oddly-canvas) 14%, transparent);
}
.oc-foot-logo {
  font-size: var(--oddly-font-size-title);
  font-weight: var(--oddly-weight-semibold);
  letter-spacing: var(--oddly-tracking-display);
  color: var(--oddly-canvas);
}
.oc-foot-logo .o {
  color: var(--oddly-gold);
  display: inline-block;
  transform: rotate(5deg);
  transform-origin: 50% 60%;
}
.oc-foot-compliance {
  font: var(--oddly-text-small);
  color: color-mix(in srgb, var(--oddly-canvas) 70%, transparent);
  letter-spacing: 0.02em;
}
.oc-foot-entity {
  font: var(--oddly-text-small);
  color: color-mix(in srgb, var(--oddly-canvas) 58%, transparent);
  letter-spacing: 0.04em;
}
@media (max-width: 720px) {
  .oc-foot-cols { grid-template-columns: repeat(2, 1fr); gap: var(--oddly-space-5); }
}
@media (max-width: 420px) {
  .oc-foot-cols { grid-template-columns: 1fr; }
}

/* ============================================================
 * Keyboard focus indicators (a11y QA pass 2026-06-24, WCAG 2.4.7).
 * The shared header + footer chrome carried hover styles but no
 * visible keyboard-focus state, so tabbing through the nav, the
 * dropdown triggers/items, the brand marks and the footer links
 * left the focused control unmarked. A visible ring on every chrome
 * control, only on keyboard focus (:focus-visible never fires on a
 * mouse click), so pointer/touch users see no change.
 *
 * Flow coverage sweep (2026-06-25): the header is now the cream flow
 * rail (it used to be the dark slab), and gold reads only ~2.9:1 on
 * cream, below the 3:1 non-text-contrast bar (WCAG 1.4.11). So the
 * ring is split by surface: TEAL on the light rail + light dropdown
 * (teal reads ~4.9:1 on cream), GOLD on the dark surfaces (the navy
 * footer and the dark mobile overlay, where gold reads >=5:1). Both
 * are locked palette tokens. */
.oc-mark:focus-visible,
.oc-nav-links a:focus-visible,
.oc-nav-links .oc-cta:focus-visible,
.oc-trigger:focus-visible,
.oc-menu a:focus-visible,
.hamburger:focus-visible {
  outline: 2px solid var(--oddly-teal, #2C7873);
  outline-offset: 3px;
  border-radius: 1px;
}
.oc-foot-col a:focus-visible,
.oc-foot-logo:focus-visible,
.mn-links a:focus-visible,
.mn-cta:focus-visible {
  outline: 2px solid var(--oddly-gold, #B08D57);
  outline-offset: 3px;
  border-radius: 1px;
}
/* dropdown menu items sit on a tight panel: pull the ring inside the item
 * so it never clips against the panel edge. Extra specificity (.oc-nav
 * scope) so the content focus baseline can never push it back out. */
.oc-nav .oc-menu a:focus-visible { outline-offset: -2px; }

/* Body-text wordmark (Part 6 unification): "o" teal, "ddly" inherits the
   context color. Use as <span class="oddly-mark">oddly</span> anywhere.
   `display:inline-block` so ::first-letter targets the "o". */
.oddly-mark {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-block;
  color: inherit;
  text-shadow: none;
}
.oddly-mark::first-letter { color: var(--oddly-gold, #B08D57); }

/* ============================================================
 * FLOW header (2026-06-17, generalized 2026-06-25). The connective
 * tissue that makes the marketing site read as one continuous,
 * light-dominant flow: the header is the frosted cream rail with
 * ink links (now the .oc-nav DEFAULT above, not a .titan override,
 * so every public page that renders .oc-nav gets it with no per-page
 * markup), and on a hero page the header starts transparent (sharing
 * the hero field, no hard seam) then solidifies on scroll. Gold stays
 * the O; teal stays the CTA.
 *
 * The hero-blend below stays scoped under body.titan + .flow-hero /
 * .flow-hero-dark: only a page that knows it opens with a hero band
 * opts into the transparent-until-scrolled treatment. .oc-nav never
 * reaches the live dashboard or embedded app (they render their own
 * chrome.js nav), so the cream-rail default does not touch them.
 * ============================================================ */

/* Header to hero blend. A page that opens with a hero band adds
 * .flow-hero (light hero) or .flow-hero-dark (navy hero) to <body>;
 * the header then starts transparent so it shares the hero field,
 * and oddly-nav.js adds .is-scrolled past the fold to bring the
 * frosted rail back. */
body.titan.flow-hero .oc-nav:not(.is-scrolled),
body.titan.flow-hero-dark .oc-nav:not(.is-scrolled) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}
/* over a navy hero the nav text inverts to cream until it solidifies */
body.titan.flow-hero-dark .oc-nav:not(.is-scrolled) .oc-mark,
body.titan.flow-hero-dark .oc-nav:not(.is-scrolled) .oc-nav-links a,
body.titan.flow-hero-dark .oc-nav:not(.is-scrolled) .oc-trigger {
  color: var(--oddly-canvas, #FAFAF7);
}
body.titan.flow-hero-dark .oc-nav:not(.is-scrolled) .hamburger span {
  background: var(--oddly-canvas, #FAFAF7);
}
/* the solidified rail: a frosted cream bar that lifts off the page */
body.titan .oc-nav.is-scrolled {
  background: color-mix(in srgb, var(--oddly-canvas, #FAFAF7) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--oddly-border, #E8E6E0);
  box-shadow: 0 10px 30px -24px rgba(26, 26, 46, 0.55);
}
