/* Corafter final visual, responsive and SEO-safe presentation layer */
:root{
  --corafter-navy:#071B45;
  --corafter-navy-2:#0B2865;
  --corafter-blue:#155EEF;
  --corafter-cyan:#2F80FF;
  --corafter-violet:#6C4DFF;
  --corafter-purple:#8B5CF6;
  --corafter-ink:#0B1736;
  --corafter-muted:#667085;
  --corafter-line:#DCE6F5;
  --corafter-soft:#F5F8FF;
}

html{scroll-padding-top:90px}
body{overflow-x:hidden;word-wrap:break-word}
img,svg,video,canvas{max-width:100%;height:auto}
button,input,select,textarea{font:inherit}
button,a{touch-action:manipulation}

/* Real Corafter logo supplied by the client */
.brand{min-width:0;line-height:0}
.brand-logo{display:block;width:clamp(112px,12vw,148px);height:auto;object-fit:contain;object-position:left center}
.site-header:not(.scrolled) .brand-logo{filter:drop-shadow(0 8px 18px rgba(0,0,0,.14))}
.site-footer .brand-logo{width:128px}
.brand-mark,.brand-name{display:none!important}

/* Header: prevent cramped navigation and text collisions */
.site-header{isolation:isolate}
.nav-wrap{min-width:0}
.main-nav{min-width:0}
.nav-link{white-space:nowrap}
.dropdown-menu{z-index:1100;max-height:min(70vh,520px);overflow:auto}

/* Global text safety */
h1,h2,h3,h4,p,a,li,span,strong,small{overflow-wrap:anywhere}
.section-heading{max-width:100%}
.section-heading p{max-width:760px}

/* Service pages */
.service-hero-grid,.page-hero-inner,.contact-grid,.quote-layout,.article-layout,.featured-post,.detail-grid,.split,.story-grid{min-width:0}
.service-hero-copy,.service-hero-visual,.detail-copy,.service-highlight-card{min-width:0}
.service-hero-copy h1{max-width:760px;text-wrap:balance}
.service-hero-lead{max-width:680px}
.service-hero-trust{display:flex;flex-wrap:wrap;gap:10px 18px}
.service-hero-visual{overflow:visible}
.service-hero-3d-stack{overflow:visible}
.service-main-3d{max-width:100%;max-height:100%;object-fit:contain}
.lottie-shell{pointer-events:none}
.service-visual-art img{max-width:92%;max-height:92%}
.service-feature-card,.value-card,.use-case-card,.related-service-card,.service-visual-card{min-width:0}

/* Consistent professional card surfaces */
.service-feature-card,.value-card,.service-highlight-card,.service-visual-card,.use-case-card,.related-service-card{border-color:var(--corafter-line)}
.service-feature-card:hover,.value-card:hover,.use-case-card:hover,.related-service-card:hover{box-shadow:0 22px 50px rgba(21,94,239,.10)}

/* 3D objects stay decorative and never cover text */
.floating-object,.floating-tag,.idea-note,.hero-orb,.hero-grid,.art-glow{pointer-events:none}

/* Forms: labels and fields never collide on narrow screens */
.form-group,.form-two>*{min-width:0}
input,select,textarea{max-width:100%;min-width:0}
textarea{resize:vertical}

/* Large desktop */
@media (min-width:1200px){
  .container{width:min(1200px,calc(100% - 64px))}
  .hero-home{min-height:700px}
}

/* Tablet */
@media (max-width:1100px){
  .main-nav{gap:14px}
  .nav-link{font-size:13px}
  .nav-cta{padding-inline:15px}
  .hero-inner,.service-hero-grid{grid-template-columns:minmax(0,1fr) minmax(360px,1fr);gap:20px}
  .hero h1,.service-hero-copy h1{font-size:clamp(40px,5vw,62px)}
}

@media (max-width:900px){
  .hero-inner,.service-hero-grid,.page-hero-inner,.detail-grid,.split,.story-grid,.contact-grid,.quote-layout,.article-layout,.featured-post{grid-template-columns:1fr}
  .hero-copy,.service-hero-copy{order:1}
  .hero-art,.service-hero-visual{order:2;width:100%;max-width:720px;margin:0 auto}
  .hero-art{min-height:410px}
  .service-hero-visual-enhanced{min-height:400px}
  .page-hero-art{display:block;opacity:.35;position:absolute;inset:auto 0 0 auto;width:min(55vw,500px)}
  .page-hero{position:relative;overflow:hidden}
  .page-hero-inner{position:relative;z-index:2}
  .service-main-3d{width:min(100%,640px)}
  .lottie-shell{right:2%;bottom:3%}
}

