/* ============================================================
   Code You Keep — site stylesheet
   Look and feel carried over from weblytica.com: deep navy leads,
   orange accents sparingly, Roboto throughout, light + dark themes.

   Contrast notes (measured, not guessed):
     #ff9900 on white .... 2.14:1  -> never used for text on light
     #985800 on white .... 5.63:1  -> the light-mode accent text colour
     #ff9900 on #000033 .. 9.36:1  -> the dark-mode accent text colour
     #000033 on #ff9900 .. 9.36:1  -> button label on the orange button
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&display=swap');

/* ---- Tokens -------------------------------------------------------- */
:root {
  --navy: #000033;
  --navy-700: #16163f;
  --navy-500: #2c2c56;
  --orange-500: #ff9900;
  --orange-600: #e08600;
  --orange-800: #985800;

  /* Light theme (default) */
  --bg: #ffffff;
  --bg-alt: #f4f4f8;
  --bg-invert: #000033;
  --surface: #ffffff;
  --surface-2: #f4f4f8;
  --border: rgba(0, 0, 51, 0.14);
  --border-strong: rgba(0, 0, 51, 0.28);
  --text: #000033;
  --text-body: #12122e;
  --text-muted: #55556b;
  --text-invert: #ffffff;
  --accent: var(--orange-800);
  --accent-bar: var(--orange-500);
  --shadow: 0 1px 2px rgba(0, 0, 51, .06), 0 10px 30px rgba(0, 0, 51, .07);
  --shadow-lg: 0 2px 6px rgba(0, 0, 51, .08), 0 24px 60px rgba(0, 0, 51, .13);

  --font: 'Roboto', Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --maxw: 1180px;
  --maxw-narrow: 760px;
  --radius: 10px;
  --radius-lg: 16px;
  --step: clamp(1.5rem, 4vw, 3rem);
  --header-h: 68px;
}

:root[data-theme="dark"] {
  --bg: #05051c;
  --bg-alt: #0c0c2b;
  --bg-invert: #0c0c2b;
  --surface: #0c0c2b;
  --surface-2: #14143a;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.3);
  --text: #ffffff;
  --text-body: #e8e8f2;
  --text-muted: #b4b4c8;
  --text-invert: #ffffff;
  --accent: var(--orange-500);
  --accent-bar: var(--orange-500);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .55), 0 24px 60px rgba(0, 0, 0, .55);
}

/* ---- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--text); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.35rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: from-font; }
a:hover { color: var(--text); }
strong { font-weight: 700; color: var(--text); }
:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 3px; border-radius: 4px; }

/* Divider lines are never allowed on this stack. */
hr { display: none; }

/* Brand accent span, produced by *asterisk* tokens at build and at runtime. */
.accent { color: var(--accent); }
:root[data-theme="dark"] .accent { color: var(--orange-500); }
/* An empty editable field must not leave a gap or a stray lead-in. Targeted on
   purpose: a blanket [data-wl-field]:empty rule would also hide every <img>
   (always childless) and collapse empty table header cells. */
