/* Velora public site. Tokens mirror design-system/velora/MASTER.md. */

/* Latin and Cyrillic subsets; browsers fetch only the ranges a page uses. */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  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: 'Cormorant Garamond';
  src: url('/assets/fonts/cormorant-garamond-cyrillic-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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: 'Cormorant Garamond';
  src: url('/assets/fonts/cormorant-garamond-cyrillic-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Jost';
  src: url('/assets/fonts/jost-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  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: 'Jost';
  src: url('/assets/fonts/jost-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --cream: #faf8f4;
  --paper: #ffffff;
  --ink: #2f4038;
  --ink-hover: #22302a;
  --ink-soft: #5b6660;
  --ink-muted: #5d6862;
  --accent: #3b725f;
  --mint-50: #e8f1ee;
  --mint-100: #d4e5de;
  --mint: #9ccbb9;
  --line: #d9e5e0;
  --field-line: #86998f;
  --danger: #a23b32;
  --danger-bg: #f7e6e3;

  --font-display: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 7.5rem);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 40px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --z-intro: 100;
  --shadow-hover: 0 14px 34px -20px rgb(47 64 56 / 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  text-decoration: none;
  transition: top 160ms var(--ease-out);
}
.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 0.95rem/1 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    transform 160ms var(--ease-out);
}
.btn:active {
  transform: scale(0.97);
}
.btn .icon {
  transition: transform 200ms var(--ease-out);
}
.btn--primary {
  background: var(--ink);
  color: var(--cream);
}
.btn--secondary {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn--sm {
  min-height: 44px;
  padding: 0 1.4rem;
  font-size: 0.875rem;
}
@media (hover: hover) {
  .btn--primary:hover {
    background: var(--ink-hover);
  }
  .btn--secondary:hover {
    background: var(--ink);
    color: var(--cream);
  }
  .btn:hover .icon {
    transform: translateX(3px);
  }
}

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2vw, 1.25rem);
  border-bottom: 1px solid var(--line);
}

.logo {
  flex: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.logo__word {
  display: inline-flex;
  align-items: flex-start;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  font-weight: 600;
  letter-spacing: 0.015em;
}
.logo__o {
  flex: none;
  width: 0.66em;
  height: 1.05em;
  margin: 0.09em 0.02em -0.42em;
  color: #8cc5b2;
  overflow: visible; /* the ring touches the viewBox top; breathing and the landing wobble must not clip */
}
.logo__tag {
  margin-top: 0.15rem;
  font-family: var(--font-body);
  font-size: clamp(0.58rem, 1vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}
.link-back .icon {
  transition: transform 200ms var(--ease-out);
}
@media (hover: hover) {
  .link-back:hover {
    color: var(--ink);
  }
  .link-back:hover .icon {
    transform: translateX(-3px);
  }
}

/* ── Logo balloon ─────────────────────────────────────────────────────
   The "O" is a balloon on a string: it sways slowly from the string's end,
   breathes a little, and tugs upward when you point at the logo. */
.logo__o {
  transform-origin: 50% 97%;
  animation: o-sway 7s ease-in-out infinite;
}
.logo__o-body {
  transform-box: view-box;
  transform-origin: 22px 40px;
  animation: o-breathe 3.6s ease-in-out infinite;
}
.logo__o-string {
  transform-box: view-box;
  transform-origin: 22px 42px;
  animation: o-string 3.6s ease-in-out infinite;
}
@keyframes o-sway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(3deg);
  }
  75% {
    transform: rotate(-3deg);
  }
}
@keyframes o-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-0.8px) scale(1.035);
  }
}
@keyframes o-string {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-5deg);
  }
}
@media (hover: hover) and (pointer: fine) {
  .logo:hover .logo__o-body {
    animation: o-tug 900ms var(--ease-out);
  }
}
@keyframes o-tug {
  30% {
    transform: translateY(-3.5px) scale(1.07, 1.05);
  }
  60% {
    transform: translateY(-1px) scale(0.99, 1.01);
  }
}
/* The intro balloon lands here: a small wobble as the string catches it. */
.logo__o--caught {
  animation: o-catch 1100ms var(--ease-out);
}
@keyframes o-catch {
  20% {
    transform: rotate(-9deg);
  }
  45% {
    transform: rotate(6deg);
  }
  70% {
    transform: rotate(-2.5deg);
  }
}
/* While the intro balloon is in flight, the real "O" waits. */
.intro-flying .site-header .logo__o {
  opacity: 0;
}

