/* ===========================
   Intensity Success — FULL CSS
   (Header + Logo fixed, Light/Dark auto)
   =========================== */

/* ---------- Theme ---------- */
:root{
  color-scheme: light dark;
  --brand:#3b82f6; --brand-2:#0b3a66;
  --ring:rgba(59,130,246,.35);
  --bg:#f4f6fa; --panel:#fff; --text:#0b1220; --muted:#475569;
  --radius-lg:28px; --radius-md:16px; --radius-sm:12px;
  --shadow-sm:0 6px 18px rgba(11,58,102,.10);
  --shadow-md:0 16px 40px rgba(11,58,102,.16);
}

/* Dark scheme tokens */
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1220; --panel:#111a2b; --text:#e6eefc; --muted:#9fb0c9;
    --brand-2:#a7c5ff; --ring:rgba(88,140,255,.35);
    --shadow-sm:0 6px 18px rgba(0,0,0,.35);
    --shadow-md:0 16px 40px rgba(0,0,0,.45);
  }
}

/* ---------- Base / Reset ---------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg); color:var(--text); line-height:1.7;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
img{max-width:100%; display:block}
a{color:inherit; text-decoration:none}
.container{width:min(1100px,92%); margin-inline:auto}
.narrow{width:min(780px,92%); margin-inline:auto}
.section{padding:72px 0}
.section.alt{background:var(--panel)}

/* ===========================
   Header + Navigation + Logo
   =========================== */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:1000;
  background:rgba(11,58,102,.25);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid rgba(255,255,255,.15);
  box-shadow:0 4px 20px rgba(11,58,102,.12);
  transition:background .35s, box-shadow .35s;
}
body.scrolled .site-header{
  background:rgba(11,58,102,.45);
  box-shadow:0 6px 28px rgba(11,58,102,.20);
}
/* keep content clear of fixed header */
body{padding-top:88px;}

.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0; gap:20px;
}

.logo{display:flex; align-items:center; gap:10px}
.logo-img{height:90px; width:auto; display:block; transition:height .25s ease}
.logo-img.dark{display:none}
@media (prefers-color-scheme: dark){
  .logo-img.light{display:none}
  .logo-img.dark{display:block}
}

/* tighter on tablet/phone */
@media (max-width:1020px){ .logo-img{height:64px} }
@media (max-width:700px){ .logo-img{height:54px} .nav{padding:12px 0} }

.site-nav{display:flex; gap:22px; align-items:center}
.site-nav a{
  position:relative; padding:8px 10px; font-weight:500; color:var(--brand-2);
  transition:color .25s ease;
}
.site-nav a::after{
  content:""; position:absolute; left:0; bottom:2px; width:100%; height:2px;
  background:linear-gradient(90deg,var(--brand),var(--brand-2));
  opacity:0; transform:scaleX(.2); transform-origin:center; border-radius:2px;
  transition:opacity .35s, transform .35s;
}
.site-nav a:hover{color:var(--brand)}
.site-nav a:hover::after{opacity:1; transform:scaleX(1)}

/* active link (JS applies .active) */
.site-nav a.active{color:var(--brand)}
.site-nav a.active::after{opacity:1; transform:scaleX(1)}

.menu-toggle{display:none; font-size:20px; background:0 0; border:0; color:var(--brand-2)}
@media (max-width:700px){
  .menu-toggle{display:block}
  .site-nav{
    display:none; position:absolute; right:4%; top:calc(100% + 10px);
    flex-direction:column; gap:10px; padding:10px; z-index:1001;
    background:var(--panel); border:1px solid rgba(0,0,0,.1); border-radius:12px;
    box-shadow:var(--shadow-sm);
  }
  .site-nav.open{display:flex}
}

