:root{
  --site-max: min(1440px, calc(100vw - 32px));
  --site-pad: clamp(16px, 3vw, 40px);
}

html,body{width:100%;overflow-x:hidden}
.container,.home-wrap,.footer-wrap{
  width:100%;
  max-width:var(--site-max);
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}

.site-header{width:100%;padding:0 var(--site-pad);box-sizing:border-box}
.site-header .header-bar{max-width:100%!important;width:100%;margin:10px 0}

.site-page,.section{padding:clamp(40px,6vw,72px) 0;width:100%}
.site-page .container,.section .container{
  width:100%;max-width:var(--site-max);margin:0 auto;padding:0 var(--site-pad);box-sizing:border-box
}
.site-page h1,.section h1{
  font-size:clamp(28px,4vw,42px);font-weight:800;letter-spacing:-.02em;margin:0 0 12px;line-height:1.12
}
.site-page .lead,.section .lead,.services-page .lead{
  color:var(--muted,#475569);font-size:clamp(15px,2vw,18px);line-height:1.75;max-width:820px;margin:0 0 24px
}
.site-page .content{line-height:1.75;color:#334155}
.site-page .content h2,.site-page .content h3{margin-top:1.4em;color:#0f172a}

.services-page{width:100%;max-width:var(--site-max);margin:0 auto;padding:0 var(--site-pad);box-sizing:border-box}
.services-page .fit-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
.services-page .fit-strip div{border:1px solid #dbeafe;background:#eff6ff;border-radius:12px;padding:12px 14px;color:#1e3a8a;line-height:1.6}
.services-page .service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.services-page .service-card{
  border:1px solid #dbeafe;background:#f8fbff;border-radius:16px;padding:18px;display:flex;flex-direction:column;
  transition:transform .2s ease,box-shadow .2s ease
}
.services-page .service-card:hover{transform:translateY(-3px);box-shadow:0 16px 40px rgba(15,23,42,.08)}
.services-page .service-card h2{margin:0 0 8px;font-size:1.2rem}
.services-page .service-card p{margin:0 0 14px;color:#334155;line-height:1.65}
.services-page .service-card ul{margin:0 0 14px;padding-left:18px;color:#334155;line-height:1.65}
.services-page .service-card a{margin-top:auto;justify-content:center}

.contact-page{width:100%;max-width:var(--site-max);margin:0 auto;padding:0 var(--site-pad);box-sizing:border-box}
.contact-page .contact-grid{display:grid;grid-template-columns:1fr 1.15fr;gap:16px}
.contact-page .contact-card{border:1px solid #e2e8f0;background:#fff;border-radius:16px;padding:18px}
.contact-page .quick-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.contact-page .quick-actions a{
  display:inline-flex;padding:10px 14px;border-radius:10px;border:1px solid #cbd5e1;text-decoration:none;
  font-weight:700;color:#0f172a
}

/* Dark mode */
html[data-theme="dark"] body{
  background:
    radial-gradient(1200px 680px at 8% -15%, rgba(59,91,255,.12), transparent 58%),
    radial-gradient(900px 620px at 95% 0%, rgba(20,184,255,.08), transparent 56%),
    #060b1f!important;
  color:#e6ecff;
}
html[data-theme="dark"]{--bg:#060b1f;--fg:#e6ecff;--muted:#9fb0da;--card:#0e1636;--border:#22346b}
html[data-theme="dark"] .home-section{border-bottom-color:#1e293b}
html[data-theme="dark"] .home-kicker{color:#93c5fd}
html[data-theme="dark"] .home-subtitle,html[data-theme="dark"] .case-meta,html[data-theme="dark"] .stat-label{color:#9fb0da}
html[data-theme="dark"] .list-card,html[data-theme="dark"] .case-card,html[data-theme="dark"] .offer-card,
html[data-theme="dark"] .testimonial-card,html[data-theme="dark"] .contact-card,html[data-theme="dark"] .founder-card,
html[data-theme="dark"] .portfolio-box,html[data-theme="dark"] .faq-item,html[data-theme="dark"] .service-card,
html[data-theme="dark"] .contact-page .contact-card{
  background:#0e1636;border-color:#22346b;color:#e6ecff;
}
html[data-theme="dark"] .list-card p,html[data-theme="dark"] .case-block p,html[data-theme="dark"] .offer-card p{color:#b6c5e8}
html[data-theme="dark"] .stat-card{background:#111c44;border-color:#22346b}
html[data-theme="dark"] .stat-value{color:#f1f5ff}
html[data-theme="dark"] .logo-card{background:#0e1636;border-color:#22346b}
html[data-theme="dark"] .proof-chip,html[data-theme="dark"] .proof-badge{background:#111c44!important;border-color:#22346b!important;color:#dbeafe!important}
html[data-theme="dark"] #home.home-section::before{
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(59,91,255,.22), transparent 60%),
    radial-gradient(700px 420px at 100% 10%, rgba(20,184,255,.16), transparent 58%),
    linear-gradient(180deg, rgba(14,22,54,.95), rgba(6,11,31,.98));
  border-color:#22346b;
}
html[data-theme="dark"] .hero-outcome{color:#93c5fd}
html[data-theme="dark"] .cta-alt{background:#111c44;border-color:#334155;color:#e6ecff}
html[data-theme="dark"] .site-page .content{color:#b6c5e8}
html[data-theme="dark"] .services-page .lead{color:#9fb0da}
html[data-theme="dark"] .services-page .fit-strip div{background:#111c44;border-color:#22346b;color:#dbeafe}
html[data-theme="dark"] .site-footer{background:linear-gradient(135deg,#020617,#0f172a)!important}

@media (max-width:980px){
  .services-page .service-grid,.services-page .fit-strip,.contact-page .contact-grid{grid-template-columns:1fr}
}
@media (max-width:768px){
  :root{--site-pad:16px}
  .site-header .header-bar{margin:8px 0;border-radius:14px}
  .nav-right .btn-quote{font-size:11px;padding:.45rem .6rem;max-width:140px;text-align:center;line-height:1.2}
}


/* Full-bleed layout patch */
:root{
  --site-max:100%;
  --site-pad:clamp(16px,4vw,48px);
}

#home.home-section::before{
  inset:0!important;
  border-radius:0!important;
  border-left:none!important;
  border-right:none!important;
}

.site-header{padding:0!important}
.site-header .header-bar{
  width:calc(100% - 24px)!important;
  max-width:none!important;
  margin:8px 12px!important;
  border-radius:16px!important;
}

/* Compact case cards - show outcome only */
.case-card-compact .case-block{display:none!important}
.case-card-compact .case-block:last-of-type{display:block!important}
.case-card-compact .case-meta:last-of-type{display:none}

/* Mobile header CTA */
@media (max-width:520px){
  .nav-right .btn-quote{font-size:10px;padding:.4rem .5rem;max-width:110px}
  .theme-toggle{padding:.35rem .5rem}
}