/* ── Intro: a balloon inflates on a white page, then flies into the logo.
   Plays once per session (gated by the inline script). If site.js never
   runs, the fail-safe animation clears the overlay on its own. */
.intro {
  position: fixed;
  inset: 0;
  z-index: var(--z-intro);
  display: grid;
  place-items: center;
  background-color: #ffffff;
  animation: intro-failsafe 400ms ease 3200ms forwards;
  transition: background-color 600ms ease 120ms;
}
.intro-seen .intro {
  display: none;
}
.intro__balloon {
  width: clamp(96px, 11vw, 132px);
  height: auto;
  overflow: visible;
  color: #8cc5b2;
}
.intro__body {
  transform-box: view-box;
  transform-origin: 22px 40px;
  animation: intro-inflate 1150ms 200ms both;
}
.intro__string path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: intro-string 500ms var(--ease-out) 150ms forwards;
}
.intro__fill,
.intro__shine {
  transition: opacity 450ms var(--ease-out);
}
.intro__shine {
  opacity: 0;
  animation: intro-shine 300ms var(--ease-out) 1150ms forwards;
}
/* Three puffs of air, each with a small relax, then a slight overshoot. */
@keyframes intro-inflate {
  0% {
    opacity: 0;
    transform: scale(0.2, 0.14);
    animation-timing-function: var(--ease-out);
  }
  8% {
    opacity: 1;
  }
  24% {
    transform: scale(0.52, 0.47);
    animation-timing-function: ease-in-out;
  }
  34% {
    transform: scale(0.48, 0.45);
    animation-timing-function: var(--ease-out);
  }
  58% {
    transform: scale(0.84, 0.79);
    animation-timing-function: ease-in-out;
  }
  68% {
    transform: scale(0.8, 0.77);
    animation-timing-function: var(--ease-out);
  }
  90% {
    transform: scale(1.04, 1.03);
    animation-timing-function: ease-in-out;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes intro-string {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes intro-shine {
  to {
    opacity: 0.8;
  }
}
@keyframes intro-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
.intro--leaving {
  background-color: rgb(255 255 255 / 0);
  pointer-events: none;
}
.intro--leaving .intro__fill,
.intro--leaving .intro__shine {
  opacity: 0;
}

/* ── Header actions + language switcher ──────────────────────────────── */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.75rem);
}
.lang ul {
  display: flex;
  align-items: center;
}
.lang__link {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  min-height: 44px;
  padding-inline: 0.3rem;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}
.lang__link abbr {
  text-decoration: none;
}
.lang__link[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}
@media (hover: hover) {
  .lang__link:hover {
    color: var(--ink);
  }
}

/* ── Areas list (Helsinki · Espoo · Vantaa) ───────────────────────────── */
.areas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.areas li + li::before {
  content: '·';
  margin-inline: 0.65em;
}
.areas--hero {
  margin-top: 2.25rem;
}
.areas--footer {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: inherit;
}

/* ── Hero ─────────────────────────────────────────────────────────────
   Desktop: the video fills the section; its empty left side becomes the
   calm backdrop for the copy, lifted toward the page cream by a gradient.
   Mobile: the video sits below the copy as a rounded card. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(560px, 76vh, 800px);
  padding-block: clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
  background: #ebe5dd; /* matches the video backdrop while the poster loads */
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 0%; /* the cluster's top balloon sits near the frame's top edge */
}
/* Edge blending. The video's warm backdrop must melt into the cream header
   above and the white Services section below, with no visible seam. The
   multi-stop gradients approximate an ease curve, which avoids the hard
   "line" a two-stop linear fade leaves behind. Fixed pixel heights keep the
   fades the same size at every hero height. */
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* top: page cream → transparent, continues the header */
    linear-gradient(
        180deg,
        rgb(250 248 244 / 1) 0%,
        rgb(250 248 244 / 0.94) 14%,
        rgb(250 248 244 / 0.8) 28%,
        rgb(250 248 244 / 0.6) 43%,
        rgb(250 248 244 / 0.38) 58%,
        rgb(250 248 244 / 0.18) 74%,
        rgb(250 248 244 / 0.05) 88%,
        rgb(250 248 244 / 0) 100%
      )
      top / 100% 110px no-repeat,
    /* bottom: transparent → Services white, also hides the video's floor */
    linear-gradient(
        0deg,
        rgb(255 255 255 / 1) 0%,
        rgb(255 255 255 / 0.95) 12%,
        rgb(255 255 255 / 0.82) 25%,
        rgb(255 255 255 / 0.62) 40%,
        rgb(255 255 255 / 0.4) 55%,
        rgb(255 255 255 / 0.2) 71%,
        rgb(255 255 255 / 0.06) 86%,
        rgb(255 255 255 / 0) 100%
      )
      bottom / 100% 200px no-repeat,
    /* left: calm, readable backdrop for the copy */
    linear-gradient(90deg, rgb(250 248 244 / 0.92) 0%, rgb(250 248 244 / 0.7) 32%, rgb(250 248 244 / 0) 60%);
}
/* On desktop the fade does the separating, so drop the header hairline. */
@media (min-width: 861px) {
  .page-home .site-header__inner {
    border-bottom-color: transparent;
  }
}
.hero__copy {
  max-width: 35rem;
}
.hero__title {
  font-size: clamp(2.6rem, 5.4vw, 3.9rem);
  line-height: 1.08;
  max-width: 20ch;
}
.hero__text {
  max-width: 30rem;
  margin-top: 1.5rem;
}
.hero .btn {
  margin-top: 2.25rem;
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.section {
  padding-block: var(--section-y);
}
.section--paper {
  background: var(--paper);
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
}
.section--paper .section-head {
  padding-bottom: clamp(1.75rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-size: clamp(2.1rem, 3.8vw, 2.75rem);
  max-width: 24ch;
}
.section-head__intro {
  max-width: 34rem;
}

/* ── Service cards ────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 2rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition:
    transform 240ms var(--ease-out),
    box-shadow 240ms var(--ease-out);
}
.card__art {
  margin: 0 -0.25rem 1.25rem;
}
.card__art-svg {
  width: 100%;
  height: auto;
}
.card__num,
.step__num {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.card__title {
  margin-top: 0.4rem;
  font-size: 1.45rem;
  font-weight: 600;
}
.card__text {
  margin-top: 0.75rem;
  font-size: 0.925rem;
  line-height: 1.6;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
  }
}

/* ── Service card stories ──────────────────────────────────────────────
   site.js adds .is-playing on mouse hover or tap. Each illustration acts
   out its service. Transitions (not keyframes) where the state can flip
   back mid-way, so leaving the card early never jumps. */
.card__art-svg--inflate,
.card__art-svg--open,
.card__art-svg--tug {
  overflow: visible;
}
.card__art-svg .balloon__body,
.svc-fly,
.svc-rise,
.box__lid,
.svc-tug {
  transform-box: fill-box;
}

@media (prefers-reduced-motion: no-preference) {
  /* Personalised: the ONNEA balloon gets blown up bigger. */
  .svc-inflate .balloon__body {
    transform-origin: 50% 100%;
    transition: transform 420ms var(--ease-out);
  }
  .card.is-playing .svc-inflate .balloon__body {
    transform: scale(1.22);
    transition: transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Bubble: let go, it floats up and away. On return a new one fades in. */
  .svc-fly {
    transform-origin: 50% 100%;
    transition:
      transform 0s,
      opacity 420ms var(--ease-out) 60ms;
  }
  .card.is-playing .svc-fly {
    opacity: 0;
    transform: translate(14px, -150px) rotate(8deg);
    transition:
      transform 1600ms cubic-bezier(0.45, 0, 0.7, 0.45),
      opacity 700ms ease 900ms;
  }

  /* Surprise box: the lid flips open and the balloon rises out. */
  .box__lid {
    transform-origin: 0% 100%;
    transition: transform 380ms var(--ease-out);
  }
  .svc-rise {
    transition: transform 420ms var(--ease-out);
  }
  .card.is-playing .box__lid {
    transform: translate(-6px, -10px) rotate(-32deg);
    transition: transform 520ms cubic-bezier(0.34, 1.4, 0.64, 1);
  }
  .card.is-playing .svc-rise {
    transform: translateY(-26px);
    transition: transform 800ms var(--ease-out) 140ms;
  }

  /* Decor: tied balloons keep trying to rise; the garland holds them. */
  .svc-tug {
    transform-origin: 50% 100%;
  }
  .svc-tug--1 {
    --tug-r: -5deg;
  }
  .svc-tug--2 {
    --tug-r: 5deg;
  }
  .svc-tug--3 {
    --tug-r: 2deg;
  }
  .card.is-playing .svc-tug {
    animation: svc-tug 1100ms ease-in-out infinite;
  }
  .card.is-playing .svc-tug--2 {
    animation-delay: -360ms;
  }
  .card.is-playing .svc-tug--3 {
    animation-delay: -720ms;
  }
}
@keyframes svc-tug {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-4px) rotate(var(--tug-r));
  }
  40% {
    transform: translateY(-1px) rotate(calc(var(--tug-r) * -0.4));
  }
  60% {
    transform: translateY(-3.5px) rotate(calc(var(--tug-r) * 0.6));
  }
  78% {
    transform: translateY(0) rotate(0deg);
  }
}

/* ── How it works: scroll story ───────────────────────────────────────
   Static by default: a full-screen scene with every step visible over the
   finished arrangement. how-it-works.js adds .hiw--scrub, which pins the
   scene while scrolling scrubs the video and reveals the steps. */
.hiw {
  position: relative;
  background: var(--cream);
}
.hiw__sticky {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(4rem, 9vw, 6rem);
  overflow: hidden;
  background: #e8e0da; /* the video's wall, shown while it loads */
}
.hiw__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hiw__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%; /* the arrangement grows on the right */
}
/* Same edge treatment as the hero: melt into white Services above and the
   cream Gallery below; a wash keeps the text column readable. */