/* Dark header tweaks */
@media (prefers-color-scheme: dark){
  .site-header{background:rgba(17,26,43,.28); border-bottom-color:rgba(255,255,255,.12); box-shadow:0 2px 12px rgba(0,0,0,.45)}
  body.scrolled .site-header{background:rgba(17,26,43,.45); box-shadow:0 6px 20px rgba(0,0,0,.55)}
  .site-nav a{color:var(--text)}
  .site-nav a:hover{color:var(--brand)}
}

/* ===========================
   HERO
   =========================== */
.hero{
  padding:80px 0 70px;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(59,130,246,.15), transparent 60%),
    radial-gradient(800px 400px at 90% 30%, rgba(11,58,102,.12), transparent 60%),
    var(--bg);
  animation:fadeInHero 1s ease forwards; opacity:0;
}
@keyframes fadeInHero{from{opacity:0; transform:translateY(18px)} to{opacity:1; transform:none}}
.hero-grid{display:grid; grid-template-columns:1.08fr .92fr; align-items:center; gap:36px}
@media (max-width:1020px){.hero-grid{grid-template-columns:1fr}}
.hero-copy h1{font-size:clamp(32px,5vw,56px); line-height:1.08; margin:6px 0 10px; color:var(--brand-2)}
.hero-copy p{color:var(--muted); font-size:19px; margin:0 0 10px}
.eyebrow{display:inline-block; font-weight:700; font-size:13px; letter-spacing:.12em; text-transform:uppercase; color:var(--brand-2); background:rgba(59,130,246,.12); padding:6px 10px; border-radius:999px}
.hero-points{margin:16px 0 0; padding-left:18px; color:var(--muted)}
.hero-points li{margin:4px 0}

/* visual */
.ai-visual{--panel-radius:28px; position:relative; height:420px; border-radius:var(--panel-radius); overflow:hidden; isolation:isolate; box-shadow:var(--shadow-md); background:transparent}
@media (max-width:1180px){.ai-visual{height:380px}}
@media (max-width:1020px){.ai-visual{order:-1; height:340px; margin-bottom:18px}}
@media (max-width:700px){ .ai-visual{height:300px} }
.ai-blob{
  position:absolute; inset:-30px; border-radius:inherit;
  background:
    radial-gradient(620px 360px at 30% 35%, rgba(59,130,246,.28), transparent 60%),
    radial-gradient(520px 320px at 80% 70%, rgba(11,58,102,.20), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.28));
  filter:blur(24px); animation:blobPulse 10s ease-in-out infinite alternate; z-index:0;
}
@keyframes blobPulse{0%{transform:translate(0,0) scale(1); opacity:.92} 50%{transform:translate(12px,-8px) scale(1.05); opacity:1} 100%{transform:translate(-6px,4px) scale(1.02); opacity:.95}}

