* { box-sizing: border-box; }
:root { --bg: #ffffff; --fg: #111111; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 15px;
  line-height: 1.45;
}

h1, h2, p, figure, dl, dd { margin: 0; }
img { display: block; width: 100%; height: auto; background: #eee; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Pienet versaalitekstit, kuten vaatekaupan tuotekorteissa */
.nav, .look figcaption, .window-note, .contact dt, .foot-row, .arrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Logotyyppi: leveä ja raskas. assets/main.js laskee fonttikoon niin, että sana
   täyttää tasan koko leveyden. CSS:n vw-koko on varakoko ennen sitä. */
.wordmark {
  display: block;
  font-family: "Archivo", sans-serif;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: 13vw;
  line-height: 0.8;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  margin: 0;
}

/* ---------- Sisältöosiot liukuvat kuvien päälle ---------- */

/* Jokaisella osiolla on oma värinsä (data-bg / data-fg). Kun osio tulee ruudun
   keskelle, assets/main.js vaihtaa --bg ja --fg, ja koko sivu liukuu siihen väriin. */
.c {
  position: relative;
  z-index: 1;
  background: var(--bg);
  color: var(--fg);
  transition: background-color 1.1s ease, color 1.1s ease;
}

/* Filmirae koko sivun päällä */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 50;
  pointer-events: none;
  opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Julistetypografia: jokainen rivi täyttää koko leveyden (assets/main.js sovittaa koon) */
.poster { margin: 0; font-weight: inherit; }
.poster .lines { display: block; }
.poster .lines span {
  display: block;
  white-space: nowrap;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  font-weight: 800;
  line-height: .84;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

/* ---------- Ikkunat: kuva pysyy paikallaan, osiot liukuvat ohi ---------- */

.window {
  position: relative;
  z-index: 0;
  height: 300vh;
  height: 300svh;
  margin: -100vh 0;
  margin: -100svh 0;
}
.window-first { height: 200vh; height: 200svh; margin-top: 0; }
.window-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #111;
}
.window .lead-media { position: absolute; inset: 0; }
.window img { height: 100%; object-fit: cover; }
.window-first img { object-position: 50% 62%; }
.window img[data-pos="0.6"] { object-position: 50% 60%; }
.window img[src*="kuljetus"] { object-position: 50% 62%; }

.window-note {
  position: absolute;
  z-index: 2;
  left: 20px; right: 20px; bottom: 20px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,.3);
}

/* Vesiefektin canvas (assets/main.js) */
.lead-media canvas.water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .6s ease;
}
.lead-media canvas.water.ready { opacity: 1; }

/* ---------- Ylänavigaatio ja kansi ---------- */