.hiw__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
        180deg,
        rgb(255 255 255 / 1) 0%,
        rgb(255 255 255 / 0.8) 28%,
        rgb(255 255 255 / 0.4) 58%,
        rgb(255 255 255 / 0.1) 84%,
        rgb(255 255 255 / 0) 100%
      )
      top / 100% 110px no-repeat,
    linear-gradient(
        0deg,
        rgb(250 248 244 / 1) 0%,
        rgb(250 248 244 / 0.82) 25%,
        rgb(250 248 244 / 0.45) 55%,
        rgb(250 248 244 / 0.12) 82%,
        rgb(250 248 244 / 0) 100%
      )
      bottom / 100% 160px no-repeat,
    linear-gradient(90deg, rgb(250 248 244 / 0.94) 0%, rgb(250 248 244 / 0.82) 30%, rgb(250 248 244 / 0) 54%);
}
.hiw .section-head {
  margin-bottom: clamp(1.5rem, 3.5vh, 2.25rem);
}
.hiw__story {
  position: relative;
  max-width: 30rem;
  padding-left: 1.75rem;
}
.hiw__rail {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0;
  width: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(47 64 56 / 0.12);
}
.hiw__rail-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleY(1);
  transform-origin: top;
}
.steps {
  display: grid;
  gap: clamp(1.25rem, 3vh, 2rem);
}
.step__title {
  margin-top: 0.4rem;
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 600;
}
.step__text {
  margin-top: 0.5rem;
  max-width: 27rem;
}
.hiw__dots {
  display: none;
}
.hiw__after {
  padding-block: clamp(1rem, 3vw, 2rem) var(--section-y);
}

