/* ==========================================================================
   CMI Services, LLC — site styles
   Rebuilt static site. Modern, responsive, faithful to original branding.
   Palette keyed to the CMI cloud-swoosh logo (sky blue + slate).
   ========================================================================== */

:root {
  --navy:        #122d49;
  --navy-800:    #173a5e;
  --navy-700:    #1f4c79;
  --brand:       #4f8fd6;   /* logo sky blue */
  --brand-600:   #3a78c2;
  --brand-700:   #2f66ab;
  --brand-300:   #7aa5dd;
  --sky-tint:    #eaf2fb;
  --ink:         #1d2a38;
  --body:        #44545f;
  --muted:       #6b7a88;
  --line:        #e3e9f0;
  --line-soft:   #eef2f7;
  --bg:          #ffffff;
  --bg-soft:     #f5f8fc;
  --bg-soft-2:   #eef3f9;
  --white:       #ffffff;
  --shadow-sm:   0 1px 3px rgba(18,45,73,.06), 0 1px 2px rgba(18,45,73,.04);
  --shadow:      0 6px 24px rgba(18,45,73,.08);
  --shadow-lg:   0 18px 48px rgba(18,45,73,.16);
  --radius:      14px;
  --radius-sm:   10px;
  --maxw:        1180px;
  --ease:        cubic-bezier(.4,.16,.2,1);
}