.nav {
  position: absolute;
  z-index: 3;
  top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 20px;
  color: #fff;
  text-shadow: 0 0 12px rgba(0,0,0,.25);
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav nav { justify-self: end; display: flex; gap: 22px; }

.hero-bottom {
  position: absolute;
  z-index: 2;
  left: 16px; right: 16px; bottom: 16px;
  color: #fff;
}
.hero-note {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(0,0,0,.3);
}
.hero-bottom .wordmark { text-shadow: 0 0 30px rgba(0,0,0,.12); }

/* ---------- Esittely ---------- */

.intro {
  padding: 150px 20px 160px;
  text-align: center;
}
.intro .small { max-width: 30em; margin: 40px auto 0; }

/* ---------- Kuvat ---------- */

.looks {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  padding: 40px 20px 200px;
}
.look figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.frame { overflow: hidden; background: #ddd; }
.frame img {
  height: 100%;
  object-fit: cover;
  background: none;
  will-change: translate, scale;
}

.l1 { grid-column: 1 / 6; }
.l1 .frame { aspect-ratio: 4 / 5; }
.l2 { grid-column: 7 / 13; align-self: end; }
.l2 .frame { aspect-ratio: 3 / 2; }

.l4 { grid-column: 2 / 6; padding-top: 160px; }
.l4 .frame { aspect-ratio: 3 / 4; }
.l5 { grid-column: 7 / 12; }
.l5 .frame { aspect-ratio: 3 / 4; }
.l5 img { object-position: 50% 30%; }

/* ---------- Istutuskala ---------- */

.order {
  padding: 200px 20px;
  text-align: center;
  overflow: hidden;
}
.order > :not(.fish) { position: relative; z-index: 1; }
.order h2 {
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(44px, 8vw, 120px);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.order p { max-width: 520px; margin: 0 auto; font-size: 17px; opacity: .8; }
.arrow { display: inline-block; margin-top: 32px; text-decoration: none; border-bottom: 1px solid; padding-bottom: 2px; }
.fish { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Yhteystiedot ---------- */

.contact {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  padding: 160px 20px 120px;
  align-items: start;
}
.contact h2 { grid-column: 1 / 13; margin-bottom: 40px; }
.contact dl {
  grid-column: 1 / 5;
  display: grid;
  grid-template-columns: 7em 1fr;
  row-gap: 18px;
}
.contact dt { padding-top: 3px; }
.map {
  grid-column: 6 / 13;
  width: 100%;
  height: 420px;
  border: 0;
  filter: grayscale(1) contrast(1.05);
  background: #eee;
}

/* ---------- Alatunniste ---------- */

.foot { padding: 0 20px 14px; overflow: hidden; }
.foot-row { display: flex; justify-content: space-between; padding: 14px 0 40px; border-top: 1px solid; }
.foot .wordmark { padding-bottom: 0.04em; }

/* ---------- Liike (assets/main.js lisää luokat) ---------- */

/* Kuva pyyhkäistään esiin alhaalta ja se loksahtaa paikalleen */
.js .look .frame {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1);
}
.js .look .frame img { scale: 1.35; transition: scale 1.8s cubic-bezier(.2, .7, .2, 1); }
.js .look.in .frame { clip-path: inset(0 0 0 0); }
.js .look.in .frame img { scale: 1.1; }
.js .look figcaption { opacity: 0; transition: opacity .8s ease .6s; }
.js .look.in figcaption { opacity: 1; }

.js .poster.reveal { opacity: 1; translate: none; }
.js .poster .lines span { clip-path: inset(0 0 100% 0); translate: 0 30%; transition: clip-path 1s cubic-bezier(.7,0,.2,1), translate 1s cubic-bezier(.7,0,.2,1); }
.js .poster.in .lines span { clip-path: inset(-10% 0 -10% 0); translate: 0 0; }
.js .poster .lines span:nth-child(2) { transition-delay: .08s; }
.js .poster .lines span:nth-child(3) { transition-delay: .16s; }
.js .poster .lines span:nth-child(4) { transition-delay: .24s; }
.js .poster .lines span:nth-child(5) { transition-delay: .32s; }
.js .reveal { opacity: 0; translate: 0 30px; transition: opacity 1s ease, translate 1.2s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .c { transition: none; }
}

/* ---------- Puhelin ---------- */

@media (max-width: 800px) {
  .nav { display: none; }
  .hero-bottom { left: 12px; right: 12px; bottom: 12px; }
  .window-note { left: 12px; right: 12px; bottom: 14px; }

  /* Puhelimessa ei paikallaan pysyviä ikkunoita: osoitepalkin liike tekisi niistä nykiviä.
     Kuvat ovat tavallisia täysleveitä kuvia, jotka liikkuvat kehyksessään (parallaksi). */
  .window, .window-first { height: auto; margin: 0; }
  .window-bg { position: relative; height: auto; aspect-ratio: 4 / 5; }
  .window-first .window-bg { aspect-ratio: auto; height: 100vh; height: 100svh; min-height: 520px; }
  .window .lead-media { scale: 1.14; will-change: translate; }

  .intro { padding: 56px 12px 88px; text-align: left; }
  .intro .small { margin: 32px 0 0; font-size: 16px; }

  /* Puhelimessa kuvat reunasta reunaan, pienellä raolla toisistaan */
  .looks { display: block; padding: 64px 0; }
  .look { margin-bottom: 6px; }
  .look:last-child { margin-bottom: 0; }
  .l1 .frame, .l2 .frame, .l4 .frame, .l5 .frame { aspect-ratio: 4 / 5; }
  .l4 { padding-top: 0; }

  .order { padding: 140px 16px; }
  .order h2 { font-size: 9.6vw; }

  .contact { display: block; padding: 104px 12px 72px; }
  .contact h2 { margin-bottom: 32px; }
  .map { height: 320px; margin-top: 36px; }
  .foot { padding: 0 12px 10px; }
}
