/* ===========================================================
   Cadi marketing site — global layout + shared chrome
   Builds on tokens.css (colours, type, buttons, signatures).
   Nothing here adds a colour: every value is a token.
   =========================================================== */

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-size: 17px; line-height: 1.65; overflow-x: hidden; }
@media (min-width: 900px) { .body, body { font-size: 18px; } }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--navy); padding: 12px 18px; border-radius: var(--r-pill); font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- Sections ---- */
.section { padding: var(--section-pad-m); }
@media (min-width: 900px) { .section { padding: var(--section-pad-d); } }
.inner { max-width: var(--max); margin: 0 auto; }
.narrow { max-width: 760px; }
.bg-white { background: var(--white); }
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--navy); color: var(--on-navy); }
.bg-orange { background: var(--orange); color: var(--navy); }
.bg-navy .h1, .bg-navy .h2, .bg-navy .h3 { color: var(--on-navy); }
.bg-navy .body, .bg-navy .body-lg { color: var(--on-navy-body); }
.bg-navy .caption { color: var(--on-navy-muted); }
.bg-orange .body, .bg-orange .body-lg { color: var(--navy); }
.top-blue { border-top: 8px solid var(--blue); }

.stack > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 28px; }
.stack > .lead-line { margin-top: 26px; }
.label + .h1, .label + .h2 { margin-top: 16px; }
.h2 + .body, .h2 + .body-lg, .h2 + .stack { margin-top: 22px; }

.label-yellow { color: var(--yellow); }
.label-blue { color: var(--blue-deep); }
.label-green { color: var(--green-deep); }
.label-green-bright { color: var(--green); }
.label-navy { color: var(--navy); }
.label-muted { color: var(--ink-muted); }

.lead-line { font-size: clamp(22px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.015em; line-height: 1.3; color: var(--navy); margin: 0; }
.bg-navy .lead-line { color: var(--on-navy); }
.strong-line { font-weight: 700; color: var(--navy); }
.bg-navy .strong-line { color: var(--on-navy); }

.btn-row { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 721px) { .btn-row { flex-direction: row; flex-wrap: wrap; } }
.text-link { font-weight: 800; color: var(--blue-deep); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.bg-navy .text-link { color: var(--yellow); }
.bg-orange .text-link { color: var(--navy); }

/* 12-column grid on desktop, single column on mobile */
.grid { display: grid; gap: 32px; }
.grid > * { min-width: 0; }
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(12, 1fr); gap: 32px 40px; align-items: start; }
  .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; }
  .c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; } .c-12 { grid-column: 1 / -1; }
  .start-8 { grid-column: 8 / span 5; }
  .center { align-items: center; }
}

/* Photo + caption */
figure { margin: 0; }
.photo.tall { aspect-ratio: 4 / 5; }
.photo.square { aspect-ratio: 1; }
.photo.wide { aspect-ratio: 4 / 3; }
.placeholder-shot { display: grid; place-items: center; text-align: center; padding: 24px; background: var(--blue-tint); color: var(--blue-deep); font-size: 14px; font-weight: 700; border: 2px dashed var(--blue); }
.ph { background: var(--amber-tint); color: var(--amber-deep); border-radius: 4px; padding: 0 .2em; }