/* ---------- reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--body);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--brand-600); }
h1,h2,h3,h4 {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -.02em;
}
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.32rem; font-weight: 700; }
p { margin: 0 0 1.1rem; }
ul { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 1rem;
  padding: .85em 1.7em; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: all .2s var(--ease);
  line-height: 1; white-space: nowrap;
}
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 8px 20px rgba(58,120,194,.28); }
.btn-primary:hover { background: var(--brand-700); color:#fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(58,120,194,.36); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color:#fff; transform: translateY(-2px); }
.btn-outline { background:#fff; color: var(--brand-700); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-700); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-lg { font-size: 1.05rem; padding: 1em 2.1em; }

/* ---------- top utility bar ---------- */
.topbar { background: var(--navy); color: #c5d4e4; font-size: .86rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #d7e2ee; }
.topbar a:hover { color: #fff; }
.topbar .tb-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar .tb-left strong { color:#fff; font-weight: 700; }
.topbar .sep { color: rgba(255,255,255,.3); }
.topbar .tb-right { display: flex; align-items: center; gap: 18px; }
.topbar .tb-right a { display: inline-flex; align-items:center; gap:6px; font-weight:600; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 42px; width: auto; }
.brand .brand-name { font-family:"Manrope",sans-serif; font-weight: 800; color: var(--navy); font-size: 1.18rem; letter-spacing:-.01em; line-height:1; }
.brand .brand-name span { display:block; font-size:.66rem; font-weight:600; letter-spacing:.16em; color: var(--brand-600); text-transform: uppercase; margin-top:3px; }

.menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
/* desktop: spread nav links evenly across the header width (logo left, CTA right) */
@media (min-width: 861px) {
  .menu { flex: 1 1 auto; justify-content: space-between; margin: 0 clamp(26px, 4.5vw, 64px); gap: 10px; }
  .menu > li { flex: 0 0 auto; }
}
.menu > li { position: relative; }
.menu > li > a {
  display: block; padding: 10px 15px; color: var(--ink); font-weight: 600; font-size: .98rem;
  border-radius: 8px;
}
.menu > li > a:hover, .menu > li.current > a { color: var(--brand-700); background: var(--sky-tint); }
.menu > li.current > a { color: var(--brand-700); }

/* dropdown */
.has-drop > a::after { content: "▾"; font-size:.7em; margin-left: 6px; color: var(--muted); }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 268px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .18s var(--ease);
}
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown, .dropdown.open { opacity:1; visibility:visible; transform: translateY(0); }
.dropdown li a { display: flex; align-items:center; gap:10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .94rem; }
.dropdown li a:hover { background: var(--sky-tint); color: var(--brand-700); }
.dropdown li a .ic { color: var(--brand); flex-shrink:0; }

.nav-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .25s var(--ease); border-radius:2px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-bg { position:absolute; inset:0; background-size: cover; background-position: center; }
.hero::after { content:""; position:absolute; inset:0;
  background: linear-gradient(105deg, rgba(15,35,58,.92) 0%, rgba(20,49,80,.82) 45%, rgba(47,102,171,.62) 100%); }
.hero .container { position: relative; z-index: 2; padding: clamp(72px, 11vw, 138px) 24px; max-width: 1080px; }
.hero .eyebrow { display:inline-block; font-family:"Manrope",sans-serif; font-weight:700; letter-spacing:.18em; text-transform: uppercase; font-size:.78rem; color: var(--brand-300); margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.2vw, 3.7rem); max-width: 16ch; margin-bottom: .35em; }
.hero p.lede { font-size: clamp(1.05rem, 2vw, 1.32rem); color: #d7e3f1; max-width: 52ch; margin-bottom: 2rem; }
.hero .hero-actions { display:flex; gap: 14px; flex-wrap: wrap; }

/* page hero (interior, shorter) */
.page-hero { position: relative; color:#fff; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 60%, var(--brand-700) 130%); overflow:hidden; }
.page-hero::before { content:""; position:absolute; right:-120px; top:-120px; width:460px; height:460px; border-radius:50%; background: radial-gradient(circle, rgba(122,165,221,.28), transparent 70%); }
.page-hero .container { position:relative; z-index:2; padding: clamp(56px,8vw,96px) 24px; }
.page-hero .eyebrow { color: var(--brand-300); font-family:"Manrope"; font-weight:700; letter-spacing:.16em; text-transform:uppercase; font-size:.76rem; }
.page-hero h1 { color:#fff; font-size: clamp(2rem,4.4vw,3.1rem); margin:.25em 0 .35em; }
.page-hero .subhead { color:#cddcec; font-size:1.1rem; max-width: 60ch; margin:0; }
.breadcrumb { font-size:.85rem; color:#a9c0d6; margin-bottom: 18px; }
.breadcrumb a { color:#cddcec; } .breadcrumb a:hover{ color:#fff; }
.breadcrumb span { color: rgba(255,255,255,.4); margin: 0 8px; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 92px) 0; }
.section.soft { background: var(--bg-soft); }
.section.tight { padding-top: clamp(40px,6vw,64px); padding-bottom: clamp(40px,6vw,64px); }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head .eyebrow { display:inline-block; font-family:"Manrope"; font-weight:700; letter-spacing:.16em; text-transform:uppercase; font-size:.78rem; color: var(--brand-600); margin-bottom: 12px; }
.section-head p { font-size: 1.12rem; color: var(--muted); }
.lead { font-size: 1.16rem; color: var(--ink); }

/* intro band */
.intro { text-align:center; max-width: 820px; margin: 0 auto; }
.intro h2 { margin-bottom:.4em; }

/* ---------- expertise cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background:#fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px;
  box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #d3e1f2; }
.card .card-ic {
  width: 58px; height: 58px; border-radius: 14px; display:grid; place-items:center; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%); color:#fff;
  box-shadow: 0 8px 18px rgba(58,120,194,.3);
}
.card h3 { margin-bottom: .35em; color: var(--navy); }
.card .tagline { font-family:"Manrope"; font-weight: 700; color: var(--brand-700); font-size:.95rem; margin-bottom: .8em; }
.card p { color: var(--body); font-size: .98rem; }
.card .card-link { margin-top: auto; font-family:"Manrope"; font-weight:700; font-size:.95rem; display:inline-flex; align-items:center; gap:6px; }
.card .card-link::after { content:"→"; transition: transform .2s var(--ease); }
.card:hover .card-link::after { transform: translateX(4px); }

/* ---------- service detail / accordion ---------- */
.svc-layout { display:grid; grid-template-columns: 1.2fr; gap: 0; max-width: 920px; margin: 0 auto; }
.svc-intro { margin-bottom: 40px; }
.svc-intro p { font-size: 1.1rem; }
.svc-intro .note { color: var(--muted); font-size: 1rem; }

.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background:#fff; box-shadow: var(--shadow-sm); }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-head {
  width:100%; text-align:left; background:#fff; border:0; cursor:pointer;
  padding: 22px 26px; display:flex; align-items:center; gap: 16px; font-family:"Manrope"; font-weight:700;
  font-size: 1.12rem; color: var(--navy); transition: background .18s var(--ease);
}
.acc-head:hover { background: var(--bg-soft); }
.acc-head .acc-num { font-size:.85rem; color:#fff; background: var(--brand-600); width:28px;height:28px; border-radius:8px; display:grid;place-items:center; flex-shrink:0; font-weight:700; }
.acc-head .acc-ic { margin-left:auto; transition: transform .25s var(--ease); color: var(--brand-600); flex-shrink:0; }
.acc-item.open .acc-head { background: var(--sky-tint); }
.acc-item.open .acc-head .acc-ic { transform: rotate(180deg); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height .32s var(--ease); }
.acc-panel-inner { padding: 4px 26px 26px; }
.acc-panel-inner > p:first-child { margin-top: 4px; }

/* feature list with checks */
.feature-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.feature-list li { position: relative; padding: 10px 0 10px 38px; border-bottom: 1px dashed var(--line-soft); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content:""; position:absolute; left:0; top: 13px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sky-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233a78c2' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat;
}
.feature-list li strong { color: var(--ink); font-family:"Manrope"; font-weight:700; }
.svc-contact-note { margin-top: 14px; font-size:.98rem; }

/* badge row */
.badges { display:flex; flex-wrap:wrap; gap: 12px; justify-content:center; margin-top: 8px; }
.badge { display:inline-flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--line); border-radius:999px; padding:9px 18px; font-family:"Manrope"; font-weight:700; font-size:.9rem; color: var(--navy); box-shadow: var(--shadow-sm); }
.badge .ic { color: var(--brand-600); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; background: linear-gradient(120deg, var(--navy) 0%, var(--brand-700) 130%); color:#fff; overflow:hidden; }
.cta-band::before { content:""; position:absolute; left:-100px; bottom:-140px; width:420px;height:420px;border-radius:50%; background: radial-gradient(circle, rgba(122,165,221,.25), transparent 70%); }
.cta-band .container { position:relative; z-index:2; padding: clamp(48px,7vw,76px) 24px; text-align:center; }
.cta-band h2 { color:#fff; max-width: 20ch; margin: 0 auto .4em; }
.cta-band p { color:#d3e1f0; font-size:1.12rem; margin-bottom: 1.8rem; }

/* ---------- contact ---------- */
.contact-grid { display:grid; grid-template-columns: 1.3fr .9fr; gap: 48px; align-items:start; }
.form-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.form-row { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display:block; font-family:"Manrope"; font-weight:700; font-size:.9rem; color: var(--ink); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width:100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size:1rem;
  color: var(--ink); background:#fff; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline:0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,143,214,.16); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size:.86rem; color: var(--muted); margin-top: 4px; }
.form-status { display:none; padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-weight:600; font-size:.95rem; }
.form-status.ok { display:block; background:#e7f6ec; color:#1c7a3f; border:1px solid #bce3c9; }
.form-status.err { display:block; background:#fdecec; color:#b3261e; border:1px solid #f3c2c0; }

.info-card { background: var(--navy); color:#d7e3f1; border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.info-card h3 { color:#fff; }
.info-item { display:flex; gap: 14px; align-items:flex-start; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.info-item:last-child { border-bottom:0; }
.info-item .ic { color: var(--brand-300); flex-shrink:0; margin-top:2px; }
.info-item .lbl { font-family:"Manrope"; font-weight:700; color:#fff; font-size:.82rem; text-transform:uppercase; letter-spacing:.08em; margin-bottom:3px; }
.info-item a { color:#d7e3f1; } .info-item a:hover{ color:#fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #9fb3c8; font-size: .96rem; padding-top: 64px; }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 44px; padding-bottom: 48px; }
.site-footer h4 { color:#fff; font-size:1rem; font-family:"Manrope"; letter-spacing:.02em; margin-bottom: 18px; }
.footer-brand img { height: 40px; margin-bottom: 16px; filter: brightness(0) invert(1); opacity:.96; }
.footer-brand p { color:#9fb3c8; font-size:.95rem; max-width: 34ch; }
.footer-links { list-style:none; padding:0; margin:0; }
.footer-links li { margin-bottom: 11px; }
.footer-links a { color:#bccadb; }
.footer-links a:hover { color:#fff; }
.foot-contact div { margin-bottom: 13px; display:flex; gap:10px; align-items:flex-start; }
.foot-contact .ic { color: var(--brand-300); flex-shrink:0; margin-top:3px; }
.foot-contact a { color:#bccadb; } .foot-contact a:hover{color:#fff;}
.news-form { display:flex; gap:8px; margin-top: 14px; }
.news-form input { flex:1; padding: 12px 14px; border-radius: 9px; border: 1.5px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color:#fff; font:inherit; font-size:.95rem; }
.news-form input::placeholder { color: #88a0b8; }
.news-form input:focus { outline:0; border-color: var(--brand-300); background: rgba(255,255,255,.1); }
.news-form button { flex-shrink:0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; font-size:.88rem; color:#7e93a8; }
.footer-bottom a { color:#9fb3c8; }

/* ---------- 404 ---------- */
.err-wrap { min-height: 60vh; display:grid; place-items:center; text-align:center; padding: 80px 24px; }
.err-wrap .code { font-family:"Manrope"; font-weight:800; font-size: clamp(5rem,16vw,9rem); color: var(--brand); line-height:1; letter-spacing:-.04em; }

/* ---------- utilities ---------- */
.skip-link { position:absolute; left:-9999px; top:0; background: var(--navy); color:#fff; padding:10px 16px; z-index:200; border-radius:0 0 8px 0; }
.skip-link:focus { left:0; }
.fade-up { opacity:0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.fade-up.in { opacity:1; transform:none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-cta .btn { display: none; }
  .menu {
    position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px);
    background:#fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 92px 18px 32px; box-shadow: -20px 0 50px rgba(18,45,73,.18);
    transform: translateX(100%); transition: transform .28s var(--ease); overflow-y:auto;
  }
  .menu.open { transform: translateX(0); }
  .menu > li > a { padding: 14px 16px; border-radius: 10px; font-size: 1.05rem; }
  .has-drop > a::after { float:right; }
  .dropdown { position: static; opacity:1; visibility:visible; transform:none; box-shadow:none; border:0; border-left: 2px solid var(--line); border-radius:0; margin: 2px 0 6px 16px; padding:2px 0; max-height:0; overflow:hidden; transition: max-height .28s var(--ease); }
  .has-drop.open .dropdown { max-height: 420px; }
  .nav-backdrop { position: fixed; inset:0; background: rgba(15,30,50,.45); opacity:0; visibility:hidden; transition: opacity .25s; z-index:55; }
  .nav-backdrop.show { opacity:1; visibility:visible; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .tb-right { display:none; }
  .hero .hero-actions .btn { width:100%; justify-content:center; }
  .acc-head { padding: 18px; font-size: 1.02rem; }
  .acc-panel-inner { padding: 4px 18px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
  .fade-up { opacity:1; transform:none; }
}