.area-note {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  align-items: center;
  gap: 1rem 2.5rem;
  padding: 1.5rem 2rem;
  background: var(--mint-50);
  border-radius: var(--radius-md);
}
.area-note p {
  max-width: 36rem;
}

/* Pinned, scrubbed version */
.hiw--scrub .hiw__track {
  height: 340vh;
  height: 340svh;
}
.hiw--scrub .hiw__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
}
.hiw--scrub .hiw__rail-fill {
  transform: scaleY(0);
}
.hiw--scrub .step {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(18px);
  transition:
    opacity 280ms ease,
    transform 280ms ease,
    filter 280ms ease;
}
.hiw--scrub .step.is-shown {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition:
    opacity 650ms var(--ease-out),
    transform 650ms var(--ease-out),
    filter 650ms var(--ease-out);
}

/* ── Gallery ──────────────────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(220px, 23vw, 300px);
  gap: 1rem;
}
.gallery__item {
  grid-column: span 4;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--mint-50);
}
/* Alternating rhythm: three equal tiles, then narrow / wide / medium. */
.gallery__item:nth-child(6n + 4) {
  grid-column: span 3;
}
.gallery__item:nth-child(6n + 5) {
  grid-column: span 5;
}
.gallery__placeholder,
.gallery__open,
.gallery__open img {
  width: 100%;
  height: 100%;
}
.gallery__open {
  display: block;
  cursor: zoom-in;
}
.gallery__open:focus-visible {
  outline-offset: -4px;
}
.gallery__open img {
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}
@media (hover: hover) {
  .gallery__open:hover img {
    transform: scale(1.03);
  }
}
.gallery__more {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.lightbox {
  width: min(94vw, 1200px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgb(22 30 26 / 0.88);
}
.lightbox[open] {
  animation: lightbox-in 220ms var(--ease-out);
}
.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  touch-action: pan-y;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 4.5rem);
  object-fit: contain;
  border-radius: var(--radius-sm);
  transition: opacity 180ms ease;
}
.lightbox__img[hidden] {
  display: none;
}
.lightbox__img.is-swapping {
  opacity: 0;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgb(250 248 244 / 0.92);
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 140ms var(--ease-out);
}
.lightbox__nav:active {
  transform: scale(0.95);
}
.lightbox__nav[hidden] {
  display: none;
}
.lightbox__nav--prev {
  left: 0.75rem;
}
.lightbox__nav--next {
  right: 0.75rem;
}
@media (hover: hover) {
  .lightbox__nav:hover {
    background: #ffffff;
  }
}
.lightbox__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  margin-top: 0.9rem;
}
.lightbox__caption {
  flex: 1;
  color: #e6ede9;
  font-size: 0.95rem;
}
.lightbox__count {
  color: #b4c6bd;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.lightbox__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms var(--ease-out);
}
.lightbox__close:active {
  transform: scale(0.95);
}
@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  padding-block: 3rem 1.5rem;
  background: var(--ink);
  color: #d5e2dc;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem clamp(2rem, 8vw, 7rem);
}
.logo--inverse {
  color: var(--cream);
}
.logo--inverse .logo__word {
  font-size: 2.6rem;
}
.logo--inverse .logo__tag {
  font-size: 0.6rem;
}
.logo--inverse .logo__tag {
  color: #c7d6cf;
}
.logo--inverse .logo__o {
  color: var(--mint);
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
}
.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}
@media (hover: hover) {
  .site-footer__nav a:hover {
    color: var(--cream);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.8rem;
  color: #b4c6bd;
}
.site-footer__credit a {
  color: var(--cream);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-underline-offset: 4px;
}
@media (hover: hover) {
  .site-footer__credit a:hover {
    text-decoration: underline;
  }
}

/* ── Contact page ─────────────────────────────────────────────────────── */
.contact {
  padding-block: clamp(2.5rem, 6vw, 4rem) var(--section-y);
}
.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2.5rem, 7vw, 7rem);
}
.contact__intro {
  padding-top: 1.75rem;
}
.contact__title {
  font-size: clamp(2.5rem, 4.6vw, 3.3rem);
  line-height: 1.1;
}
.contact__intro .lead {
  margin-top: 1.75rem;
  max-width: 30rem;
}

