:root {
  --bg-color: #252a31;
  --highlight: #cbb102;
  --text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { 
  background-color: var(--bg-color); 
  color: #fff; 
  font-family: 'Inter', sans-serif; 
  scroll-snap-type: y mandatory;
  scrollbar-width: none; /* Firefox: piilota scrollpalkki */
  -ms-overflow-style: none; /* IE/Edge: piilota scrollpalkki */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge: piilota scrollpalkki */
  width: 0;
  height: 0;
}

body { 
  margin: 0; 
  overflow-x: hidden; 
}

.bebas { 
  font-family: 'Bebas Neue', sans-serif; 
  letter-spacing: 1.5px; 
  text-shadow: var(--text-shadow); 
  font-weight: 400; 
}
.highlight { color: var(--highlight); }

/* Kelluva logo: asemoidaan tarkasti etusivun paikkamerkin kohdalle ja liukuu yläkulmaan skrollatessa */
.floating-logo {
  position: fixed;
  top: max(24px, calc(50vh - 265px));
  left: 25%;
  transform: translateX(-50%);
  z-index: 100;
  width: 280px;
  transition: top 0.75s cubic-bezier(0.25, 1, 0.5, 1),
              left 0.75s cubic-bezier(0.25, 1, 0.5, 1),
              width 0.75s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.75s cubic-bezier(0.25, 1, 0.5, 1);
}
.floating-logo img { width: 100%; height: auto; display: block; }

/* Logolle annettava luokka kun rullataan alaspäin */
.floating-logo.scrolled {
  top: 30px !important;
  left: 40px !important;
  width: 80px !important;
  transform: translateX(0) !important;
}

/* Etusivu */
#etusivu { 
  height: 100vh; 
  width: 100%;
  display: flex; 
  position: relative; 
  z-index: 10; 
  scroll-snap-align: start; 
  scroll-snap-stop: always;
  overflow: hidden;
}

/* Hederkuva 100% sivun leveydestä */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://joonaspuhakka.fi/img/header.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Vasemman puoliskon sisältö keskitettynä */
.left-content { 
  width: 50%;
  height: 100%;
  padding: 0 5%; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2; 
}

/* Varattu tila logolle suoraan pääotsikon yläpuolella */
.logo-placeholder { 
  width: 280px;
  aspect-ratio: 2.35 / 1;
  margin-bottom: 14px; 
  flex-shrink: 0;
}

.left-content h1 { 
  font-size: clamp(3.2rem, 4.4vw, 5.1rem); 
  margin-bottom: 0.15rem; 
  line-height: 1.02; 
}
.left-content .subtitle { 
  color: var(--highlight);
  font-size: clamp(1.6rem, 2.2vw, 2.5rem); 
  margin-bottom: 1.6rem; 
  line-height: 1.1;
}
.description { 
  font-size: 1.05rem; 
  line-height: 1.5; 
  margin-bottom: 2rem; 
  max-width: 470px; 
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2); 
  font-weight: 300; 
}

.contact { 
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: 18px; 
  margin-bottom: 2.4rem; 
}
.contact .email-text { 
  color: #fff; 
  font-weight: 300; 
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22); 
}
.social-icons { display: flex; gap: 12px; }
.social-icons .icon {
  display: inline-block; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: var(--bg-color); text-align: center;
  line-height: 28px; font-weight: bold; text-decoration: none; font-size: 0.85rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.social-icons .icon:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Suunnitelman mukainen Portfolio-nappi (tumma pyöristetty suorakulmio) */
.portfolio-link { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 215px;
  padding: 15px 44px; 
  background: rgba(18, 21, 26, 0.65); 
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px; 
  color: #fff; 
  text-decoration: none; 
  width: fit-content; 
  margin: 0 auto;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease; 
}
.portfolio-link:hover { 
  background: rgba(18, 21, 26, 0.85); 
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

/* PORTFOLIO LAYOUT */
.portfolio-container { display: flex; width: 100%; position: relative; z-index: 1; }
.portfolio-left { width: 40%; position: relative; }
.info-wrapper { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding: 0 10%; }

/* Pelkkä pehmeä fade sisään/ulos ilman nykäisyliikettä */
.info-content { 
  position: absolute; 
  left: 10%; 
  right: 10%; 
  opacity: 0; 
  transition: opacity 0.45s ease; 
  pointer-events: none; 
}
.info-content.active { 
  opacity: 1; 
  pointer-events: auto; 
  z-index: 10; 
}
.info-content h2 { font-size: 3.5rem; line-height: 1; margin-bottom: 0.2rem; }
.info-content h3 { font-size: 2rem; margin-bottom: 1rem; }

.portfolio-right { width: 60%; display: flex; flex-direction: column; }
.video-section { 
  height: 100vh; 
  width: 100%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 0 5%; 
  scroll-snap-align: start; 
  scroll-snap-stop: always;
}
.mobile-info { display: none; }
.video-container { width: 100%; max-width: 900px; margin: 0 auto; }
.video-container.standard-ratio { aspect-ratio: 16 / 9; }

.ambilight-wrapper { position: relative; width: 100%; height: 100%; }
.ambilight-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; filter: blur(40px); transform: scale(1.05); opacity: 0.6; pointer-events: none; z-index: 1; border: none; }
.main-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); border: none; background: #000; }
.fb-wrapper { background: #000; border-radius: 12px; }

/* IG Reels: täysi desktop-leveys (max 900px) ja skaalautuva rajaus */
.ig-row { 
  display: flex; 
  gap: 16px; 
  width: 100%; 
  max-width: 900px; 
  justify-content: center; 
  margin: 0 auto; 
}
.ig-col {
  flex: 1 1 0;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden; 
  border-radius: 8px; 
  background: #000;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  --ig-scale: 1.286;
}
.ig-col iframe {
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 326px; 
  height: 700px; 
  border: 0;
  transform: scale(var(--ig-scale)) translate(-50.5px, -54px); 
  transform-origin: top left;
}

@media (max-width: 1000px) {
  #etusivu { flex-direction: column; }
  .hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(37, 42, 49, 0.8);
  }
  .left-content {
    width: 100%;
    padding: 0 8%;
  }
  .floating-logo { 
    top: 8%; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 190px; 
  }
  .floating-logo.scrolled { 
    top: 20px !important; 
    left: 20px !important; 
    width: 60px !important; 
    transform: translateX(0) !important; 
  }
  .logo-placeholder {
    width: 190px;
  }
  .portfolio-container { flex-direction: column; }
  .portfolio-left { display: none; }
  .portfolio-right { width: 100%; }
  
  .video-section { flex-direction: column; height: auto; min-height: 100vh; padding: 0; padding-top: 15%; justify-content: center; }
  .mobile-info { display: block; width: 100%; margin-bottom: 20px; padding: 0 5%; }
  .mobile-info h2 { font-size: 2.5rem; line-height: 1; margin-bottom: 0.2rem; }
  .mobile-info h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
  .mobile-info p { font-size: 1rem; }
  
  /* Videoiden keskitys mobiilissa */
  .video-container { width: 100%; margin: 0 auto; display: flex; justify-content: center; padding: 0 5%; }
  .ambilight-wrapper { width: 100%; }
  
  /* IG Reels mobiili */
  .ig-row { flex-direction: column; align-items: center; width: 100%; max-width: 260px; }
  .ig-col { flex: 0 0 auto; width: 100%; aspect-ratio: 9 / 16; }
}
