/* 3D Factory Iceland — mobile responsive layer v1
   Desktop layout is untouched. Rules below work only on smaller screens. */

.mobile-menu-toggle{display:none}

@media (max-width: 820px){
  html{font-size:16px;-webkit-text-size-adjust:100%}
  body{overflow-x:hidden}
  .container{width:min(100% - 28px,1280px)!important;margin-left:auto!important;margin-right:auto!important}

  /* Header / mobile navigation */
  .site-header{background:rgba(5,7,11,.94)!important;backdrop-filter:blur(18px)!important}
  .site-header .nav,
  .nav{height:auto!important;min-height:74px!important;padding:10px 0!important;display:grid!important;grid-template-columns:auto 1fr auto!important;gap:10px!important;align-items:center!important;position:relative!important}
  .nav-logo{min-width:0!important;display:flex!important;align-items:center!important}
  .nav-logo img{width:100px!important;height:52px!important;border-radius:14px!important;padding:6px!important}
  .lang{justify-content:end!important;gap:5px!important}
  .lang button{width:38px!important;height:34px!important;border-radius:11px!important;font-size:11px!important;padding:0!important}

  .mobile-menu-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:42px!important;height:38px!important;border-radius:12px!important;border:1px solid rgba(255,255,255,.22)!important;background:rgba(255,255,255,.08)!important;color:#eefbff!important;font-weight:950!important;font-size:20px!important;line-height:1!important;cursor:pointer!important;justify-self:end!important}
  .mobile-menu-toggle:focus{outline:2px solid rgba(88,230,255,.75)!important;outline-offset:2px!important}

  .nav-buttons{position:fixed!important;left:14px!important;right:14px!important;top:82px!important;z-index:9999!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding:12px!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:20px!important;background:rgba(5,7,11,.97)!important;box-shadow:0 26px 80px rgba(0,0,0,.62)!important;backdrop-filter:blur(18px)!important;max-height:calc(100vh - 100px)!important;overflow:auto!important;opacity:0!important;visibility:hidden!important;transform:translateY(-10px)!important;pointer-events:none!important;transition:.2s ease!important;order:initial!important;flex-basis:auto!important;justify-content:initial!important}
  body.mobile-nav-open .nav-buttons{opacity:1!important;visibility:visible!important;transform:translateY(0)!important;pointer-events:auto!important}
  .nav-btn{width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;border-radius:14px!important;font-size:14px!important;padding:13px 14px!important;white-space:normal!important;min-height:46px!important}

  /* General type and sections */
  h1{font-size:clamp(38px,12vw,56px)!important;line-height:.96!important;letter-spacing:-.055em!important}
  .section-title{font-size:clamp(32px,10vw,48px)!important;line-height:.98!important;letter-spacing:-.055em!important}
  .section-copy,.hero-copy,.placeholder-card p{font-size:16px!important;line-height:1.58!important}
  .kicker,.eyebrow{font-size:11px!important;letter-spacing:.13em!important}
  .section{padding:54px 0!important}
  .section-head{margin-bottom:28px!important}

  /* Hero sections */
  .hero{min-height:auto!important;align-items:center!important}
  .hero-inner{grid-template-columns:1fr!important;gap:22px!important;padding:38px 0 48px!important;min-height:auto!important}
  .hero-text h1{font-size:clamp(42px,13vw,62px)!important;line-height:.92!important}
  .hero-text p{font-size:18px!important;line-height:1.42!important}
  .hero-logo-wrap{min-height:0!important;transform:none!important;justify-content:center!important;padding:0!important;margin-top:8px!important}
  .hero-logo{width:min(86vw,390px)!important;max-height:42vh!important;object-fit:contain!important}
  .hero-bg:after{background:linear-gradient(180deg,rgba(0,0,0,.74),rgba(0,0,0,.50) 45%,rgba(0,0,0,.78))!important}
  .hero-panel{padding:18px!important;border-radius:24px!important}
  .hero-actions{gap:10px!important;margin-top:22px!important}
  .btn{width:100%!important;min-height:48px!important;border-radius:14px!important;padding:13px 16px!important}

  /* Grids/cards across homepage and subpages */
  .services-grid,.process-grid,.news-grid,.grid-3,.grid-2,.split,.spec-grid{grid-template-columns:1fr!important;display:grid!important;gap:14px!important}
  .service-card,.service-card:nth-child(4),.service-card:nth-child(5){grid-column:auto!important;min-height:0!important;border-radius:24px!important}
  .service-image{height:205px!important}
  .service-content{padding:19px!important;gap:10px!important}
  .service-content h3,.card h3,.step h3,.process-item h3{font-size:22px!important;line-height:1.08!important}
  .card,.process-item,.news-card,.placeholder-card{border-radius:22px!important;padding:20px!important}
  .process-wrap,.cta{border-radius:26px!important;padding:18px!important}
  .process-wrap:before{display:none!important}
  .step-no{margin-bottom:18px!important;width:48px!important;height:48px!important;border-radius:15px!important}
  .image-card{min-height:260px!important;border-radius:24px!important}
  .image-card img{height:100%!important;object-fit:cover!important}
  .spec strong{font-size:21px!important}
  .step{grid-template-columns:1fr!important;padding:18px!important;border-radius:20px!important}
  .step:before{width:46px!important;height:46px!important;border-radius:14px!important}

  /* Forms */
  input,textarea,select,button{font-size:16px!important}
  form,.form-card,.quote-card,.contact-card{max-width:100%!important}
  .field,.form-field{width:100%!important}

  /* Footer */
  .footer{padding:24px 0!important}
  .footer-row{display:grid!important;grid-template-columns:1fr!important;gap:16px!important;text-align:center!important;justify-items:center!important}
  .footer-links{justify-content:center!important;gap:10px!important;width:100%!important}
  .mail-link{width:100%!important;justify-content:center!important;word-break:break-word!important}
}

