/* Base */
html,body{height:100%}
body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
a{color:var(--brand-accent);text-decoration:none}
a:hover{text-decoration:underline}
.muted{color:var(--muted)}
.no-top{margin-top:0}
.no-bottom{margin-bottom:0}

/* Header / Nav */
.site-header{position:sticky;top:0;z-index:50;background:var(--brand-navy);color:var(--text-on-dark);box-shadow:var(--shadow-soft)}
.brand .brand-link{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}

/* Perfect alignment for all items */
.nav{display:flex;gap:8px;justify-content:flex-end;align-items:center;margin:0}
.nav>li{list-style:none;position:relative;display:flex;align-items:center}

/* Desktop dropdowns */
.menu{position:absolute;left:0;top:calc(100% + 10px);min-width:260px;background:#fff;color:var(--text);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:8px;display:none}
.menu[data-open="true"]{display:block}
.menu a{display:block;padding:10px 12px;border-radius:10px;color:var(--text)}
.menu a:hover,.menu a:focus-visible{background:var(--panel)}

/* Mobile drawer */
.drawer{position:fixed;inset:0 0 0 auto;width:88vw;max-width:420px;background:#fff;color:var(--text);transform:translateX(100%);transition:transform .28s ease;z-index:60;display:flex;flex-direction:column}
.drawer[data-open="true"]{transform:translateX(0)}
.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--border)}
.drawer .list a,.drawer .list button{display:block;width:100%;text-align:left;background:transparent;border:0;padding:12px 16px;border-radius:10px}
.drawer .list a:hover,.drawer .list button:hover{background:var(--panel)}
.drawer .submenu{padding-left:8px;display:none}
.drawer .submenu[data-open="true"]{display:block}

/* Hero */
.hero{background:radial-gradient(1200px 600px at 85% -20%, rgba(93,144,224,.28), transparent 60%), var(--brand-navy);color:var(--text-on-dark);padding:96px 0}
.eyebrow{display:inline-block;font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:rgba(255,255,255,.85);background:rgba(255,255,255,.08);padding:6px 10px;border-radius:999px;margin-bottom:16px}
.hero h1{margin:0 0 16px;font-size:clamp(32px,4vw,46px);line-height:1.1}
.lead{font-size:18px;line-height:1.6;color:rgba(255,255,255,.9);margin-bottom:24px}
.hero-card{background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));border:1px solid rgba(255,255,255,.2);border-radius:var(--radius);padding:24px;backdrop-filter:blur(6px)}
.bullet-list{margin:14px 0 0 18px;line-height:1.7}
.chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.chip{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid var(--border);box-shadow:var(--shadow-soft);color:var(--text)}
.hero-actions{margin-top:24px;display:flex;gap:12px;flex-wrap:wrap}

/* Cards */
.cards .card,
.feature .card {background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow-soft);transition:transform .18s ease, box-shadow .18s ease}
.cards .card:hover,
.feature .card:hover {transform:translateY(-2px);box-shadow:var(--shadow)}
.cards .card h3{margin-top:8px;margin-bottom:8px;font-size:20px}
.cards .card p{margin:0;color:var(--muted)}
.card .icon{font-size:28px}

/* Contact form card layout */
.form-card h2{margin-top:0}
.form-card form label{display:block;margin:12px 0 6px}
.form-card form input,
.form-card form select,
.form-card form textarea{
  display:block;width:100%;
  padding:10px 12px;border:1px solid var(--border);border-radius:10px;
  background:#fff;color:var(--text)
}
.form-card form textarea{min-height:140px}  /* ~6–7 lines */
.form-card form button{margin-top:16px}


/* Feature */
.feature{background:var(--panel);border-radius:var(--radius);padding:24px;border:1px solid var(--border)}
.card.tall{height:100%}

/* Values */
.values .value{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:18px}

