
.ylapalkki {
  position: fixed;


  z-index: 100;

  display: flex;
  justify-content: space-between;
  align-items:  center;



}


.menu-label,
.hero-lines,
.corner-image.with-overlay,
.hero-x {
  will-change: transform, opacity;
  transform: translateZ(0);
}

.corner-image.with-overlay {
  position: fixed;
  top: -1.8vh;            
  left: 2.5vw;
  width: 150px;
  height: auto;
  z-index: 999;
  pointer-events: auto;    
}

.corner-image.with-overlay img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: sepia(1) saturate(3) hue-rotate(320deg) brightness(1.3);
  display: block;
  position: absolute;
  top: 0; left: 0;
  transition: opacity 0s ease;
  cursor: pointer;
  pointer-events: auto;
}

.corner-image.with-overlay .normal-logo {
  opacity: 1;
  position: relative; 
  z-index: 1;
}

.corner-image.with-overlay .hover-logo {
  opacity: 0;
  z-index: 2;
}

.corner-image.with-overlay:hover .normal-logo {
  opacity: 0;
}

.corner-image.with-overlay:hover .hover-logo {
  opacity: 1;
}


.corner-image .image-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.5;
  pointer-events: none;
  z-index: 3;
}



@media (max-width: 480px){
  .corner-image.with-overlay{
    position: fixed !important;          
    top: calc(env(safe-area-inset-top) - 8px) !important; 
    left: 3vw !important;
    width: 120px;             
    height: 28px;             
    z-index: 1001;            
    pointer-events: none;     
    transform: none !important; 
    margin: 0 !important;
  }
  .corner-image{ transform: none !important; }
  .corner-image.visible{ transform: none !important; }
  .corner-image.with-overlay img{
    position: absolute;
    inset: 0;                 
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;             
  }
  .corner-image.with-overlay .image-overlay{ display: none !important; }

  
  .corner-image.with-overlay .normal-logo{ opacity: 1 !important; z-index: 1; }
  .corner-image.with-overlay .hover-logo{ opacity: 0 !important; display: none !important; }
  .corner-image.with-overlay:hover .normal-logo{ opacity: 1 !important; }
  .corner-image.with-overlay:hover .hover-logo{ opacity: 0 !important; }

  
  body.light-mode .corner-image.with-overlay .normal-logo{ opacity: 1 !important; }
  body.light-mode .corner-image.with-overlay .hover-logo{ opacity: 0 !important; display: none !important; }
}


@media (min-width: 481px) and (max-width: 900px){
  .corner-image.with-overlay{
    position: fixed;
    top: 1.2svh;
    left: 3vw;
    width: 148px;             
    height: 148px;             
    z-index: 30;
    pointer-events: none;     
  }
  .corner-image.with-overlay img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;             
  }
  .corner-image.with-overlay .image-overlay{ display: none !important; }

  
  .corner-image.with-overlay .normal-logo{ opacity: 1 !important; z-index: 1; }
  .corner-image.with-overlay .hover-logo{ opacity: 0 !important; display: none !important; }
  .corner-image.with-overlay:hover .normal-logo{ opacity: 1 !important; }
  .corner-image.with-overlay:hover .hover-logo{ opacity: 0 !important; }

  body.light-mode .corner-image.with-overlay .normal-logo{ opacity: 1 !important; }
  body.light-mode .corner-image.with-overlay .hover-logo{ opacity: 0 !important; display: none !important; }
}




.corner-image.with-overlay .normal-logo {
    opacity: 1;
    z-index: 1;
}

.corner-image.with-overlay .hover-logo {
    opacity: 0;
    z-index: 2;
}

.corner-image.with-overlay:hover .normal-logo {
    opacity: 0;
}

.corner-image.with-overlay:hover .hover-logo {
    opacity: 1;
}


body.light-mode .corner-image.with-overlay .normal-logo {
    opacity: 0;  
    z-index: 2;  
}

body.light-mode .corner-image.with-overlay .hover-logo {
    opacity: 1;  
    z-index: 1;  
}