@media (max-width: 390px){
  .container{width:min(100% - 22px,1280px)!important}
  .nav-logo img{width:92px!important;height:48px!important}
  .lang button{width:34px!important;height:32px!important;font-size:10px!important}
  .mobile-menu-toggle{width:38px!important;height:34px!important}
  .nav-buttons{left:10px!important;right:10px!important;top:76px!important}
  .service-image{height:188px!important}
}


/* v4 — homepage hero mobile correction: keep image visible and move slogan back over the hero */
@media (max-width: 820px){
  .hero{
    min-height:390px!important;
    display:block!important;
    position:relative!important;
    background:#05070b!important;
    overflow:hidden!important;
  }
  .hero-bg{
    position:absolute!important;
    inset:0!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    background:#05070b!important;
  }
  .hero-bg img{
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    object-fit:contain!important;
    object-position:center top!important;
  }
  .hero-bg:after{
    background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.10) 42%,rgba(0,0,0,.86) 100%),linear-gradient(90deg,rgba(0,0,0,.64) 0%,rgba(0,0,0,.18) 58%,rgba(0,0,0,.35) 100%)!important;
  }
  .hero-inner{
    position:relative!important;
    z-index:2!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    min-height:390px!important;
    padding:190px 0 0!important;
  }
  .hero-text{
    max-width:68vw!important;
    margin:0!important;
  }
  .hero-text h1{
    font-size:clamp(24px,7vw,34px)!important;
    line-height:1.03!important;
    letter-spacing:-.04em!important;
    max-width:12ch!important;
    margin:0!important;
    background:rgba(2,5,8,.64)!important;
    border:1px solid rgba(255,255,255,.12)!important;
    border-radius:16px!important;
    padding:10px 12px!important;
    box-shadow:0 14px 42px rgba(0,0,0,.34)!important;
    backdrop-filter:blur(8px)!important;
  }
}

@media (max-width: 430px){
  .hero{min-height:360px!important}
  .hero-inner{min-height:360px!important;padding-top:178px!important}
  .hero-text{max-width:70vw!important}
}

@media (max-width: 390px){
  .hero{min-height:340px!important}
  .hero-inner{min-height:340px!important;padding-top:162px!important}
  .hero-text{max-width:72vw!important}
  .hero-text h1{font-size:clamp(21px,6.6vw,29px)!important;padding:9px 11px!important;border-radius:15px!important}
}
