/* ==========================================================================
   Törmälä Kiinteistöt Oy – Karjalan päivänvalo
   ========================================================================== */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Palette */
  --paper: #ffffff;
  --birch: #f3f5f2;
  --lichen: #e2eadd;
  --lake: #c3dcea;
  --lake-soft: #e6f0f6;
  --river: #12324a;
  --river-hover: #1f4d6c;
  --river-deep: #0d2638;

  --ink: var(--river);
  --ink-2: #3c5466;
  --line: rgb(18 50 74 / 0.16);
  --line-strong: rgb(18 50 74 / 0.32);

  /* On river */
  --on-river: #ffffff;
  --on-river-2: #b9cddb;
  --on-river-line: rgb(195 220 234 / 0.22);

  /* Type */
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-lede: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  --fs-h1: clamp(2.75rem, 1.1rem + 5.4vw, 6rem);
  --fs-h2: clamp(2.125rem, 1.35rem + 2.6vw, 3.75rem);
  --fs-h3: clamp(1.5rem, 1.2rem + 0.9vw, 2.125rem);

  /* Space */
  --gutter: clamp(16px, 3.6vw, 56px);
  --section: clamp(5rem, 3rem + 7vw, 10rem);
  --radius-control: 999px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: light;
}

/* Base ------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-color: var(--river) var(--birch);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--river);
  accent-color: var(--river);
}

::selection { background: var(--lake); color: var(--river-deep); }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 2px solid var(--river);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.125em;
  height: 1.125em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: 1.5rem; height: 1.5rem; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--river);
  color: var(--on-river);
  border-radius: var(--radius-control);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.btn .icon { transition: transform 0.35s var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }

.btn--solid { background: var(--river); color: var(--on-river); }
.btn--solid:hover { background: var(--river-hover); }

.btn--outline { border-color: var(--line-strong); color: var(--river); background: transparent; }
.btn--outline:hover { border-color: var(--river); background: rgb(18 50 74 / 0.05); }

.btn--wide { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: currentColor; }

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid on purpose: a backdrop-filter here would trap the fixed mobile menu inside the header box */
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  justify-self: start;
  font-size: 1.3125rem;
  line-height: 1;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}
.brand__name { font-weight: 800; }
.brand__sub { font-weight: 450; }

.site-nav__list { display: flex; gap: clamp(1.25rem, 2.4vw, 2.5rem); }
.site-nav a,
.header-phone {
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-block: 0.3rem;
  transition: background-size 0.35s var(--ease-out);
}
.site-nav a:hover,
.header-phone:hover { background-size: 100% 1px; }

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}
.header-phone { display: inline-flex; align-items: center; gap: 0.45rem; }
.header-phone .icon { width: 1rem; height: 1rem; }