/* ---- Logo (rebuild — swap for the real SVG) ---- */
.logo { display: inline-flex; flex-direction: column; gap: 3px; text-decoration: none; }
.logo .word { position: relative; display: inline-block; line-height: 1; }
.logo .word span { font-size: 30px; font-weight: 600; letter-spacing: -.02em; -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .ti { position: relative; }
.logo .dot { position: absolute; left: calc(50% + .011em); top: .2em; width: .17em; height: .17em; transform: translateX(-50%); border-radius: 50%; }
.logo-light .word span { background-image: linear-gradient(90deg, #7A82A8 0%, #6B80E6 55%, #4F78FF 100%); }
.logo-light .dot { background: #4F78FF; box-shadow: 0 0 8px 3px rgba(79,120,255,.55); }
.logo-dark .word span { background-image: linear-gradient(90deg, #8B93B8 0%, #8FA4F2 55%, #7B93F7 100%); }
.logo-dark .dot { background: #E3E6F5; box-shadow: 0 0 9px 3px rgba(123,147,247,.8); }
.connect-badge { background: var(--orange); color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 800; letter-spacing: .2em; }

/* ---- Self-serve nav ---- */
.nav { position: sticky; top: 0; z-index: 60; background: var(--navy); color: var(--on-navy); }
.nav-bar { display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 20px; max-width: calc(var(--max) + 128px); margin: 0 auto; }
@media (min-width: 900px) { .nav-bar { height: 80px; padding: 0 64px; } }
.nav-links { display: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-fm { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); background: var(--orange); color: var(--navy); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.nav-fm.outline { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.nav-menu { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); color: var(--navy); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.nav-menu svg { width: 20px; height: 20px; }
.nav-signin { display: none; }
.nav-start { display: none; }
@media (min-width: 1100px) {
  .nav-links { display: flex; gap: 4px; margin-left: 36px; }
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--on-navy-body); font-size: 15px; font-weight: 600; text-decoration: none; border-radius: var(--r-pill); }
  .nav-links a:hover, .nav-links a[aria-current] { color: var(--white); }
  .nav-menu { display: none; }
  .nav-signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--white); font-size: 15px; font-weight: 700; text-decoration: none; }
  .nav-start { display: inline-flex; min-height: 48px; width: auto; font-size: 15px; padding: 0 22px; }
}
.nav-drawer { display: none; border-top: 1px solid rgba(255,255,255,.12); padding: 12px 20px 28px; }
.nav-drawer.open { display: block; }
.nav-drawer a.dl { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid rgba(255,255,255,.1); color: var(--white); font-size: 20px; font-weight: 800; text-decoration: none; }
.nav-drawer .btn-row { margin-top: 20px; }
@media (min-width: 1100px) { .nav-drawer, .nav-drawer.open { display: none; } }

/* ---- Ticker ---- */
.ticker { position: relative; }
.ticker-track { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.ticker-track span { display: inline-flex; gap: 6px; }

/* ---- Sticky CTA (mobile, self-serve) ---- */
.sticky-cta { transition: transform .25s ease, opacity .25s ease; }
.sticky-cta[data-hidden="true"] { transform: translateY(120%); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .sticky-cta { display: none; } }
@media (max-width: 899px) { body.has-sticky { padding-bottom: 88px; } }

/* ---- Connect door hover ---- */
.door { transition: transform .15s ease; }
.door:hover { transform: translateX(3px); }
.door.on-orange { background: var(--navy); color: var(--white); }

/* ---- Self-serve footer ---- */
.footer { background: var(--paper); padding: 52px 20px 40px; color: var(--navy); }
@media (min-width: 900px) { .footer { padding: 88px 64px 48px; } }
.footer-fm { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; min-height: 76px; background: var(--white); border-radius: var(--r-lg); box-shadow: 0 22px 40px -30px rgba(26,33,80,.5); text-decoration: none; color: var(--navy); font-weight: 800; font-size: 18px; }
.footer-fm b { color: var(--orange-deep); white-space: nowrap; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; margin-top: 44px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr repeat(4, 1fr); } }
.footer-grid h3 { margin: 0 0 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { display: inline-flex; min-height: 36px; align-items: center; color: var(--ink-body); text-decoration: none; font-size: 15px; font-weight: 600; }
.footer-grid li a:hover { color: var(--navy); text-decoration: underline; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand p { font-size: 15px; color: var(--ink-muted); margin: 14px 0 0; max-width: 300px; }
.insta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 44px; }
.insta .photo { aspect-ratio: 1; border-radius: var(--r-sm); }
@media (min-width: 900px) { .insta { grid-template-columns: repeat(3, 180px); gap: 12px; } }
.socials { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 14px; font-weight: 700; }
.socials a { color: var(--navy); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1.5px solid rgba(26,33,80,.14); font-size: 13px; color: var(--ink-muted); }
.footer-base a { color: var(--ink-muted); }

/* ===========================================================
   FM side (Connect for FM, Software — Connect)
   =========================================================== */
.fm-strip { background: var(--navy); color: var(--on-navy-body); font-size: 13px; font-weight: 600; text-align: center; padding: 9px 20px; line-height: 1.5; }
.fm-strip a { color: var(--yellow); font-weight: 800; text-decoration: none; white-space: nowrap; }
.fm-strip a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fm-nav { position: sticky; top: 0; z-index: 60; background: var(--paper); border-bottom: 1px solid var(--line); }
.fm-nav .nav-bar { gap: 12px; }
.fm-nav .connect-badge { font-size: 11px; padding: 5px 10px; }
.fm-nav .nav-links a { color: var(--ink-body); }
.fm-nav .nav-links a:hover { color: var(--navy); }
.fm-nav .nav-menu { background: var(--navy); color: var(--white); }
.fm-nav .fm-demo { display: none; }
@media (min-width: 1100px) { .fm-nav .fm-demo { display: inline-flex; width: auto; min-height: 48px; font-size: 15px; padding: 0 22px; } }
.fm-nav .nav-drawer { border-top: 1px solid var(--line); }
.fm-nav .nav-drawer a.dl { color: var(--navy); border-bottom-color: var(--line); }

.fm-float { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: none; align-items: center; gap: 14px; padding: 8px 8px 8px 22px; border-radius: var(--r-pill); background: var(--navy); color: var(--white); font-size: 14px; font-weight: 700; box-shadow: 0 14px 30px -14px rgba(26,33,80,.7); transition: transform .25s ease, opacity .25s ease; }
.fm-float .btn { min-height: 46px; width: auto; font-size: 15px; }
.fm-float[data-hidden="true"] { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .fm-float { display: flex; } }
@media (max-width: 899px) {
  .fm-float { display: flex; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); justify-content: space-between; font-size: 13px; }
  .fm-float span { max-width: 150px; line-height: 1.3; }
  body.has-float { padding-bottom: 88px; }
}

.fm-footer { background: var(--navy); color: var(--on-navy-body); padding: 52px 20px 40px; }
@media (min-width: 900px) { .fm-footer { padding: 88px 64px 48px; } }
.fm-footer .footer-fm { color: var(--navy); }
.fm-footer .footer-fm b { color: var(--blue-deep); }
.fm-footer .footer-grid h3 { color: var(--on-navy-muted); }
.fm-footer .footer-grid li a { color: var(--on-navy-body); }
.fm-footer .footer-grid li a:hover { color: var(--white); }
.fm-footer .footer-brand p { color: var(--on-navy-muted); }
.fm-footer .footer-base { border-top-color: rgba(255,255,255,.12); color: var(--on-navy-muted); }
.fm-footer .footer-base a { color: var(--on-navy-muted); }
.fm-brand { display: inline-flex; align-items: center; gap: 12px; }
@media (max-width: 720px) { .footer-fm { flex-wrap: wrap; row-gap: 4px; } .footer-fm b { white-space: normal; } }

/* ---- The Cadi Ceiling: six categories + series ---- */
.cat-a { background: var(--green-tint);  color: var(--green-deep); }   /* A Pricing and profit */
.cat-b { background: var(--amber-tint);  color: var(--amber-deep); }   /* B Ceilings and scaling */
.cat-c { background: var(--blue-tint);   color: var(--blue-deep); }    /* C Winning customers */
.cat-d { background: var(--cyan-tint);   color: var(--cyan-deep); }    /* D Team and systems */
.cat-e { background: var(--line);        color: var(--navy); }         /* E The owner */
.cat-f { background: var(--orange-tint); color: var(--orange-deep); }  /* F Contracts and sectors */
.cat-series { background: var(--yellow); color: var(--navy); }        /* 2027 series */