.follow {
  margin-top: 3rem;
}
.follow__title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.follow__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 1.25rem;
}
.follow__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.follow__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  transition:
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out);
}
@media (hover: hover) {
  .follow__link:hover .follow__icon {
    background: var(--ink);
    color: var(--cream);
  }
}

.details {
  margin: 2.75rem 0 0;
  border-top: 1px solid var(--line);
}
.details__row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
}
.details dt {
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.details dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.details a {
  text-decoration: none;
  overflow-wrap: anywhere;
}
.details a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.details__wa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

.contact__card {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--mint-50);
  border-radius: var(--radius-lg);
  scroll-margin-top: 1.5rem;
}
.contact__card-title {
  font-size: clamp(1.9rem, 3vw, 2.25rem);
}

.quote-form {
  margin-top: 1.75rem;
}
.quote-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem 1.75rem;
}
.field--wide {
  grid-column: 1 / -1;
}
.field__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.field__req {
  color: var(--accent);
}
.field__control {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 0.8rem 1rem;
  background: var(--paper);
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.field__control::placeholder {
  color: #6b7770;
}
textarea.field__control {
  min-height: 150px;
  resize: vertical;
}
.field__control:hover {
  border-color: var(--ink-muted);
}
.field__control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(156 203 185 / 0.5);
}
.field__control[aria-invalid='true'] {
  border-color: var(--danger);
}
.field__control[aria-invalid='true']:focus {
  box-shadow: 0 0 0 3px rgb(162 59 50 / 0.18);
}
.field__error {
  margin-top: 0.45rem;
  color: var(--danger);
  font-size: 0.85rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quote-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}