/* CTA band */
.section.cta{background:linear-gradient(180deg, #ffffff, #f7f9ff);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
/* Generic panel look (no flex by default) */
.panel{background:#fff;border:1px solid var(--border);border-radius:calc(var(--radius) + 4px);padding:28px;box-shadow:var(--shadow-soft)}

/* Only the CTA band panel uses flex layout */
.section.cta .panel{display:flex;align-items:center;justify-content:space-between;gap:16px}

/* Footer */
footer{background:#0d1d36;color:rgba(255,255,255,.9);padding:32px 0}
footer a{color:#dbe6ff}
.footer-grid{align-items:flex-start}
.footer-brand{font-weight:700;margin-bottom:10px}
.footer-tag{color:rgba(255,255,255,.8)}
.mini-sitemap a{display:block;margin:6px 0}
.copyright{margin-top:20px;color:rgba(255,255,255,.6);text-align:left}

/* Responsive tweaks */
@media (max-width: 980px){
  .section.cta .panel { flex-direction: column; align-items: flex-start; }
}

/* —— Contact page micro-padding tweaks —— */
.form-card,
.info-card { padding: 28px 30px; }            /* a touch more breathing room */

.form-card h2,
.info-card h3 { margin: 0 0 10px; }           /* tighten heading → content gap */
.form-card p.muted { margin: 6px 0 14px; }    /* intro spacing before fields */

.form-card form label { margin: 14px 0 6px; } /* consistent label rhythm */
.form-card form button { margin-top: 18px; }  /* not glued to the textarea */

@media (max-width: 640px){
  .form-card,
  .info-card { padding: 20px; }               /* comfortable on small screens */
}

/* ——— Interactive primary button (soft elevation + underline sweep) ——— */
.btn{display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:12px; line-height:1; transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;}
.btn.primary{
  background:#fff; color:var(--brand-navy)!important; border:1px solid #fff; position:relative; overflow:hidden;
  box-shadow:0 0 0 rgba(0,0,0,0); box-shadow:0 4px 8px rgba(0,0,0,.06);
}
.btn.primary::after{ /* underline sweep */
  content:""; position:absolute; left:12px; right:12px; bottom:8px; height:2px; border-radius:2px;
  background:var(--brand-navy); transform:scaleX(0); transform-origin:left center; transition:transform .18s ease;
  opacity:.35; pointer-events:none;
}
.btn.primary:hover{ transform:translateY(-1px); box-shadow:0 8px 20px rgba(0,0,0,.08); }
.btn.primary:hover::after{ transform:scaleX(1); }
.btn.primary:active{ transform:translateY(0); box-shadow:0 4px 10px rgba(0,0,0,.06); }
.btn.primary:focus-visible{ outline:2px solid rgba(255,255,255,.8); outline-offset:3px; }

/* Disabled + loading states */
.btn[disabled], .btn.is-loading{ opacity:.7; cursor:not-allowed; transform:none; box-shadow:none; }
.btn.is-loading{ position:relative; color:transparent !important; }
.btn.is-loading::before{ /* minimalist spinner */
  content:""; position:absolute; inset:auto auto 50% 50%; width:16px; height:16px; margin:-8px 0 0 -8px;
  border:2px solid rgba(0,0,0,.15); border-top-color:var(--brand-navy); border-radius:50%;
  animation:btnspin .8s linear infinite;
}
@keyframes btnspin{ to{ transform:rotate(360deg); } }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .btn, .btn.primary, .btn.primary::after{ transition:none !important; }
  .btn.primary:hover{ transform:none; box-shadow:none; }
}

/* ——— Tiny toast overlay for form feedback ——— */
.cm-toast{
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px);
  background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18); opacity: 0; pointer-events: none;
  font-size: 14px; z-index: 1000; transition: transform .24s ease, opacity .24s ease;
}
.cm-toast.success{ background: #0f5132; }  /* deep green */
.cm-toast.error{ background: #842029; }    /* deep red */
.cm-toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce){
  .cm-toast{ transition: none; }
}

/* ——— Field error visuals (only if you don't have them yet) ——— */
.is-invalid{ border-color: #dc3545 !important; box-shadow: 0 0 0 2px rgba(220,53,69,.12); }
.cm-field-error{ display:block; margin:6px 2px 4px; color:#842029; font-size:12px; }

/* ——— Full-screen "Sending..." overlay ——— */
.cm-overlay{
  position:fixed; inset:0; background:rgba(13,29,54,.4);
  backdrop-filter:saturate(120%) blur(2px);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .18s ease; z-index:1200;
}
.cm-overlay.show{ opacity:1; pointer-events:auto; }
.cm-overlay__box{
  background:#fff; color:#0d1d36; border:1px solid var(--border);
  border-radius:16px; padding:18px 20px; display:flex; align-items:center; gap:12px;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
}
.cm-overlay__spinner{
  width:18px; height:18px; border-radius:50%;
  border:2px solid rgba(0,0,0,.15); border-top-color:#0d1d36;
  animation:cmspin .8s linear infinite;
}
.cm-overlay__text{ font-weight:600; }
@keyframes cmspin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .cm-overlay{ transition:none; }
  .cm-overlay__spinner{ animation:none; }
}

/* ——— Top-level header nav link styling (modern pill hover) ——— */

/* Make top-level <a> and <button> identical boxes */
.site-header .nav > li > a,
.site-header .nav > li > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  line-height: 1;
  vertical-align: middle;
  margin: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: #fff;
  border-radius: 999px;            /* smoother pill */
  transition: background 0.18s ease, color 0.18s ease;
}

/* Hover: soft translucent pill on the navy bar */
.site-header .nav > li > a:hover,
.site-header .nav > li > button:hover,
.site-header .nav > li > a:focus-visible,
.site-header .nav > li > button:focus-visible {
  background: rgba(255,255,255,0.10);
  color: #fff;
  outline: none;
}

/* Active item (Home on homepage, etc.) */
.site-header .nav > li > a[aria-current="page"],
.site-header .nav > li > a[data-active="true"] {
  position: relative;
  background: rgba(255,255,255,0.16);  /* a bit stronger than hover */
  text-decoration: none;               /* rely on the underline bar instead */
}

/* Active underline */
.site-header .nav > li > a[aria-current="page"]::after,
.site-header .nav > li > a[data-active="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  opacity: 0.9;
}