.ai-grid{
  position:absolute; inset:0; border-radius:inherit;
  background-image:linear-gradient(0deg, rgba(11,58,102,.10) 1px, transparent 1px),
                   linear-gradient(90deg, rgba(11,58,102,.10) 1px, transparent 1px);
  background-size:22px 22px;
  backdrop-filter:blur(10px) saturate(120%); -webkit-backdrop-filter:blur(10px) saturate(120%);
  box-shadow:inset 0 0 0 1px rgba(11,58,102,.06), 0 26px 70px rgba(59,130,246,.18);
  -webkit-mask:radial-gradient(120% 120% at 50% 50%, #000 68%, transparent 100%);
          mask:radial-gradient(120% 120% at 50% 50%, #000 68%, transparent 100%);
  animation:gridDrift 28s linear infinite, gridGlow 12s ease-in-out infinite; z-index:1;
}
@keyframes gridDrift{0%{background-position:0 0,0 0} 50%{background-position:28px 10px,18px 6px} 100%{background-position:0 0,0 0}}
@keyframes gridGlow{0%,100%{box-shadow:inset 0 0 0 1px rgba(11,58,102,.06), 0 26px 70px rgba(59,130,246,.18)} 50%{box-shadow:inset 0 0 0 1px color-mix(in oklab, rgba(11,58,102,.06) 60%, transparent), 0 34px 90px rgba(59,130,246,.18)}}

.ai-visual::before{content:""; position:absolute; inset:0; border-radius:inherit; background:radial-gradient(120% 90% at 20% 10%, rgba(255,255,255,.35), transparent 50%), radial-gradient(90% 80% at 85% 80%, rgba(255,255,255,.16), transparent 60%); z-index:2; pointer-events:none}
.ai-visual::after{content:""; position:absolute; top:-20%; left:-40%; width:60%; height:140%; background:linear-gradient(120deg, transparent 0%, rgba(255,255,255,.14) 45%, transparent 90%); transform:rotate(8deg); filter:blur(18px); animation:sweep 7.5s ease-in-out infinite; z-index:2; pointer-events:none}
@keyframes sweep{0%{transform:translateX(-10%) rotate(8deg); opacity:0} 30%{opacity:.55} 60%,100%{transform:translateX(120%) rotate(8deg); opacity:0}}

.ai-brain{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:88%; max-width:560px; height:auto; object-fit:contain; pointer-events:none;
  filter:brightness(1.02) contrast(1.06) saturate(1.10); z-index:3;
  animation:brainFloat 12s ease-in-out infinite;
}
@keyframes brainFloat{0%{transform:translate(-50%,-50%) scale(1)} 50%{transform:translate(-50%,-52%) scale(1.02)} 100%{transform:translate(-50%,-50%) scale(1)}}

/* ===========================
   Cards / Grids
   =========================== */
.grid-3{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:24px}
@media (max-width:820px){.grid-3{grid-template-columns:1fr}}
.card{background:var(--panel); border:1px solid rgba(0,0,0,.06); border-radius:16px; padding:26px; box-shadow:var(--shadow-sm); transition:transform .2s, box-shadow .2s}
.card:hover{transform:translateY(-4px); box-shadow:0 14px 32px rgba(59,130,246,.18)}
.card h3{margin:4px 0 8px; color:var(--brand-2)}
.card p{margin:0; color:var(--muted)}
.section.alt .card:hover{transform:translateY(-6px); box-shadow:0 14px 28px rgba(59,130,246,.15), 0 6px 18px rgba(11,58,102,.10)}

#services .card:hover{transform:translateY(-6px); border-color:rgba(59,130,246,.25); background:var(--panel); box-shadow:0 12px 28px rgba(11,58,102,.12), 0 0 18px rgba(59,130,246,.12)}
#services .card:hover h3{color:var(--brand)}

/* Outcomes / KPI */
#outcomes{text-align:center}
#outcomes .grid-3{align-items:stretch; gap:28px}
@media (max-width:900px){#outcomes .grid-3{grid-template-columns:1fr}}
#outcomes .card.kpi{ text-align:center; padding:44px 36px; border-radius:24px; background:#fff; border:1px solid rgba(0,0,0,.06); box-shadow:0 28px 60px rgba(11,58,102,.10), 0 2px 0 rgba(255,255,255,.90) inset; transition:transform .2s, box-shadow .2s, border-color .2s}
#outcomes .card.kpi:hover{ transform:translateY(-4px); border-color:rgba(59,130,246,.22); box-shadow:0 36px 84px rgba(11,58,102,.14), 0 2px 0 rgba(255,255,255,.92) inset}
#outcomes .card.kpi h3{margin:0 0 14px; line-height:1}
#outcomes .kpi-number{display:inline-block; font-weight:800; letter-spacing:.5px; font-size:clamp(44px,6.2vw,96px); color:#0b3a66}
#outcomes .card.kpi p{margin:0; color:#475569; font-size:clamp(16px,1.6vw,20px)}
@media (prefers-color-scheme: dark){
  #outcomes .card.kpi{background:var(--panel); border-color:rgba(255,255,255,.08); box-shadow:0 28px 60px rgba(0,0,0,.46), 0 1px 0 rgba(255,255,255,.04) inset}
  #outcomes .kpi-number{color:var(--text)}
  #outcomes .card.kpi p{color:var(--muted)}
}

/* Sections helpers */
#services h2, #outcomes h2{margin-bottom:10px; text-align:center}
#services .section-intro p, #outcomes .section-intro p{margin:8px auto 36px; color:var(--muted); max-width:700px; font-size:18px; line-height:1.6}

/* Theming normalization */
.section.alt{background:var(--panel)!important}
#about{background:var(--panel)!important; color:var(--text)!important}
#process .process li, .card.quote{background:var(--panel)!important; color:var(--text)!important; border-color:rgba(0,0,0,.08)}
@media (max-width:700px){
  .site-nav{background:var(--panel)!important; border-color:color-mix(in oklab, var(--text) 12%, transparent)}
}
@media (prefers-color-scheme: light){
  .card, #process .process li, .card.quote{background:#fff!important; border-color:rgba(0,0,0,.06)!important; box-shadow:0 6px 18px rgba(11,58,102,.10)!important}
  .card h3{color:#0b3a66!important} .card p{color:#475569!important}
}

/* ===========================
   Contact
   =========================== */
#contact{background:var(--bg)}
.contact{display:grid; grid-template-columns:1fr; gap:18px}
.contact label{display:block}
.contact label span{display:block; font-weight:600; margin:0 0 6px}
.contact input, .contact textarea{
  width:100%; background:#fff; color:var(--text);
  border:1px solid rgba(0,0,0,.12); border-radius:14px; padding:14px 16px; outline:none;
  transition:border-color .2s, box-shadow .2s, background-color .2s; box-shadow:0 1px 2px rgba(0,0,0,.04);
  -webkit-appearance:none; appearance:none;
}
.contact textarea{min-height:180px; resize:vertical}
.contact input:focus, .contact textarea:focus{border-color:var(--brand); box-shadow:0 0 0 4px var(--ring)}
.contact .btn.btn-primary{
  grid-column:1 / -1; justify-self:stretch; width:100%; padding:16px 22px; border-radius:18px; text-align:center;
  box-shadow:0 8px 26px rgba(59,130,246,.28);
}
.contact .btn.btn-primary:hover{transform:translateY(-2px); box-shadow:0 14px 34px rgba(59,130,246,.38)}
#contact .form-note{color:var(--muted)}
@media (min-width:900px){
  .contact{grid-template-columns:1fr 1fr}
  .contact label:nth-of-type(3){grid-column:1 / -1}
  .contact .btn.btn-primary, #contact .form-note{grid-column:1 / -1}
}
@media (prefers-color-scheme: dark){
  #contact{background:#0e1728}
  .contact input, .contact textarea{background:#0f1a2d; border:1px solid rgba(255,255,255,.12); box-shadow:inset 0 0 0 1px rgba(255,255,255,.02), 0 1px 2px rgba(0,0,0,.35); color:var(--text)}
  .contact input::placeholder, .contact textarea::placeholder{color:rgba(230,238,252,.6)}
}

/* ===========================
   Footer
   =========================== */
.site-footer{
  background:var(--bg); border-top:1px solid rgba(0,0,0,.08); text-align:center; padding:36px 0 28px;
  color:var(--muted); font-size:15px; line-height:1.6;
}
.site-footer p{margin:0 0 8px}
.footer-inner{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px}
.footer-links{display:flex; justify-content:center; gap:22px; margin-top:8px}
.footer-links a{color:var(--brand-2); text-decoration:underline; font-weight:500; transition:color .25s}
.footer-links a:hover{color:var(--brand)}
@media (prefers-color-scheme: dark){
  .site-footer{background:#0e1728; border-top-color:rgba(255,255,255,.10); color:var(--muted)}
  .footer-links a{color:var(--text)} .footer-links a:hover{color:var(--brand)}
}

/* ===========================
   Blog / Posts
   =========================== */
.post-card{display:flex; flex-direction:column; padding:0; overflow:hidden}
.post-card .post-cover{display:block; aspect-ratio:16/9; background:linear-gradient(180deg, rgba(59,130,246,.10), transparent)}
.post-card .post-cover img{width:100%; height:100%; object-fit:cover}
.post-card .post-body{padding:22px}
.post-card .post-title{display:block; font-weight:800; color:var(--brand-2); font-size:clamp(18px,2.2vw,22px); margin:0 0 8px}
.post-card .post-title:hover{color:var(--brand)}
.post-card .post-excerpt{color:var(--muted); margin:0 0 12px}
.post-meta{color:var(--muted); display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:14px}
.post-meta .dot{opacity:.6}
.post-tags{display:flex; gap:8px; flex-wrap:wrap}
.post-tags a{font-size:12px; font-weight:600; color:var(--brand-2); background:color-mix(in oklab, var(--brand) 12%, transparent); padding:6px 10px; border-radius:999px}
.post-tags a:hover{color:#fff; background:var(--brand)}
.post .back{color:var(--muted)}
.post h1{margin:8px 0 10px; color:var(--brand-2)}
.post .post-cover{margin:18px 0 10px; border-radius:var(--radius-md); overflow:hidden; box-shadow:var(--shadow-sm)}
.post-content{color:var(--text)}
.post-content h2, .post-content h3{color:var(--brand-2); margin-top:24px}
.post-content blockquote{margin:16px 0; padding:12px 16px; border-left:4px solid var(--brand); background:color-mix(in oklab, var(--brand) 10%, transparent); border-radius:var(--radius-sm)}
.post-sep{border:0; height:1px; background:rgba(0,0,0,.08); margin:28px 0}
@media (prefers-color-scheme: dark){ .post-sep{background:rgba(255,255,255,.10)} }
.post .post-content{max-width:68ch; margin-inline:auto}

/* Pagination */
.pagination{display:flex; gap:10px; justify-content:center; margin-top:28px}
.pagination .page{
  display:inline-flex; align-items:center; justify-content:center; min-width:42px; height:42px; padding:0 14px;
  border-radius:12px; background:var(--panel); color:var(--brand-2); border:1px solid rgba(0,0,0,.06); box-shadow:var(--shadow-sm);
}
.pagination .current{background:linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color:#fff; border-color:transparent}
@media (prefers-color-scheme: dark){ .pagination .page{border-color:rgba(255,255,255,.10)} }

/* ===========================
   Buttons + Motion
   =========================== */
button.btn, input[type="submit"].btn{-webkit-appearance:none; appearance:none; border:none}
a.btn, button.btn, input[type="submit"].btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 22px; border-radius:14px; font-weight:600; text-decoration:none; cursor:pointer;
}
a.btn.btn-primary, button.btn.btn-primary, input[type="submit"].btn.btn-primary{
  background:linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color:#fff; box-shadow:0 6px 16px rgba(59,130,246,.25);
}
a.btn.btn-primary:hover, button.btn.btn-primary:hover, input[type="submit"].btn.btn-primary:hover{
  transform:translateY(-3px); box-shadow:0 12px 26px rgba(59,130,246,.45);
  background:linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%);
}
@media (prefers-color-scheme: dark){
  :root{--muted:#b6c3d8}
  a.btn:not(.btn-primary), button.btn:not(.btn-primary), input[type="submit"].btn:not(.btn-primary){
    background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); color:var(--text);
    box-shadow:0 2px 10px rgba(0,0,0,.4);
  }
  a.btn:not(.btn-primary):hover, button.btn:not(.btn-primary):hover, input[type="submit"].btn:not(.btn-primary):hover{
    background:rgba(255,255,255,.12); transform:translateY(-2px);
  }
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce){ *{animation:none!important; transition:none!important} }

/* ===========================
   FAQ
   =========================== */
#faq{
  --faq-surface:#ffffff; --faq-surface-active:#f3f8ff; --faq-text:#0b3a66; --faq-muted:#475569;
  --faq-border:rgba(15,23,42,.08);
  --faq-shadow:0 20px 40px rgba(2,6,23,.15), 0 3px 10px rgba(2,6,23,.08);
  --faq-radius:18px;
}
#faq .section-intro p{color:var(--faq-muted)}
#faq details.faq{
  background:linear-gradient(180deg, #ffffff 0%, #f9fbff 100%); border:1px solid var(--faq-border);
  border-radius:var(--faq-radius); padding:18px 20px; margin:16px 0; color:var(--faq-text);
  box-shadow:var(--faq-shadow); transition:transform .25s, box-shadow .25s, border-color .25s, background .3s;
}
#faq details.faq:hover{transform:translateY(-2px); box-shadow:0 24px 60px rgba(2,6,23,.18), 0 6px 22px rgba(2,6,23,.10)}
#faq details.faq[open]{background:var(--faq-surface-active); border-color:rgba(59,130,246,.25); box-shadow:0 26px 60px rgba(2,6,23,.20), 0 8px 26px rgba(2,6,23,.12)}
#faq summary{cursor:pointer; list-style:none; font-weight:700; font-size:clamp(18px,2vw,22px); display:flex; align-items:center; gap:10px; color:var(--faq-text); user-select:none}
#faq summary::-webkit-details-marker{display:none}
#faq summary::after{content:"▸"; margin-left:auto; color:#94a3b8; opacity:.8; font-size:16px; transition:transform .25s, opacity .25s}
#faq details[open] summary::after{transform:rotate(90deg); opacity:1}
#faq details.faq p{margin:12px 0 0; color:var(--faq-muted); line-height:1.6; font-size:16px; animation:faqFadeIn .35s ease forwards}
@keyframes faqFadeIn{from{opacity:0; transform:translateY(-4px)} to{opacity:1; transform:none}}
@media (prefers-color-scheme: dark){
  #faq{--faq-shadow:0 22px 50px rgba(0,0,0,.45), 0 3px 12px rgba(0,0,0,.25); --faq-surface-active:#e8f1ff}
  #faq details.faq{background:linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%); box-shadow:var(--faq-shadow)}
}
/* === FINAL OVERRIDES: header + logo (force apply) === */
.site-header { backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
body { padding-top: 88px !important; }                    /* keep content below fixed header */
.nav { padding: 14px 0 !important; gap: 20px !important; }

.logo { display: flex !important; align-items: center !important; }
.logo .logo-img { height: 76px !important; width: auto !important; display: block !important; }

/* light/dark logo swap (force) */
.logo .logo-img.dark  { display: none !important; }
@media (prefers-color-scheme: dark) {
  .logo .logo-img.light { display: none !important; }
  .logo .logo-img.dark  { display: block !important; }
}

/* tighter on smaller screens */
@media (max-width: 1020px) { .logo .logo-img { height: 64px !important; } }
@media (max-width: 700px)  { .logo .logo-img { height: 54px !important; } .nav { padding: 12px 0 !important; } }

/* mobile menu panel visibility */
@media (max-width:700px){
  .menu-toggle { display: block !important; }
  .site-nav { display: none !important; position: absolute; right: 4%; top: calc(100% + 10px);
              flex-direction: column; gap: 10px; padding: 10px; z-index: 1001;
              background: var(--panel); border: 1px solid rgba(0,0,0,.1); border-radius: 12px; }
  .site-nav.open { display: flex !important; }
}

/* nav active underline always visible */
.site-nav a.active::after { opacity: 1 !important; transform: scaleX(1) !important; }
/* === NAV Contact link style fix === */
.site-nav a[href*="#contact"] {
  background: none !important;
  color: var(--brand-2) !important;
  padding: 8px 10px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.site-nav a[href*="#contact"]:hover {
  color: var(--brand) !important;
}

@media (prefers-color-scheme: dark) {
  .site-nav a[href*="#contact"] {
    color: var(--text) !important;
  }
  .site-nav a[href*="#contact"]:hover {
    color: var(--brand) !important;
  }
}