.quote-form__note {
  flex: 1 1 14rem;
  font-size: 0.825rem;
  color: var(--ink-muted);
}
.quote-form__note a {
  color: var(--ink);
  text-underline-offset: 3px;
}
.btn--submit {
  min-width: 12.5rem;
  position: relative;
}
.btn--submit[aria-busy='true'] {
  cursor: progress;
}
.btn--submit[aria-busy='true'] .btn__label {
  opacity: 0;
}
.btn--submit[aria-busy='true']::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgb(250 248 244 / 0.35);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
}
.form-alert .icon {
  flex: none;
  margin-top: 0.15rem;
}
.form-alert[hidden] {
  display: none;
}

.quote-success {
  padding-block: 1rem;
}
.quote-success:focus {
  outline: none;
}
.quote-success__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
}
.quote-success p {
  max-width: 30rem;
  margin-top: 1rem;
}
.quote-success .btn {
  margin-top: 2rem;
}
.quote-success:not([hidden]) {
  animation: rise-in 420ms var(--ease-out);
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ── Privacy / prose ──────────────────────────────────────────────────── */
.prose {
  max-width: calc(46rem + 2 * var(--gutter));
  padding-block: clamp(3rem, 7vw, 5rem) var(--section-y);
}
.prose h1 {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  margin-bottom: 2rem;
}
.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.65rem;
  font-weight: 600;
}
.prose p + p {
  margin-top: 1rem;
}
.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ── Scroll reveal ────────────────────────────────────────────────────
   Content is visible by default. site.js marks only elements that start
   below the fold as pending, then reveals them as they scroll in, so
   crawlers and no-JS visitors always see everything. */