body.light-mode .corner-image.with-overlay:hover .normal-logo {
    opacity: 1;  
}

body.light-mode .corner-image.with-overlay:hover .hover-logo {
    opacity: 0;  
}



.hero-upper-wrapper {
  position: relative;   
  width: 100%;
  height: 0;            
  pointer-events: none; 
}

.menu-label {
  position: fixed;
  top: calc(12% - 7.5vh);
  right: calc(2vw + 5.5vw);
  color: #f0ebdb;
  font-weight: 700;
  font-size: 1.1rem;
  user-select: none;
  pointer-events: auto;

  z-index: 901;
  cursor: pointer;
  padding-left: 50px;
  padding-bottom: 40px;

  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-label.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.menu-label:hover {
  color: #0d1321;
}


.hero-lines {
  pointer-events: auto;
  position: fixed;
  top: calc(12% - 7.5vh); 
  right: 3vw;
  left: auto;
  height: 11vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 900;
  transform: scaleX(1);
  cursor: pointer;
  transition: top 0.4s ease, opacity 0.3s ease;
}


.hero-lines.keskella {
  top: 43vh; 
  opacity: 0;             
  pointer-events: none;   
}


  .hero-x{
    position: fixed;
    top: calc(15% - 7.5vh);    
    right: 3vw;                 
    z-index: 902;               
    width: 40px;                
    height: 40px;
    background: transparent;
    border: none;
    color: #f0ebdb;             
    cursor: pointer;
    padding: 4px;               
    border-radius: 4px;         
    opacity: 0;                 
    pointer-events: none;       
    transition: top 0.4s ease, opacity 0.3s ease, transform 0.15s ease;
  }
  .hero-x:focus-visible{ outline: 2px solid currentColor; outline-offset: 2px; }
  .hero-x:hover{ transform: scale(1.04); }
  body.light-mode .hero-x{ color:#0d1321; }
  
  
  .hero-x{ display: inline-flex; align-items: center; justify-content: center; gap: 0; }
  .hero-x .xbar{
    position: absolute;
    width: 28px;                  
    height: 3.5px;                
    background: currentColor;
    border-radius: 2px;
    transform-origin: 50% 50%;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  
  .hero-x .xbar.top{    transform: translateY(-4px) rotate(0deg); }
  .hero-x .xbar.bottom{ transform: translateY( 4px) rotate(0deg); }

  
  .hero-lines.keskella ~ .hero-x .xbar.top{    transform: translateY(0) rotate(45deg); }
  .hero-lines.keskella ~ .hero-x .xbar.bottom{ transform: translateY(0) rotate(-45deg); }


.hero-lines.keskella ~ .hero-x{
  top: 47vh;
  opacity: 1;
  pointer-events: auto;
}


@media (max-width: 480px){
  .hero-x{ top: 4.5svh; right: 7.5vw; }
  .hero-lines.keskella ~ .hero-x{ top: 4.5svh; }
}



.hero-lines.keskella .line-unit{ opacity: 0; }


.line-unit {
  width: 35px;
  height: 4px;

  border-radius: 2px;
  transition: background-color 0.3s ease, transform 0.4s ease, opacity 0.4s ease;
}







.menu-label,
.hero-lines,
.corner-image {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}


.menu-label.visible,
.hero-lines.visible,
.corner-image.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sivupaneeli {
  position: fixed;
  top: 0;
  right: 0;
  width: 120px;
  height: 20vh;
  background-color:  #0d1321;

  transform: translateX(100%);
  transition: transform 0.4s ease, height 0.4s ease;
  z-index: 804;
  pointer-events: auto;
  overflow: hidden;


  box-sizing: border-box;    
  border-radius: 0 0 0 50px ;
}



body.light-mode .ylapalkki {
  background-color: #f0ebdb; 
}

body.light-mode .sivupaneeli {
  background-color: #f0ebdb; 
}

body.light-mode .menu-label {
  color: #0d1321; 
}

body.light-mode .menu-label:hover {
  color: #f0ebdb;
}



.hero-lines .line-unit {
  background-color: #cdcdce;
}
.hero-lines .line-unit.line-unit-long {
  background-color: #f0ebdb;
}
.hero-lines .line-unit.hovering {
  background-color: #1d2d44;
}


.hero-lines:hover .line-unit,
.hero-lines.hovered .line-unit {
  background-color: #0d1321 !important; 
  transition: background-color 0.25s ease;
}

body.light-mode .hero-lines:hover .line-unit,
body.light-mode .hero-lines.hovered .line-unit {
  background-color: #f0ebdb !important; 
}


body.light-mode .hero-lines .line-unit {
  background-color: #0d1321;
}
body.light-mode .hero-lines .line-unit.hovering {
  background-color: #f0ebdb;
}

body.light-mode .hero-lines.keskella .line-unit:nth-child(1),
body.light-mode .hero-lines.keskella .line-unit:nth-child(2) {
  background-color: #0d1321;
}

body.light-mode .corner-image.with-overlay .normal-logo img {
  filter: sepia(0.01) saturate(0.1) hue-rotate(0deg) brightness(0.2);
}

body.light-mode .corner-image.with-overlay .hover-logo img {
  filter: sepia(0.01) saturate(0.1) hue-rotate(0deg) brightness(0.2);
}

.sivupaneeli.näkyy {
  transform: translateX(0%);
}


.sivupaneeli.korkea {
  height: 100vh;
}

.sivupaneeli.korkea::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background-color: #f0ebdb;
  z-index: 1;

  clip-path: polygon(
    50% 0%,
    40% 10%,
    30% 20%,
    25% 30%,
    22% 40%,
    20% 50%,
    22% 60%,
    25% 70%,
    30% 80%,
    40% 90%,
    50% 100%
  );
}




.kylkipaneeli {
  position: fixed;
  top: 0;
  right: 0;                 
  width: 430px;
  height: 100vh;
  background-color:  #0d1321;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
  z-index: 803;
  pointer-events: auto;
  border-radius: 30px 0 0 30px;

  
  transform: translateX(100%);
  transition: transform 0.6s ease;
}

.kylkipaneeli.näkyy {
  transform: translateX(0);
}


@media (max-width: 900px){
  .kylkipaneeli {
    width: 100vw;
    border-radius: 0;
  }

  
  .kylki-socials {
    margin-top: 2.5rem;
  }
}


@media (max-width: 480px){
  
  .kylkipaneeli{
    --tools-h: 56px; 
    padding-top: calc(var(--tools-h) + 16px);
  }
  
  .kylkipaneeli:has(.kylki-haku),
  .kylkipaneeli:has(.hakupalkki),
  .kylkipaneeli:has(.searchbar),
  .kylkipaneeli:has([data-search-visible]){
    --tools-h: 92px;
  }

  
  .kylkipaneeli .kylki-tools{
    position: sticky;
    top: max(0px, env(safe-area-inset-top));
    height: var(--tools-h);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 16px;
    z-index: 1300; 
  }
  .kylkipaneeli .kylki-tools > *{ flex: 0 0 auto; }

  
  .kylkipaneeli .kylki-close{
    position: fixed;
    top: 20svh !important;
    right: 35px !important;
  }
}


.kylkipaneeli.näkyy {
  right: 0;
}
.kylki-valikko {
  position: absolute;
  top: 50%;
  right: 40%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.2vh;

  width: 70%; 
  align-items: flex-end; 
}

.valikko-kohta {
  font-size: 1.3rem;
  color: #748cab;
  font-weight: 500;

  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;

  width: 100%;        
  text-align: right;  
}



.kylkipaneeli .valikko-kohta:hover {
  color: #748cab !important;

}


.kylki-socials {
  position: absolute;
  bottom: 5vh;
  right: 40%;  
  display: flex;
  gap: 0.75vw;
  z-index: 900; 
}

.kylki-socials .somet-circle {
  width: 43px;
  height: 43px;
  border: 2px solid #1d2d44;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-sizing: border-box;
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.kylki-socials .somet-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(93%) sepia(9%) saturate(350%) hue-rotate(318deg) brightness(101%) contrast(90%);
  transition: filter 0.3s ease;
}


.kylki-socials .somet-circle:hover {
  background-color: #f0ebdb;
}

.kylki-socials .somet-circle:hover img {
  filter: invert(6%) sepia(17%) saturate(1282%) hue-rotate(185deg) brightness(93%) contrast(105%);
}
.kylki-socials .somet-circle img[alt="WhatsApp"]{
  width: 111%;
  height: 111%;
  transform: scale(1.11);
}

.social-icons-inline .somet-circle img[alt="WhatsApp"]{
  width: 111%;
  height: 111%;
  transform: scale(1.11);
}

.kylki-socials .somet-circle img[alt="Email"] {
  width: 105%;
  height: 105%;
  transform: scale(1.05);
}
.kylki-socials .somet-circle img[alt="TikTok"] {
  width: 97%;
  height: 97%;
  transform: scale(0.97);
}





.menu-btn {
  pointer-events: auto;

  --btn-line: 1.4em;
  --pad-v: 10px; 

  padding: var(--pad-v) 16px var(--pad-v) 24px; 
  min-height: calc(var(--btn-line) + 2 * var(--pad-v));

  position: relative;
  font-size: 1.3rem; 
  background: none;
  color: #f0ebdb;
  border: 2px solid #748cab;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.4;
  overflow: hidden;
  transition: background 0.3s, color 0.3s;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px; 
  margin-top: 1rem;
  margin-left: -2rem;
}

.btn-text-wrapper {
  display: inline-block;
  position: relative;
  height: 100%;
  overflow: hidden;
}

.btn-text.top {
  display: flex;
  flex-wrap: nowrap;
  line-height: var(--btn-line);
}

.btn-text.alt {
  display: flex;
  flex-wrap: nowrap;
  position: absolute;
  top: var(--btn-line);
  left: 0;
  line-height: var(--btn-line);
}

.menu-btn:hover .letter.top {
  transform: translateY(calc(-1 * var(--btn-line)));
}

.menu-btn:hover .letter.alt {
  transform: translateY(calc(-1 * var(--btn-line)));
}

.letter {
  display: inline-block;
  transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.btn-icon {
  height: 1.2em; 
  width: auto;
  display: inline-block;
  filter: brightness(0) saturate(100%) invert(94%) sepia(13%) saturate(172%) hue-rotate(2deg) brightness(102%) contrast(97%);
  transition: filter 0.3s, transform 0.3s;
  transform: rotate(-45deg);
}

.menu-btn:hover .btn-icon {
  transform: rotate(-45deg);
}






body.light-mode .sivupaneeli,
body.light-mode .kylkipaneeli {
  background-color: #f0ebdb; 
}

body.light-mode .sivupaneeli.korkea::before {
  background-color: #0d1321; 
}


body.light-mode .valikko-kohta {
  color: #0d1321; 
}


body.light-mode .kylkipaneeli .valikko-kohta:hover {
  color: #748cab !important;

}


body.light-mode .kylki-socials .somet-circle {
  border-color: #748cab; 
  background-color: transparent;
}

body.light-mode .kylki-socials .somet-circle img {
  filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(30%) contrast(90%);
}

body.light-mode .kylki-socials .somet-circle:hover {
  background-color: #0d1321; 
}

body.light-mode .kylki-socials .somet-circle:hover img {
  filter: invert(93%) sepia(9%) saturate(350%) hue-rotate(318deg) brightness(101%) contrast(90%);
}


body.light-mode .menu-btn {
  color: #0d1321;
  border-color: #748cab;
  background-color: transparent;
}

body.light-mode .menu-btn:hover {
  color: #748cab;
}

body.light-mode .btn-icon {
  filter: invert(30%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(30%) contrast(90%);
}




.icon-button img {

  object-fit: contain;
  filter: brightness(1.5) invert(1);
}

.logo-container {
  position: fixed;
  top: 1.5vh;
  left: 1.5vw;
  z-index: 20;
  width: 120px;  
  height: auto;
}

.logo-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}



:root{
  --lang-shift: 0px;
}


.lang-toggle-wrapper {
  position: fixed;
  top: 3.7vh;
  left: 50%;
transform: translate(-50%, var(--lang-shift));
transition: transform .25s ease-out;
  display: flex;
  gap: 10px;
  z-index: 900;
  pointer-events: auto;
}


.kylkipaneeli .lang-toggle-wrapper{ display: none; }

@media (max-width: 480px){
  
  .ylapalkki .lang-toggle-wrapper{ display: none !important; }
  .kylkipaneeli .lang-toggle-wrapper{
    display: flex !important;
    position: absolute;
    top: 20svh !important;
    left: 50%;
    transform: translate(-50%, var(--lang-shift));
    gap: 12px;
    z-index: 1301;
  }
  .kylkipaneeli .lang-toggle-circle{
    opacity: 1 !important;
    transform: none !important;
  }
@media (max-width: 480px){
  .kylkipaneeli .kylki-valikko{
    position: absolute;
    top: 10.5rem; 
    left: 50%;
    transform: translate(-50%, var(--kylki-valikko-shift));
    transition: transform 0.25s ease-out;
    width: 88%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2vh;
  }
}
}


.lang-toggle-circle {
  position: relative;
  width: 40px;
  height: 40px;
  background-color: #3e5c765f;
  border-radius: 50%;
  display: flex; 
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
  opacity: 0;
  transform: translateY(30px);
  transition: filter 0.18s ease-in-out, transform 0.15s ease-out, opacity 0.5s ease;
  will-change: transform;
}


.lang-toggle-circle.animate-in {
  opacity: 1;
  transform: translateY(0);
}


.lang-text {
  position: absolute;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  user-select: none;
  transition: opacity 0.3s ease;
  pointer-events: none;
}


.lang-text.fi {
  opacity: 0;
}


.lang-toggle-circle:hover .lang-text {
  color: #0d1321;
}


.lang-toggle-circle.fi-active .lang-text.en {
  opacity: 0;
}
.lang-toggle-circle.fi-active .lang-text.fi {
  opacity: 1;
}

.lang-text.fi {
  opacity: 0;
}

.lang-toggle-circle.fi-active .lang-text.en {
  opacity: 0;
}

.lang-toggle-circle.fi-active .lang-text.fi {
  opacity: 1;
}


.icon-button img,
.search-icon img {
  object-fit: contain;
  transition: filter 0.18s ease-in-out;
}

.icon-button img {
  width: 50%; 
  height: 50%;
  filter: brightness(1.5) invert(1);
}

.search-icon img {
  width: 50%;
  height: 50%;
  filter: brightness(1.5) invert(1);
}

.icon-button:hover img,
.search-icon:hover img {
  filter: invert(11%) sepia(19%) saturate(6961%)
          hue-rotate(198deg) brightness(96%) contrast(101%);
}


.lang-toggle-circle.input-active img {
  filter: brightness(1.5) invert(1);
}


.search-wrapper {
  position: relative;
  display: inline-block;
}

.lang-toggle-circle .search-input {
  position: absolute;
  top: 0;
  left: 40px;
  width: 0;
  height: 40px;
  opacity: 0;
  border: none;
  outline: none;
  background-color: #3e5c765f;
  color: white;
  font-size: 14px;
  padding-left: 15px;
  border-radius: 20px;
  transition: width 0.3s ease, opacity 0.3s ease;
  user-select: text;
  pointer-events: none;
  z-index: 5;
}


.lang-toggle-circle.expanded .search-input {
  width: 160px;
  opacity: 1;
  pointer-events: auto;
}


.search-suggestions {
  position: absolute;
  top: 45px;          
  left: 40px;
  width: 160px;
  max-height: 200px;
  overflow-y: auto;
  background: #0d1321;
  color: #f0ebdb;
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 5px 0;
  display: none;      
  z-index: 10;
}

.search-suggestions li {
  padding: 8px 12px;
  cursor: pointer;
}

.search-suggestions li:hover {
  background: #748cab;
}


.search-suggestions mark,
.mobile-search-suggestions mark {
  background-color: rgba(116, 140, 171, 0.28); 
  color: inherit;                               
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 700;
}


body.light-mode .search-suggestions mark,
body.light-mode .mobile-search-suggestions mark {
  background-color: rgba(116, 140, 171, 0.20);
}




body.no-scroll{ overflow:hidden; }


@media (max-width: 480px){
  
  .lang-toggle-circle.search-icon.mobile-open{
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100vw; height: auto;
    border-radius: 0;
    z-index: 1400;
    background: #0d1321; 
    display: block;
    padding: 10px 12px;
  }
  .lang-toggle-circle.search-icon.mobile-open img{ display:none; }

  
  .lang-toggle-circle.search-icon.mobile-open .search-input{
    position: relative;
    left: 0; top: 0;
    width: 100% !important;
    height: 48px;
    opacity: 1; pointer-events: auto;
    border-radius: 12px;
    border: 1px solid #748cab;
    background: #3e5c765f;
    color: #f0ebdb;
  }

  
  .lang-toggle-circle.search-icon.mobile-open .search-suggestions{
    position: fixed;
    top: 58px; left: 0; right: 0;
    width: 100vw;
    max-height: 60vh;
    background: #0d1321;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: none; 
    z-index: 1399;
  }
  .lang-toggle-circle.search-icon.mobile-open .search-suggestions li{
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  
  body.light-mode .lang-toggle-circle.search-icon.mobile-open{ background:#f0ebdb; }
  body.light-mode .lang-toggle-circle.search-icon.mobile-open .search-input{
    background:#f0ebdb; color:#0d1321; border-color:#748cab;
  }
  body.light-mode .lang-toggle-circle.search-icon.mobile-open .search-suggestions{
    background:#f0ebdb; color:#0d1321; border-top-color: rgba(0,0,0,0.06);
  }
}


body.light-mode .icon-button img,
body.light-mode .search-icon img {
  filter: brightness(1) invert(0);
}


body.light-mode .logo-container img {
  filter: none;
}


body.light-mode .lang-toggle-circle {
  background-color: #f0ebdb; 
}

body.light-mode .lang-toggle-circle:hover .lang-text {
  color: #3e5c76; 
}


body.light-mode .lang-text {
  color: #0d1321; 
}


body.light-mode #lang-toggle:checked + .lang-toggle-circle .lang-text.en {
  opacity: 1;
}
body.light-mode #lang-toggle:checked + .lang-toggle-circle .lang-text.fi {
  opacity: 0;
}


body.light-mode .lang-toggle-circle .search-input {
  background-color: #f0ebdb;
  color: #0d1321;
  border: 1px solid #748cab;
}


body.light-mode .icon-button:hover img,
body.light-mode .search-icon:hover img {
  filter: invert(30%) sepia(10%) saturate(200%) hue-rotate(180deg) brightness(90%) contrast(95%);
}


body.light-mode .lang-toggle-circle.input-active img {
  filter: brightness(1) invert(0);
}


body.light-mode .lang-toggle-circle.expanded .search-input {
  background-color: #f0ebdb;
  color: #0d1321;
  border-color: #748cab;
}



@media (max-width: 900px){
  
  .sivupaneeli{ display:none !important; }

  
  .kylkipaneeli{
    right: -100vw;              
    width: 100vw;               
    height: 100svh;             
    top: 0;
    border-radius: 0;           
    z-index: 1200;              
    overflow-y: auto;           
    background-color: #0d1321;  
  }

  
  .kylkipaneeli.näkyy{ right: 0; }

  
  .kylki-valikko{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;                 
    right: auto;                
    display: flex;
    flex-direction: column;
    align-items: center;        
    gap: 1.2rem;
  }

  
  .kylki-valikko .valikko-kohta{
    width: 100%;
    text-align: center;
    font-size: clamp(1.2rem, 4.3vw, 1.6rem);
    padding: 0.4rem 0;          
    border-bottom: 1px solid rgba(240,235,219,0.08);
  }
  .kylki-valikko .valikko-kohta:last-child{ border-bottom: none; }

  
  .kylki-valikko .overlay-btn.sivujutska{
    width: 100%;
    display: block;
    margin-top: 0.6rem;
    text-align: center;
  }
  .kylki-valikko .overlay-btn .overlay-btn-text-wrapper{
    display: block;
  }

  
  .kylki-socials{
    position: fixed;
    left: 50%;

    bottom: 5vh !important;
    gap: 3.5vw;
    z-index: 1201; 
  }
.kylki-socials .somet-circle[href^="mailto"] {
  display: none !important;
}

  @media (max-height: 650px){
    .kylki-socials .somet-circle[href^="mailto"] {
  display: none !important;
}
  }

  .kylkipaneeli .kylki-close{
    position: absolute;
    top: 1rem;
    opacity: 1;
    right: 1rem;
    font-size: 2.5rem !important;
    line-height: 1;
    background: none;
    border: none;
    color: #f0ebdb;
    cursor: pointer;
    z-index: 1300;
  }
  body.light-mode .kylkipaneeli .kylki-close{
    color: #0d1321;
  }
}

.kylki-close{
    
    opacity: 0;
    
  }


@media (max-width: 900px){
  .kylkipaneeli{
    position: fixed;
    inset: 0;                  
    width: 100vw;
    height: 100svh;            
    background-color: #0d1321; 
    border-radius: 0;
    z-index: 1200;             
    overflow-y: auto;
    display: none;             
    right: auto;               
    top: auto;
    box-shadow: none;          
    transition: none;          
  }

  
  .kylkipaneeli.näkyy{ display: block; }

  
  .kylki-valikko{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }
}


@media (max-width: 480px){
  
  .kylkipaneeli .lang-toggle-wrapper{
    top: 2.2rem; 
  }
@media (max-width: 480px){
  .kylkipaneeli .kylki-valikko{
    position: absolute;
    top: 10.5rem;
    left: 50%;
    transform: translate(-50%, var(--kylki-valikko-shift));
    transition: transform 0.25s ease-out;
    width: 88%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2vh;
  }
}
  .kylki-valikko .valikko-kohta{
    font-size: clamp(1rem, 4.2vw, 1.3rem);
    padding: 0.45rem 0;
  }
  .kylkipaneeli .overlay-btn.sivujutska{
    position: static;
    margin-top: 0.4rem;
  }
  .kylkipaneeli .kylki-socials{
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    gap: 3.5vw !important;
    z-index: 1400 !important;
  }
}




@media (max-width: 480px){
  
  .menu-label{ display:none !important; }
  
  .hero-lines .line-unit:nth-child(n+4){ display:none !important; }
}


@media (max-width: 480px){
  .hero-lines{
    height: auto;                 
    gap: px;                     
    justify-content: flex-start;  
    right: 7.5vw;
    top: 4.5svh;
  }
  .hero-lines .line-unit{
    width: 40px;                  
    height: 4px;                  
    margin: 2px 0;                
  }
}


.lang-toggle-circle.icon-button { cursor: pointer; }


.lang-toggle-circle.icon-button .icon-sun,
.lang-toggle-circle.icon-button .icon-search {
  color: #dcd5c5; 
  transition: color .15s ease, transform .15s ease;
}


body.light-mode .lang-toggle-circle.icon-button .icon-sun,
body.light-mode .lang-toggle-circle.icon-button .icon-search {
  color: #0d1321; 
}


.lang-toggle-circle.icon-button:hover .icon-sun,
.lang-toggle-circle.icon-button:hover .icon-search {
  color: #000000;
}

.icon-search{
  color: #f0ebdb;
  transform: translate(-1px, -1px);
  transition: color .15s ease, transform .15s ease;
}
body.light-mode .icon-search{ color:#0d1321; }
.icon-search:hover{ color:#000; }


.icon-sun{
  color: #f0ebdb;
  transition: color .15s ease, transform .15s ease;
}
body.light-mode .icon-sun{ color:#0d1321; }
.icon-sun:hover{ color:#000; }
.lang-toggle-circle .lang-text {
  color: #f0ebdb;
}

body.light-mode .lang-toggle-circle .lang-text {
  color: #0d1321;
}

@media (max-width: 900px){

#main-lang-toggle,
#main-lang-toggle .lang-text{
  -webkit-tap-highlight-color: transparent; 
  color: inherit;                            
}

@media (hover: none){
  #main-lang-toggle:hover{ color: inherit !important; }
}

#main-lang-toggle:active,
#main-lang-toggle:focus{
  color: inherit !important;
  opacity: 1 !important; 
}
}





@media (max-width: 900px) {

  
  .menu-label {
    display: none;
  }

  
  
  .hero-lines.keskella ~ .hero-x {
    top: 4.2svh;
    right: 6vw;
  }

  
  body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  
  .kylkipaneeli {
    right: -100%;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: radial-gradient(circle at top left, #111827 0, #020617 40%, #000 100%);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: calc(env(safe-area-inset-top) + 64px) 6vw 24px 10vw;
  }

  .kylkipaneeli.näkyy {
    right: 0;
  }

  
  .kylki-valikko {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.25rem;
  }

  .kylki-valikko a,
  .kylki-valikko .overlay-btn {
    display: block;
    width: 100%;
    padding: 0.55rem 0;
    font-size: 1.15rem;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(240, 235, 219, 0.12);
  }

  .kylki-valikko a:last-of-type,
  .kylki-valikko .overlay-btn:last-of-type {
    border-bottom: none;
  }

  .kylki-valikko a[data-i18n="menuHome"] {
    opacity: 0.85;
  }

  .kylki-valikko .overlay-btn.sivujutska {
    margin-top: 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(240, 235, 219, 0.35);
    text-align: center;
    padding: 0.65rem 0.4rem;
  }

  
  .kylki-socials {
    margin-top: auto;
    bottom: 30vh;
    padding-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
  }

  .kylki-socials .somet-circle {
    width: 42px;
    height: 42px;
  }

  
  .kylkipaneeli .kylki-close {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 10px);
    right: 4.5vw;
    font-size: 2rem;
    background: none;
    border: none;
    color: #f0ebdb;
    cursor: pointer;
    z-index: 5;
  }

  body.light-mode .kylkipaneeli {
    background: radial-gradient(circle at top left, #f3ead9 0, #f0ebdb 40%, #e6ddcf 100%);
  }

  body.light-mode .kylkipaneeli .kylki-close {
    color: #111827;
  }

  body.light-mode .kylki-valikko a,
  body.light-mode .kylki-valikko .overlay-btn {
    border-bottom-color: rgba(13, 19, 33, 0.12);
  }
}


@media (max-width: 480px) {
  .kylki-valikko a,
  .kylki-valikko .overlay-btn {
    font-size: 1.18rem;
  }
}


.kylkipaneeli {
  
}


@media (max-width: 900px){
  .kylkipaneeli{
    padding-top: 8rem; 
  }
}

body.mobile-menu-open {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}
:root{
  --lang-shift: 0px;
  --kylki-valikko-shift: 0px;
}

@media (max-width: 900px){
  .kylki-close{
    transform: translateY(var(--kylki-close-shift));
    transition: transform .25s ease; 
  }
}


.kylki-valikko {
  transform: translateY(var(--kylki-valikko-shift,0px));
  transition: transform 0.25s ease;
}



@media (min-width: 901px){
  .kylki-valikko {
    position: relative;
    right: 50px;
    top: 170px;       
  }
}