.header-call {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--river);
  color: var(--on-river);
}
.header-call .icon { width: 1.1rem; height: 1.1rem; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--river);
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--paper);
  overflow-y: auto;
}
.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 100%;
  padding-block: 1.5rem 2rem;
}
.mobile-menu__list li { border-bottom: 1px solid var(--line); }
.mobile-menu__list a {
  display: block;
  padding-block: 1rem;
  font-size: var(--fs-h2);
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.mobile-menu__contact { display: grid; gap: 0.75rem; }

@media (max-width: 1080px) {
  .header-phone { display: none; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-nav,
  .site-header__actions > .btn { display: none; }
  .menu-toggle,
  .header-call { display: inline-flex; }
  .site-header__actions { gap: 0.5rem; }
  .brand { font-size: 1.1875rem; }
}

/* Hero ------------------------------------------------------------------- */

.hero { padding-top: clamp(2.5rem, 1rem + 4vw, 5rem); }

.hero__text {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
  gap: 2rem clamp(2rem, 5vw, 6rem);
  padding-bottom: clamp(2rem, 1rem + 3vw, 4rem);
}

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero__title .line > span { display: block; }

.hero__aside { max-width: 30rem; padding-bottom: 0.4rem; }
.hero__lede {
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.hero__media {
  position: relative;
  overflow: hidden;
  height: clamp(340px, 58vh, 700px);
  background: var(--lake);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

@media (max-width: 860px) {
  .hero__text { grid-template-columns: 1fr; }
  .hero__media { height: clamp(300px, 62vw, 460px); }
}

/* Company tiles ---------------------------------------------------------- */

.company { padding-top: var(--section); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tile { position: relative; min-height: clamp(420px, 38vw, 600px); }

.tile--media { overflow: hidden; background: var(--birch); }
.tile--media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile--text { display: flex; align-items: center; }
.tile--lichen { background: var(--lichen); }
.tile--lake { background: var(--lake); }

.tile__body {
  max-width: 42rem;
  padding: clamp(2.25rem, 1rem + 5vw, 6rem);
}
.tile__title {
  font-size: clamp(2rem, 1.2rem + 2vw, 3.25rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.tile__body p {
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}

.tile--lake .tile__body p { color: #25455c; }
.tile__body .btn { margin-top: 2rem; }

@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .tile--media { min-height: 0; aspect-ratio: 4 / 3; }
  .tile--text { min-height: 0; }
  .tile--swap { order: 4; }
}

/* Section heads ---------------------------------------------------------- */

.section-title {
  font-size: var(--fs-h2);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.section-lede {
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 38ch;
  text-wrap: pretty;
}

/* Properties ------------------------------------------------------------- */

.properties { padding-block: var(--section); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.25rem clamp(2rem, 5vw, 6rem);
  padding-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.properties__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}

.stage { position: sticky; top: calc(var(--header-h) + 24px); }
.stage__frame {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--birch);
}
.stage__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.6s var(--ease-out), transform 1.1s var(--ease-out);
}
.stage__img.is-active { opacity: 1; transform: none; z-index: 1; }
.stage__img--bottom { object-position: 50% 100%; }
.stage__img--right { object-position: 85% 50%; }
.stage__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-top: 1.1rem;
}
.stage__name {
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.875rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.stage__note { font-size: 0.8125rem; color: var(--ink-2); }

/* Leasing prompt closing the properties section */
.prompt {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.75rem clamp(2rem, 5vw, 6rem);
  margin-top: clamp(3.5rem, 2rem + 4vw, 6rem);
  padding: clamp(2.25rem, 1rem + 4vw, 4.5rem);
  background: var(--lichen);
}
.prompt__title {
  font-size: clamp(2rem, 1.2rem + 2vw, 3.25rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.prompt__text p {
  margin-top: 1rem;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.prompt .btn { justify-self: start; }

.property-list { border-top: 1px solid var(--line-strong); }
.property { border-bottom: 1px solid var(--line-strong); }

.property__heading { font: inherit; }
.property__head {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  width: 100%;
  padding: 1.5rem 0.25rem 1.5rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.property__name {
  grid-column: 1;
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.875rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
  transition: color 0.2s;
}
.property__address {
  grid-column: 1;
  margin-top: 0.3rem;
  font-size: var(--fs-small);
  color: var(--ink-2);
}
.property__toggle {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.property__toggle .icon { transition: transform 0.45s var(--ease-out); }
.property__head:hover .property__toggle { border-color: var(--river); }
.property.is-open .property__toggle { background: var(--river); border-color: var(--river); color: var(--on-river); }
.property.is-open .property__toggle .icon { transform: rotate(45deg); }

.property__body { display: grid; grid-template-rows: 1fr; }
.property__body[hidden] { display: none; }
.property__inner { padding: 0 0 1.75rem; }

.property__img { display: none; }

.facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
}
.facts dt { color: var(--ink-2); }
.facts dd { font-weight: 550; }
.property__inner .text-link { margin-top: 1.25rem; font-size: var(--fs-small); }

@media (max-width: 860px) {
  .section-head,
  .properties__grid { grid-template-columns: 1fr; }
  .stage { display: none; }
  .property__img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 1.25rem;
  }
  .facts > div { grid-template-columns: 8rem 1fr; }
  .prompt { grid-template-columns: 1fr; }
  .section-lede { text-wrap: wrap; }
}

/* Contact ---------------------------------------------------------------- */

.contact {
  background: var(--lake);
  padding-block: var(--section);
}
.contact .section-lede { color: #25455c; }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3.5rem clamp(2rem, 5vw, 6rem);
  align-items: start;
}
.contact__main .section-lede { margin-top: 1.25rem; }

.contact__direct {
  display: grid;
  justify-items: start;
  gap: 1rem;
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.contact__phone,
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.45s var(--ease-out);
}
.contact__phone:hover,
.contact__email:hover { background-size: 100% 2px; }
.contact__phone {
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.contact__phone .icon { width: 0.7em; height: 0.7em; stroke-width: 2; }
.contact__email {
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.875rem);
  font-weight: 550;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.contact__email .icon { width: 0.85em; height: 0.85em; }

.contact__details {
  display: grid;
  gap: 2.25rem;
  padding-top: 0.5rem;
}
.contact__block {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
  font-size: var(--fs-small);
  line-height: 1.65;
}
.contact__block a { overflow-wrap: anywhere; }
.contact__name {
  margin-bottom: 0.35rem;
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.contact__block .text-link { margin-top: 0.5rem; }

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  background: var(--river);
  color: var(--on-river);
  padding-top: clamp(3.5rem, 2rem + 4vw, 6rem);
  font-size: var(--fs-small);
  line-height: 1.65;
}
.site-footer ::selection { background: var(--lake); color: var(--river-deep); }
.site-footer :focus-visible { outline-color: var(--lake); }
.site-footer a { text-decoration-color: var(--on-river-line); }
.site-footer a:hover { text-decoration-color: currentColor; }

.site-footer__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 6rem);
}
.site-footer__name { color: var(--on-river); font-weight: 600; }
.site-footer__name span { color: var(--on-river-2); font-weight: 400; }
.site-footer__links { display: grid; gap: 0.35rem; }
.site-footer__links a { color: var(--on-river); text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--on-river-line);
  color: var(--on-river-2);
  font-size: 0.8125rem;
}

@media (max-width: 480px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

/* Motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  /* Hero: daylight opens once */
  .hero__title .line > span {
    animation: rise 1.1s var(--ease-out) both;
  }
  .hero__title .line:nth-child(2) > span { animation-delay: 0.09s; }
  .hero__aside { animation: fade-up 1s var(--ease-out) 0.3s both; }
  .hero__media { animation: open-light 1.5s var(--ease-out) 0.15s both; }
  .hero__media img { animation: settle 2.2s var(--ease-out) 0.15s both; }

  .property.is-open .property__inner { animation: fade-up 0.6s var(--ease-out) both; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@keyframes rise {
  from { opacity: 0.4; transform: translateY(32%); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-up {
  from { opacity: 0.4; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes open-light {
  from { clip-path: inset(10% 4% 0 4%); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes settle {
  from { transform: scale(1.12); filter: brightness(1.18) saturate(0.8); }
  to { transform: none; filter: none; }
}