.eyebrow:empty, .feature-list li strong:empty, .site-footer__tagline:empty { display: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--orange-500); color: var(--navy); font-weight: 700;
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.container--narrow { width: 100%; max-width: var(--maxw-narrow); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

/* ---- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; line-height: 1.2;
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
a.btn { text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--orange-500); color: var(--navy); border-color: var(--orange-500); }
.btn--primary:hover { background: var(--orange-600); border-color: var(--orange-600); color: var(--navy); }
.btn--ghost { background: transparent; color: var(--text-invert); border-color: rgba(255, 255, 255, .55); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: var(--text-invert); border-color: #fff; }
.btn--nav { padding: .55rem 1.15rem; font-size: .95rem; }
.btn--cta { padding: .95rem 1.9rem; font-size: 1.05rem; }

/* ---- Header -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--header-h);
  padding: .5rem clamp(1rem, 4vw, 2rem);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-header__logo-link { display: inline-flex; flex: 0 0 auto; }
.site-header__logo { height: 34px; width: auto; }
.nav-toggle {
  margin-left: auto; display: none; width: 44px; height: 44px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px;
  color: #fff; cursor: pointer; padding: 8px;
}
.nav-toggle svg { width: 100%; height: 100%; }
.mainnav { margin-left: auto; display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.75rem); }

.navgroup { display: flex; align-items: center; }
.navgroup__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.navgroup__links { display: flex; align-items: center; gap: clamp(.6rem, 1.6vw, 1.4rem); list-style: none; margin: 0; padding: 0; }
.navgroup__links a {
  color: rgba(255, 255, 255, .88); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .35rem 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.navgroup__links a:hover, .navgroup__links a[aria-current="page"] { color: #fff; border-bottom-color: var(--orange-500); }
.navgroup--page { padding-left: clamp(.75rem, 2vw, 1.5rem); border-left: 1px solid rgba(255, 255, 255, .18); }
.navgroup--page .navgroup__links a { font-size: .875rem; color: rgba(255, 255, 255, .7); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 8px; flex: 0 0 auto;
  background: transparent; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
  color: #fff; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--orange-500); color: var(--orange-500); }
.theme-toggle svg { width: 100%; height: 100%; }
.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .mainnav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    margin: 0; padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
    background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .15);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    display: none;
  }
  .mainnav.is-open { display: flex; }
  .navgroup { display: block; }
  .navgroup__label {
    position: static; width: auto; height: auto; clip: auto;
    display: block; padding: .9rem 0 .35rem;
    font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--orange-500); font-weight: 700;
  }
  .navgroup__links { flex-direction: column; align-items: stretch; gap: 0; }
  .navgroup__links a { display: block; padding: .65rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); white-space: normal; }
  .navgroup__links a:hover { border-bottom-color: rgba(255, 255, 255, .08); }
  .navgroup--page { padding-left: 0; border-left: 0; }
  .btn--nav { margin-top: 1rem; align-self: flex-start; }
  .theme-toggle { position: absolute; top: .5rem; right: 4.25rem; }
}
@media (max-width: 960px) {
  .site-header { position: sticky; }
  .theme-toggle { position: static; margin-top: .75rem; align-self: flex-start; }
}

/* ---- Hero ---------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  background: var(--navy);
  color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.75rem, 6vw, 4.5rem);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, var(--orange-500) 0 32%, transparent 32%);
}
.hero__glow {
  position: absolute; z-index: -1; pointer-events: none;
  width: 60vw; max-width: 720px; aspect-ratio: 1; border-radius: 50%;
  right: -12vw; top: -22%;
  background: radial-gradient(circle, rgba(255, 153, 0, .22) 0%, rgba(255, 153, 0, 0) 68%);
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero--plain .hero__inner { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero__lead { font-size: clamp(1.05rem, 1rem + .45vw, 1.3rem); color: rgba(255, 255, 255, .88); max-width: 62ch; }
.hero__lead p:last-child { margin-bottom: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .14); }
.hero__media img { width: 100%; }
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__media { order: -1; }
}

.eyebrow {
  display: inline-block; margin-bottom: .85rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--orange-500);
}
.section .eyebrow { color: var(--accent); }
.hero .eyebrow { color: var(--orange-500); }

.crumbs { font-size: .85rem; margin-bottom: 1rem; color: rgba(255, 255, 255, .7); }
.crumbs a { color: rgba(255, 255, 255, .9); }
.crumbs a:hover { color: var(--orange-500); }
.crumbs span[aria-hidden] { padding: 0 .4rem; opacity: .55; }

/* ---- Jump bar (page navigation, under the hero) -------------------- */
/* The section headings on these pages are full sentences, so the page nav
   lives in its own wrapping strip rather than squeezing into the header. */
.jumpbar { display: block; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.jumpbar .container { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding-block: .85rem; }
.jumpbar .navgroup__label {
  position: static; width: auto; height: auto; clip: auto; white-space: nowrap;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.jumpbar .navgroup__links { flex-wrap: wrap; gap: .4rem .5rem; }
.jumpbar .navgroup__links a {
  color: var(--text-muted); font-size: .875rem; white-space: normal;
  padding: .3rem .75rem; border: 1px solid var(--border); border-radius: 999px; border-bottom-width: 1px;
  text-decoration: none;
}
.jumpbar .navgroup__links a:hover {
  color: var(--text); border-color: var(--accent-bar); background: var(--surface);
}

/* ---- Sections ------------------------------------------------------ */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.bg-white { background: var(--bg); }
.section.bg-gray { background: var(--bg-alt); }
.section.bg-navy { background: var(--bg-invert); color: #fff; }
.section.bg-navy h2, .section.bg-navy h3 { color: #fff; }
.section.bg-navy .eyebrow { color: var(--orange-500); }

/* A content block: heading + prose, with the repeating orange rule motif. */
.block { max-width: var(--maxw-narrow); margin-inline: auto; }
.block + .block { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.block__head { position: relative; padding-left: 1.15rem; margin-bottom: 1.1rem; }
.block__head::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em;
  width: 4px; border-radius: 2px; background: var(--accent-bar);
}
.block__head h2 { margin: 0; }
.block__body > :last-child { margin-bottom: 0; }
.block__body a { font-weight: 500; }

.feature-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .7rem; }
.feature-list li {
  position: relative; padding-left: 1.9rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .85rem 1rem .85rem 2.6rem;
}
.feature-list li::before {
  content: ""; position: absolute; left: 1rem; top: 1.35rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bar);
}
.feature-list li strong { display: block; }

/* Numbered process steps, with the pulsing circle from the house style. */
.wp-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1rem; }
.wp-steps li { position: relative; counter-increment: step; padding-left: 3.4rem; min-height: 2.4rem; }
.wp-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--orange-500); color: var(--navy); font-weight: 900;
  animation: stepPulse 2.8s ease-in-out infinite;
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 153, 0, .5); }
  50% { box-shadow: 0 0 0 10px rgba(255, 153, 0, 0); }
}