.reveal-pending {
  opacity: 0;
  transform: translateY(14px);
}
.reveal-in {
  transition:
    opacity 520ms var(--ease-out),
    transform 520ms var(--ease-out);
}
.reveal-in:nth-child(2) {
  transition-delay: 60ms;
}
.reveal-in:nth-child(3) {
  transition-delay: 120ms;
}
.reveal-in:nth-child(4) {
  transition-delay: 180ms;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .contact__inner,
  .section-head--split {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
    padding-block: clamp(2.5rem, 7vw, 4rem) clamp(3.5rem, 8vw, 5rem);
    background: none;
  }
  .hero__media {
    position: relative;
    inset: auto;
    z-index: auto;
    width: calc(100% - 2 * var(--gutter));
    max-width: 560px;
    aspect-ratio: 1 / 1;
    margin: 2.5rem auto 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ebe5dd;
  }
  /* The first video frame shows a balloon tip at the very bottom. A haze in
     the wall's own colour hides it, so the card opens on an empty wall and
     the balloons rise out of the haze. */
  .hero__media::after {
    background: linear-gradient(
      0deg,
      rgb(225 218 211 / 1) 0%,
      rgb(225 218 211 / 1) 14%,
      rgb(225 218 211 / 0.9) 20%,
      rgb(225 218 211 / 0.62) 28%,
      rgb(225 218 211 / 0.28) 36%,
      rgb(225 218 211 / 0.08) 43%,
      rgb(225 218 211 / 0) 48%
    );
  }
  .hero__video {
    object-position: 100% 50%;
  }
  .hero__title {
    max-width: 18ch;
  }
  /* Phones: the video fills the screen; steps sit in a cream card at the
     bottom. Pinned, only the current step shows, with progress dots. */
  .hiw__video {
    object-position: 70% 50%;
  }
  .hiw__media::after {
    background:
      /* stronger and taller than desktop: the title sits over the video here */
      linear-gradient(
          180deg,
          rgb(255 255 255 / 1) 0%,
          rgb(250 248 244 / 0.92) 45%,
          rgb(250 248 244 / 0.6) 72%,
          rgb(250 248 244 / 0) 100%
        )
        top / 100% 220px no-repeat,
      linear-gradient(0deg, rgb(250 248 244 / 1) 0%, rgb(250 248 244 / 0.7) 18%, rgb(250 248 244 / 0) 38%);
  }
  .hiw__story {
    max-width: none;
    padding-left: 0;
  }
  .hiw__rail {
    display: none;
  }
  .hiw .step {
    padding: 1.1rem 1.25rem 1.25rem;
    background: rgb(250 248 244 / 0.94);
    border-radius: var(--radius-md);
  }
  .hiw--scrub .hiw__sticky {
    align-items: stretch;
    padding-block: 0;
  }
  .hiw--scrub .hiw__inner {
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding-block: clamp(2.5rem, 9vh, 4rem) 1.25rem;
  }
  .hiw--scrub .hiw__story {
    align-self: end;
  }
  .hiw--scrub .hiw__steps {
    display: grid;
  }
  .hiw--scrub .step {
    grid-area: 1 / 1;
    align-self: end;
  }
  .hiw--scrub .step.is-shown:not(.is-current) {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(-12px);
  }
  .hiw--scrub .hiw__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
  }
  .hiw__dots li {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(47 64 56 / 0.2);
    transition: background-color 200ms ease;
  }
  .hiw__dots li.is-on {
    background: var(--accent);
  }
  .area-note {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.5rem;
  }
  .contact__intro {
    padding-top: 0;
  }
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 1.5rem;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(160px, 42vw, 280px);
  }
  .gallery__item,
  .gallery__item:nth-child(6n + 4),
  .gallery__item:nth-child(6n + 5) {
    grid-column: span 1;
  }
  .gallery__item:nth-child(3n) {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .cards,
  .quote-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card__art {
    max-width: 320px;
  }
  .details__row {
    grid-template-columns: minmax(0, 1fr);
  }
  .btn--submit {
    width: 100%;
  }
  .site-header .btn--sm {
    padding: 0 1.1rem;
  }
}

/* Narrow phones: the hero CTA sits right below, so the header keeps only the
   logo and language links; "Back to home" collapses to its arrow. */
@media (max-width: 480px) {
  .site-header__cta {
    display: none;
  }
  .link-back {
    min-width: 44px;
    justify-content: center;
  }
  .link-back__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .lang__link {
    min-width: 38px;
  }
  .site-header .logo__word {
    font-size: 2.05rem;
  }
  .site-header .logo__tag {
    font-size: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .intro {
    display: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .reveal-pending {
    opacity: 1;
    transform: none;
  }
}