/* Mobile navigation */
@media (max-width:760px){
  .container{width:min(100% - 28px,1200px)}
  .site-header{padding:10px 0}
  .brand-logo{width:120px}
  .menu-toggle{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18)}
  .site-header.scrolled .menu-toggle{background:#F2F6FF;border-color:var(--corafter-line)}
  .main-nav{position:fixed;top:0;right:0;width:min(360px,92vw);height:100dvh;overflow-y:auto;padding:88px 22px 28px;background:rgba(255,255,255,.98);backdrop-filter:blur(20px);box-shadow:-25px 0 70px rgba(7,27,69,.18);transform:translateX(105%);visibility:hidden;transition:transform .28s ease,visibility .28s ease;display:flex;flex-direction:column;align-items:stretch;gap:3px}
  .main-nav.open{right:0;transform:translateX(0);visibility:visible}
  .nav-link,.site-header.scrolled .nav-link{color:var(--corafter-ink);font-size:15px;padding:13px 10px;border-radius:10px}
  .nav-link:hover,.nav-link:focus-visible{background:#F1F5FF}
  .nav-dropdown{width:100%}
  .nav-drop-button{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left}
  .dropdown-menu{position:static;width:100%;max-height:none;transform:none!important;opacity:1;visibility:visible;display:none;box-shadow:none;border:0;background:#F7F9FE;padding:5px 8px;border-radius:12px}
  .nav-dropdown.open .dropdown-menu{display:block}
  .dropdown-menu a{padding:10px;font-size:14px}
  .nav-cta{margin-top:12px;width:100%;justify-content:center}

  .hero-home{padding:112px 0 65px;min-height:0}
  .hero h1,.service-hero-copy h1,.page-hero h1{font-size:clamp(36px,10vw,50px);line-height:1.03;letter-spacing:-.045em}
  .hero-copy>p,.service-hero-lead{font-size:15px;line-height:1.7}
  .hero-actions{gap:9px}
  .hero-actions .btn{min-height:46px}
  .hero-pills{gap:12px;flex-wrap:wrap}
  .hero-pills span{font-size:14px}
  .hero-art{min-height:330px;margin-top:8px}
  .service-hero-visual-enhanced{min-height:345px}
  .service-hero-3d-stack{height:330px}
  .service-main-3d{width:105%}
  .floating-tag{font-size:9px;padding:7px 9px}
  .tag-web{top:7%;right:24%}.tag-app{top:22%;right:0}.tag-software{bottom:10%;left:0}
  .lottie-shell{width:112px;height:96px;border-radius:20px}
  .hero-mini-3d{width:48px;height:48px}
  .service-float{display:none}

  .section{padding:62px 0}
  .content-section{padding:62px 0}
  .stats-grid,.service-stats-grid{grid-template-columns:1fr 1fr}
  .stats-grid div{min-width:0;padding:17px 10px}
  .stats-grid strong,.service-stat strong{font-size:clamp(23px,7vw,32px)}
  .service-grid,.service-visual-grid,.use-case-grid,.values-grid,.team-grid,.portfolio-grid,.blog-grid{grid-template-columns:1fr}
  .service-feature-grid,.service-process-grid{grid-template-columns:1fr}
  .process-line{grid-template-columns:1fr 1fr}
  .process-line>div{min-width:0}
  .tech-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .tech{min-width:0;text-align:center}
  .page-hero{padding:112px 0 70px;min-height:300px}
  .page-hero-art{display:none}
  .footer-grid{grid-template-columns:1fr;gap:30px}
  .footer-bottom{align-items:flex-start;flex-direction:column;gap:8px}
  .site-footer .brand-logo{width:128px}

  /* Stop decorative art from ever forcing a horizontal scroll */
  .art-glow{width:320px;height:320px;right:-5%;top:20px}
  .ring-1{width:300px;height:120px;right:-5%;top:105px}
  .ring-2{width:240px;height:90px;right:8%;top:125px}
  .mock-person{transform:scale(.78);transform-origin:center;right:8%;top:40px}
  .hero-3d-image{max-width:100%;object-fit:contain}

  .article-body img,.featured-media img,.portfolio-media img{width:100%;height:auto}
  .form-two{grid-template-columns:1fr}
  .form-actions,.inline-form{grid-template-columns:1fr;display:grid}
  .btn{width:auto;max-width:100%}
}

@media (max-width:480px){
  .container{width:calc(100% - 24px)}
  .brand-logo{width:112px}
  .hero h1,.service-hero-copy h1,.page-hero h1{font-size:35px}
  .hero-actions{display:grid;grid-template-columns:1fr}
  .hero-actions .btn{width:100%}
  .hero-art{min-height:285px}
  .service-hero-visual-enhanced{min-height:300px}
  .service-hero-3d-stack{height:285px}
  .service-main-3d{width:115%}
  .lottie-shell{width:92px;height:78px}
  .hero-mini-3d{width:40px;height:40px}
  .stats-grid,.service-stats-grid{grid-template-columns:1fr 1fr}
  .stats-grid span,.service-stat span{font-size:10px}
  .section-heading h2{font-size:30px}
  .service-visual-art{height:165px}
  .use-case-card{min-height:0}
  .process-line{grid-template-columns:1fr}
  .tech-grid{grid-template-columns:1fr}
  .site-footer{overflow:hidden}
}

/* Very narrow phones */
@media (max-width:360px){
  .container{width:calc(100% - 20px)}
  .brand-logo{width:106px}
  .hero h1,.service-hero-copy h1,.page-hero h1{font-size:32px}
  .stats-grid,.service-stats-grid{grid-template-columns:1fr}
  .service-stat{border-right:0!important;border-bottom:1px solid var(--corafter-line)!important}
  .service-stat:last-child{border-bottom:0!important}
}

/* Accessibility */
:focus-visible{outline:3px solid rgba(47,128,255,.45);outline-offset:3px}
.skip-link{z-index:2000}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* Service hero header clearance: keep fixed navigation from covering hero content. */
.service-page .service-hero{
  padding-top:96px;
}
.service-page .service-hero-grid{
  min-height:620px;
}
@media (max-width:1050px){
  .service-page .service-hero{padding-top:88px}
  .service-page .service-hero-grid{min-height:0}
}
@media (max-width:760px){
  .service-page .service-hero{padding-top:82px}
  .service-page .service-hero-copy{padding-top:24px}
}
@media (max-width:480px){
  .service-page .service-hero{padding-top:76px}
  .service-page .service-hero-copy{padding-top:18px}
}