/* ---- Figures ------------------------------------------------------- */
.figure { margin: 1.75rem 0 0; }
.figure img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface-2); }
.figure figcaption { margin-top: .6rem; font-size: .9rem; color: var(--text-muted); }

/* ---- Comparison table ---------------------------------------------- */
.table-wrap { margin-top: 1.5rem; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 34rem; }
.table-wrap th, .table-wrap td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap thead th { background: var(--navy); color: #fff; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody th { font-weight: 700; color: var(--text); background: var(--surface-2); }
.table-wrap td:last-child { color: var(--text); font-weight: 500; }

/* ---- Metric placeholders (case studies) ---------------------------- */
.metric {
  display: inline-block; background: rgba(255, 153, 0, .18); color: var(--accent);
  border: 1px dashed var(--accent-bar); border-radius: 6px;
  padding: 0 .4em; font-weight: 700; font-size: .95em;
}

/* ---- FAQ ----------------------------------------------------------- */
.faq { display: grid; gap: .6rem; margin-top: 1.4rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem; cursor: pointer; font-weight: 700; color: var(--text); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { flex: 0 0 auto; color: var(--accent); font-weight: 900; font-size: 1.3rem; line-height: 1.2; transition: transform .2s ease; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details > p, .faq details > div { margin: 0; padding: 0 1.15rem 1.15rem; color: var(--text-body); }

/* ---- Cards (related pages) ----------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.25rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent-bar);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card__eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.card__title { font-weight: 700; color: var(--text); font-size: 1.05rem; }
.card__desc { color: var(--text-muted); font-size: .95rem; }
.card__cta { margin-top: .35rem; font-weight: 700; color: var(--accent); font-size: .9rem; }

/* ---- CTA band ------------------------------------------------------ */
.section--cta { background: var(--navy); color: #fff; text-align: left; }
.section--cta .band-center { max-width: var(--maxw-narrow); margin-inline: auto; }
.section--cta h2 { color: #fff; }
.section--cta .lead { color: rgba(255, 255, 255, .86); font-size: 1.1rem; max-width: 60ch; }
.section--cta .btn { margin-top: 1.5rem; }
.section--cta .note { margin-top: 1rem; font-size: .9rem; color: rgba(255, 255, 255, .68); }

/* ---- Footer -------------------------------------------------------- */
.site-footer {
  background: var(--navy); color: rgba(255, 255, 255, .8);
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
  border-top: 4px solid var(--orange-500);
}
.site-footer__inner { max-width: var(--maxw); margin-inline: auto; display: grid; gap: 1.5rem; }
.site-footer__logo { height: 32px; width: auto; }
.site-footer__tagline { max-width: 46ch; font-size: .95rem; color: rgba(255, 255, 255, .72); }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: rgba(255, 255, 255, .85); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--orange-500); }
.footer-copy { font-size: .85rem; color: rgba(255, 255, 255, .6); }

/* ---- Back to top --------------------------------------------------- */
.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90;
  width: 44px; height: 44px; padding: 10px; border-radius: 50%;
  background: var(--orange-500); color: var(--navy); border: 0; cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Print --------------------------------------------------------- */
@media print {
  .site-header, .to-top, .section--cta, .site-footer { display: none; }
  body { color: #000; background: #fff; }
}
