/* ==========================================================================
   DICA shared navigation — top header + journey bar
   --------------------------------------------------------------------------
   ONE source of truth for the header across diveintoacoachapproach.com.
   Do not copy these rules into a page's inline <style>; page-level overrides
   are what this file exists to eliminate.

   Markup is generated by scripts/sync-dica-nav.cjs — run it after editing the
   nav model there, then redeploy. Visual baseline: the Into Practice header.

   Collapse is FIT-DRIVEN, not width-driven. dica-nav.js measures the row and
   sets .dica-nav--compact the moment brand + links + CTA stop fitting, so a
   long CTA ("I'm Ready to Write 'Goal Achieved'") collapses earlier than a
   short one ("Dip Your Toe In"). A fixed breakpoint cannot do this — at 1280px
   the Goal Achieved row overflows while every other page still fits.

     default            full inline nav + CTA
     .dica-nav--compact brand + menu button; links in the drawer
     + max-width 600px  CTA moves into the drawer too
   Labels never wrap: white-space is nowrap and the drawer takes over instead.
   Without JS nothing collapses (the button could not open anyway) — the links
   row scrolls horizontally so every destination stays reachable.
   ========================================================================== */

/* The header sets its OWN typeface rather than inheriting the page's body
   font. Eight pages run Effra (Typekit); Dip Your Toe and About run Urbanist,
   so an inherited font rendered those two headers in a visibly different face.
   sync-dica-nav.cjs guarantees the Typekit sheet is present on every page. */
.dica-nav,
.dica-journey {
  font-family: 'Effra', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Top header ---------- */
.dica-nav {
  background: var(--color-dica-2, #1c4554);
  padding: 0 20px;
  position: relative;
  z-index: 200;
}

/* 1220px, not the 1120px used by page content. The Goal Achieved row needs
   1199px at the spacing below; capped at 1120 that page could never fit and
   would show the menu button at every width, including 1920. The 50px-a-side
   difference from body content is the cost of keeping the roomier spacing. */
.dica-nav-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  gap: 16px;
}

.dica-nav-mark {
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}
.dica-nav-mark em { font-style: italic; }
.dica-nav-mark sup { font-size: 0.65em; }
.dica-nav-mark:hover { opacity: 0.85; }

.dica-nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  /* Must not compress: a shrinking links row silently swallows its own
     overflow, which both squashes the row against the CTA and hides the
     overflow from the fit measurement in dica-nav.js. */
  flex-shrink: 0;
}

/* The drawer carries its own copy of the CTA for narrow screens. It is hidden
   at every width where the bar CTA is showing, so only one is ever rendered. */
.dica-nav-links > .dica-nav-cta { display: none; }

/* Roomier metrics, matching the Into Practice baseline (Hélène, 2026-08-10).
   The longest CTA ("I'm Ready to Write 'Goal Achieved'") needs a wider row
   than the others, which is why .dica-nav-inner is capped above 1120px — see
   the note there. Goal Achieved therefore reaches the drawer sooner than its
   siblings, which is the accepted trade for keeping this spacing. */
.dica-nav-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;          /* labels stay on one line — never wrap */
  transition: color 0.15s;
}
.dica-nav-links a:hover { color: #fff; }

/* Current page — light-turquoise bold treatment */
.dica-nav-links a.active {
  color: #a8e0dd;
  font-weight: 700;
}

/* ---------- Header CTA ---------- */
.dica-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-action, #f88379);
  color: var(--color-ink, #534641);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  transition: transform 0.15s, box-shadow 0.15s;
}
.dica-nav-cta:hover,
.dica-nav-cta:focus {
  color: var(--color-ink, #534641);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(248, 131, 121, 0.4);
}

/* ---------- Menu button (drawer trigger) ---------- */
.dica-nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.dica-nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.dica-nav-toggle:focus-visible { outline: 2px solid #a8e0dd; outline-offset: 2px; }
.dica-nav-toggle span {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.15s;
}
.dica-nav-toggle span::before,
.dica-nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.18s ease;
}
.dica-nav-toggle span::before { top: -6px; }
.dica-nav-toggle span::after { top: 6px; }

.dica-nav-toggle[aria-expanded="true"] span { background: transparent; }
.dica-nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.dica-nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Journey bar ---------- */
/* Sizes below are px, not rem, for the same reason as the header: ffc-base.css
   sets an 18px root on nine pages but Dip Your Toe inherits 16px, which
   silently rendered that page's nav 12.5% smaller than everyone else's. */
.dica-journey {
  background: var(--card, #fafaf7);
  border-top: 1px solid var(--rule, rgba(28, 69, 84, 0.12));
  border-bottom: 1px solid var(--rule, rgba(28, 69, 84, 0.12));
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--color-ink-light, #7a6f6a);
  letter-spacing: 0.02em;
}
.dica-journey a {
  color: var(--color-dica-2, #1c4554);
  text-decoration: underline;
}
.dica-journey a:hover { opacity: 0.75; }

/* Current step — visually distinguished from the linked steps */
.dica-journey .current-step {
  font-weight: 700;
  color: var(--color-dica-2, #1c4554);
}
.dica-journey .sep {
  margin: 0 6px;
  color: var(--color-dica-1, #1caba4);
  opacity: 0.6;
}

/* ==========================================================================
   Compact mode — set by dica-nav.js when the row no longer fits
   ========================================================================== */
.dica-nav--compact .dica-nav-toggle { display: inline-flex; }
.dica-nav--compact .dica-nav-inner { gap: 10px; }

.dica-nav--compact .dica-nav-links {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 8px 20px 14px;
  background: var(--color-dica-2, #1c4554);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}
.dica-nav--compact .dica-nav-links.is-open { display: flex; }

.dica-nav--compact .dica-nav-links a {
  padding: 12px 4px;
  font-size: 15px;
  border-radius: 0;
}
.dica-nav--compact .dica-nav-links a + a { border-top: 1px solid rgba(255, 255, 255, 0.08); }

.dica-nav--compact .dica-nav-links > .dica-nav-cta {
  margin-top: 12px;
  padding: 12px 18px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border-top: 0;
}

/* Narrow screens: the bar CTA hands off to the drawer copy. */
@media (max-width: 600px) {
  .dica-nav--compact .dica-nav-inner > .dica-nav-cta { display: none; }
  .dica-nav--compact .dica-nav-links.is-open > .dica-nav-cta { display: inline-flex; }
  .dica-nav-mark { font-size: 15px; }
  .dica-journey { font-size: 13px; padding: 9px 14px; }
  .dica-journey .sep { margin: 0 4px; }
}

/* No JS: never hide the links behind a button that cannot open. Let the row
   scroll instead so every destination stays reachable. */
html:not(.dica-nav-js) .dica-nav-inner { overflow-x: auto; }
html:not(.dica-nav-js) .dica-nav-toggle { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .dica-nav-cta,
  .dica-nav-toggle span,
  .dica-nav-toggle span::before,
  .dica-nav-toggle span::after { transition: none; }
}
