/* Suomen Laatukatot: front page */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  src: url("assets/fonts/general-sans.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #111111;
  --ink-soft: #55554f;
  --ink-mute: #8b8b86;
  --paper: #ffffff;
  --line: #d9d9d4;
  --line-soft: #e7e7e4;
  --orange: #f39200;
  --orange-deep: #e08600;
  --night: #0f0f0f;
  --sand: #f4f3ef;
  --error: #b3261e;

  /* Text and lines on the dark bands */
  --on-night: #ffffff;
  --on-night-soft: rgba(255, 255, 255, 0.72);
  --on-night-mute: rgba(255, 255, 255, 0.6);
  --line-night: rgba(255, 255, 255, 0.16);
  --line-night-strong: rgba(255, 255, 255, 0.3);

  /* Shown behind photos while they load */
  --frame: #e9e8e3;
  --frame-night: #1c1c1c;
  --frame-sky: #2b5fa8;

  --paper-hover: #f1f1ee;
  --focus-halo: rgba(243, 146, 0, 0.35);

  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-io: cubic-bezier(0.4, 0, 0.2, 1);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "General Sans", "Inter", system-ui, sans-serif;

  --gutter: clamp(20px, 2.8vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

input,
textarea {
  caret-color: var(--orange-deep);
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--small {
  padding: 10px 20px;
  font-size: 14px;
  line-height: 20px;
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--orange-deep);
}

.btn--outline {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
}

.btn--outline:hover {
  border-color: var(--ink);
}

.btn--light {
  background: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--paper-hover);
}

.btn--ghost {
  border-color: var(--line-night-strong);
  color: var(--on-night);
  font-weight: 500;
}

.btn--ghost:hover {
  border-color: var(--on-night);
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
}

.hero__media {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  /* Same 1440:560 proportion as the Paper frame, so the crop matches. */
  height: clamp(320px, 38.889vw, 800px);
  overflow: hidden;
  background: var(--frame-sky);
}

.hero__media picture {
  display: contents;
}

.hero__photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__media::before,
.hero__media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

/* Long, soft fade into the white page over the lower part of the photo */
.hero__media::after {
  top: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(255, 255, 255, 0.15) 55%,
    rgba(255, 255, 255, 0.6) 75%,
    var(--paper) 100%
  );
}

.hero__media::before {
  top: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(8, 18, 36, 0.5), rgba(8, 18, 36, 0));
}


/* Nav: floating bar. At the top it spans the page over the hero photo; after a short scroll
   the dark layer closes into a centred pill and the items ride into it. script.js measures
   both layouts and writes the offsets as custom properties; the classes below do the rest. */

.nav {
  --bar-h: 94px;
  --nav-dur: 0.42s;
  --nav-ease: cubic-bezier(0.3, 0.9, 0.1, 1);

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--bar-h);
  color: var(--on-night);
  pointer-events: none;
  transition: transform var(--nav-dur) var(--nav-ease);
}

/* The floating pill is the phone and tablet bar only. With the full link row (1230px and up)
   the nav stays put at the top of the hero and scrolls away with it. */
@media (max-width: 1229px) {
  .js .nav {
    position: fixed;
  }
}

@media (min-width: 1230px) {
  .nav .nav__row {
    display: flex;
  }

  .nav .nav__links {
    margin-left: auto;
    margin-right: 30px;
    gap: 30px;
  }
}

.nav.is-hidden {
  transform: translateY(-110%);
  transition: transform 0.36s cubic-bezier(0.7, 0, 0.16, 1);
}

.nav.is-hidden:focus-within,
.menu-open .nav.is-hidden {
  transform: none;
}

/* Taller than the bar so a low-floating pill never runs out of box to clip into. */
.nav__bg {
  --ct: 0px;
  --cx: 0px;
  --cb: 32px;
  --cr: 0px;

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--bar-h) + 32px);
  background: rgb(15 15 15 / 0.84);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  opacity: 0;
  clip-path: inset(0 0 32px 0 round 0);
  transition: clip-path var(--nav-dur) var(--nav-ease), opacity var(--nav-dur) var(--nav-ease);
}

.nav.is-docked .nav__bg {
  opacity: 1;
  clip-path: inset(var(--ct) var(--cx) var(--cb) var(--cx) round var(--cr));
}

.nav__row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  padding: 0 var(--gutter);
  transition: translate calc(var(--nav-dur) * 0.82) var(--nav-ease) 0.02s;
}

.nav.is-docked .nav__row {
  translate: 0 var(--dy, 0px);
}

[data-nav-item] {
  pointer-events: auto;
  transition: translate var(--nav-dur) var(--nav-ease) 0.02s, scale var(--nav-dur) var(--nav-ease) 0.02s;
}

.nav.is-docked [data-nav-item] {
  translate: var(--dx, 0px) 0;
}

.nav__logo {
  grid-column: 1;
  justify-self: start;
  transform-origin: left center;
}

.nav.is-docked .nav__logo {
  scale: var(--s, 1);
}

.nav__logo img {
  width: 152px;
  height: auto;
}

.nav__links {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.nav__links > a {
  padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.25s ease, translate var(--nav-dur) var(--nav-ease) 0.02s;
}

.nav__links > a:hover {
  background-size: 100% 1px;
}

.nav__cta,
.nav__toggle {
  grid-column: 3;
  justify-self: end;
}

.nav__cta {
  transition: background-color 0.2s ease, transform 0.15s ease, translate var(--nav-dur) var(--nav-ease) 0.02s;
}

/* Docked layout, applied for one synchronous measurement only: script.js reads it, then removes it. */
.nav.is-measuring .nav__row {
  display: flex;
  justify-content: center;
}

.nav.is-measuring .nav__row,
.nav.is-measuring [data-nav-item] {
  translate: none;
  scale: none;
}

.nav.is-measuring .nav__logo {
  margin-right: 28px;
}

.nav.is-measuring .nav__logo img {
  width: 106px;
}

.nav.is-measuring .nav__links {
  gap: 22px;
  margin-right: 16px;
}

/* State is applied without animation on load, resize and with reduced motion. */
.nav.is-instant,
.nav.is-instant .nav__bg,
.nav.is-instant .nav__row,
.nav.is-instant [data-nav-item] {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav.is-hidden,
  .nav__row,
  [data-nav-item] {
    transition: none;
  }

  .nav__bg {
    transition: opacity 0.2s ease;
  }
}

.nav__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
}

.nav__toggle-bar {
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-last-child(2) {
  transform: translateY(3.5px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Pill */

.hero__pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.1);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.hero__pill-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

/* Copy */

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(32px, 3.4vw, 48px) var(--gutter) 56px;
  text-align: center;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.0625rem, 1.2rem + 3.6vw, 3.625rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__title span {
  display: block;
}

.hero__title-soft {
  color: var(--ink-mute);
}

.hero__lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.9375rem, 0.87rem + 0.3vw, 1.125rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* Mobile menu */

.menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px var(--gutter) 32px;
  background: var(--night);
  color: var(--on-night);
  overflow-y: auto;
}

.menu[hidden] {
  display: none;
}

.menu__links {
  display: flex;
  flex-direction: column;
}

.menu__links a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-night);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 34px;
  letter-spacing: -0.02em;
}

.menu__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 40px;
}

/* Compact desktop nav */

@media (max-width: 1399px) {
  .nav .nav__links {
    gap: 22px;
    margin-right: 22px;
    font-size: 13px;
  }

  .nav__cta {
    padding: 9px 16px;
    font-size: 13px;
  }
}

/* Tablet and below: menu button replaces the links */

@media (max-width: 1229px) {
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }
}

@media (min-width: 1230px) {
  .menu {
    display: none;
  }
}

/* Phone */

@media (max-width: 699px) {
  .hero__media {
    height: 400px;
  }

  .nav {
    --bar-h: 76px;
  }

  .nav__logo img {
    width: 112px;
  }

  .nav.is-measuring .nav__logo img {
    width: 96px;
  }

  .hero__pill {
    gap: 8px;
    padding: 8px 16px 8px 12px;
    font-size: 13px;
    line-height: 18px;
  }

  .hero__pill-dot {
    width: 7px;
    height: 7px;
  }

  .hero__copy {
    padding-bottom: 32px;
  }

  .hero__title {
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .hero__lead {
    margin-top: 16px;
  }

  .hero__actions {
    flex-direction: column;
    align-self: stretch;
    gap: 10px;
    margin-top: 24px;
  }

  .menu {
    padding-top: 96px;
  }
}

/* ---------- Page sections ---------- */

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

p,
h2,
figure,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.section {
  padding: clamp(72px, 9vw, 144px) var(--gutter);
}

.wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
}

.link:hover {
  text-decoration-color: currentColor;
}

.link--ink {
  text-decoration-color: var(--ink);
}

/* Parallax image frame: the photo is taller than the frame and slides with scroll */

.px {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--frame);
}

.px img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  transform: translateY(calc(var(--p, 0.5) * -13.79%));
}

.px.is-near img,
.work__title.is-near {
  will-change: transform;
}

/* Intro */

.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 32px clamp(24px, 4vw, 64px);
  align-items: start;
}

.intro__body {
  grid-column: 2;
}

.intro__statement {
  max-width: 21em;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1rem + 2.3vw, 2.875rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.022em;
}

.intro__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(24px, 3vw, 48px);
  margin: clamp(40px, 5vw, 72px) 0 40px;
}

.intro__cols p {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Services */


/* Dark band: services, "Katto kuntoon" and the deduction box run straight into the dark contact section.
   Services has no bottom padding because the split section's top padding is the gap. */
.services,
.split,
.deduction-wrap {
  background: var(--night);
  color: var(--on-night);
}

.services {
  padding-bottom: 0;
}

.services .service__text p,
.split .split__body p {
  color: var(--on-night-soft);
}

.services .arrow-link__icon {
  border-color: var(--line-night-strong);
}

.services .arrow-link:hover .arrow-link__icon {
  color: var(--ink);
}

.services .px,
.split .ba__photo {
  background: var(--frame-night);
}

.split .ba__label {
  color: var(--on-night-mute);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px clamp(20px, 2.8vw, 40px);
}

.service__media {
  aspect-ratio: 3 / 2;
}

.service__media img {
  transition: scale 1.2s var(--ease-out);
}

@media (hover: hover) {
  .service:hover .service__media img {
    scale: 1.04;
  }
}

.service__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 560px;
  padding-top: 28px;
}

.service__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.service__text p {
  color: var(--ink-soft);
  line-height: 1.6;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  font-weight: 600;
}

.arrow-link__icon,
.round-btn {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.4s var(--ease-out);
}

.arrow-link__icon::before,
.round-btn__arrow {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(-2px) rotate(45deg);
}

.round-btn__arrow--left {
  transform: translateX(2px) rotate(-135deg);
}

.arrow-link:hover .arrow-link__icon {
  border-color: var(--orange);
  background: var(--orange);
  transform: translateX(6px);
}

/* Work: white section with a heading, big photo and slider.
   Top padding plus the hero's own bottom padding gives about the same gap as between other sections;
   no bottom padding because the reviews section below brings its own top padding. */

.work {
  padding: clamp(40px, 5vw, 88px) 0 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.work__heading {
  margin-bottom: clamp(24px, 3vw, 40px);
}

.work > .wrap,
.slider__bar {
  max-width: calc(1360px + 2 * var(--gutter));
  padding-inline: var(--gutter);
}

.work__feature {
  aspect-ratio: 16 / 9;
  background: var(--frame-sky);
}

.slider {
  margin-top: clamp(20px, 2.8vw, 40px);
}

.slider__track {
  display: flex;
  gap: clamp(12px, 1.4vw, 20px);
  padding-inline: max(var(--gutter), calc((100vw - 1360px) / 2));
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
}

.slider__track::-webkit-scrollbar {
  display: none;
}

.slider__track.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
}

.slider__track img {
  flex: none;
  width: auto;
  max-width: none;
  height: clamp(260px, 30vw, 440px);
  object-fit: cover;
  scroll-snap-align: center;
  user-select: none;
}

.slider__bar {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 32px;
}

.slider__progress {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--line);
}

.slider__progress span {
  position: absolute;
  inset: -1px 0;
  background: var(--orange);
  transform: scaleX(0.2);
  transform-origin: left;
  will-change: transform;
}

.slider__controls {
  display: flex;
  gap: 10px;
}

.round-btn {
  padding: 0;
  border-color: var(--line-night-strong);
  background: transparent;
  color: var(--on-night);
  cursor: pointer;
}

.round-btn:hover:not(:disabled) {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--ink);
}

.round-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Split text section */

.split__grid,
.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}

.split__body,
.craft__text,
.contact__lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.split__body p,
.craft__text p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
}

.split__body .btn,
.contact__lead .btn {
  margin-top: 10px;
}

/* Before and after: small proof photos under the heading, kept near native size so they stay sharp */

.ba {
  display: grid;
  gap: 22px;
  max-width: 490px;
  margin-top: clamp(32px, 4vw, 56px);
}

.ba__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ba__photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--frame);
}

.ba__photo--wide {
  aspect-ratio: 4 / 3;
}

.ba__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The label sits under the photo, not on it */
.ba__label {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}

/* Full-bleed photo */

.fullbleed {
  height: clamp(320px, 82vh, 900px);
}

.fullbleed img {
  height: 124%;
  transform: translateY(calc(var(--p, 0.5) * -19.35%));
}

/* Craft */

.craft__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 40px clamp(32px, 7vw, 112px);
  align-items: center;
}

.craft__media {
  aspect-ratio: 4 / 5;
}

.craft__body {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 40px);
}

.craft__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 10px;
}

.reviews .craft__foot {
  margin-top: clamp(32px, 4vw, 56px);
}

.craft__badge {
  width: 132px;
  height: auto;
}

/* Household deduction */

/* Reviews: one Google review at a time, swapped by the arrows or by a timer in script.js. */


.reviews__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}

.reviews__rating {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 500;
}

.reviews__stars {
  margin-right: 6px;
  color: var(--orange);
  letter-spacing: 0.08em;
}

.reviews__controls {
  display: none;
  gap: 10px;
}

.js .reviews__controls {
  display: flex;
}

.round-btn--ink {
  border-color: var(--line);
  color: var(--ink);
}

.reviews__grid {
  display: grid;
  padding-top: clamp(32px, 5vw, 72px);
}

.reviews__stage {
  display: grid;
  gap: 40px;
}

.review__text {
  margin: 0;
}

.review {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 40px);
}

.review__text::before {
  content: "\201D";
  display: block;
  height: 0.55em;
  margin-bottom: 0.2em;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
  line-height: 1;
}

.review__text p {
  max-width: 24em;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.review__by {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review__avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--frame);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.review__who {
  display: grid;
  gap: 2px;
  text-align: left;
}

.review__name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.review__src {
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.3;
}

/* With script: the reviews share one cell and swap. */
.js .reviews__stage {
  gap: 0;
}

.js .review {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}

.js .review.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease-out) 0.15s, transform 0.6s var(--ease-out) 0.15s, visibility 0s;
}

.deduction-wrap {
  padding: 0 var(--gutter);
}

.deduction {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(32px, 5.5vw, 80px);
  background: var(--orange);
  color: var(--ink);
}

.deduction__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.deduction__text p {
  max-width: 34em;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
}

.receipt {
  padding: clamp(24px, 2.6vw, 36px);
  background: var(--paper);
}

.receipt__label {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.receipt dd {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.receipt dl > .receipt__total {
  padding: 18px 0 0;
  border-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.receipt__total dd {
  font-weight: 600;
}

/* Contact */

.contact {
  background: var(--night);
  color: var(--on-night);
}

.contact__title {
  max-width: 17em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.1rem + 3.6vw, 4rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.028em;
}

.contact__grid {
  margin-top: clamp(40px, 6vw, 88px);
}

.contact__lead p {
  max-width: 30em;
  color: var(--on-night-soft);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
}

.people {
  display: flex;
  flex-direction: column;
}

.person {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line-night);
}

.person:last-child {
  border-bottom: 1px solid var(--line-night);
}

.person img {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper);
}

.person__name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: -0.02em;
}

.person__role {
  color: var(--on-night-mute);
  font-size: 14px;
}

.person__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: 2px;
  font-weight: 500;
}

.person__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: color 0.2s ease;
}

.person__links a:hover {
  color: var(--orange);
}

/* Quote form */

.quote {
  background: var(--sand);
}

.quote__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 48px clamp(32px, 7vw, 112px);
  align-items: start;
}

.quote__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.quote__company {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 34px;
  letter-spacing: -0.02em;
}

.quote__small-title {
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 600;
}

.quote__social {
  display: flex;
  gap: 24px;
}

.quote__info .link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.quote__small-title:has(+ .quote__social) {
  margin-bottom: 0;
}

.form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: clamp(24px, 4vw, 56px);
  background: var(--paper);
}

.form .h2 {
  margin: 0 0 12px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
}

.field input:not([type="file"]),
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
}

.field input:not([type="file"]):focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus-halo);
}

.field input[type="file"] {
  max-width: 100%;
  min-height: 44px;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 400;
}

.field input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-right: 14px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.field input[type="file"]::file-selector-button:hover {
  border-color: var(--ink);
}

.field__hint {
  color: var(--ink-soft);
  font-weight: 400;
}

.form__note {
  margin-top: -8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.form__fields {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.form__fields[hidden],
.form__done[hidden] {
  display: none;
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field__error {
  color: var(--error);
  font-weight: 500;
  line-height: 1.4;
}

.form__done {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 4px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.form__done:focus {
  outline: none;
}

.form__done-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.form__done-note {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}

.form .btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

/* Footer */

.footer {
  padding: 32px var(--gutter);
  background: var(--night);
  color: var(--on-night-mute);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.nowrap {
  white-space: nowrap;
}

.footer img {
  width: 132px;
  height: auto;
}

/* Section layout: tablet and phone */

@media (max-width: 899px) {
  .intro__grid,
  .services__grid,
  .split__grid,
  .contact__grid,
  .craft__grid,
  .deduction,
  .quote__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .intro__body {
    grid-column: auto;
  }

  .intro__cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .craft__media {
    aspect-ratio: 1 / 1;
  }

  .fullbleed {
    height: clamp(280px, 60vh, 560px);
  }
}

@media (max-width: 599px) {
  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .person {
    gap: 16px;
  }

  .person img {
    width: 72px;
    height: 72px;
  }

  .intro .btn,
  .split__body .btn,
  .contact__lead .btn,
  .form .btn {
    align-self: stretch;
  }

  .work__feature {
    aspect-ratio: 4 / 3;
  }
}

/* ---------- Motion (only with JS and when motion is welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal=""],
  .js [data-reveal="items"] > * {
    transition: opacity 0.7s ease, transform 0.9s var(--ease-out);
  }

  .js [data-reveal=""]:not([data-in]),
  .js [data-reveal="items"]:not([data-in]) > * {
    opacity: 0;
    transform: translateY(40px);
  }

  .js [data-reveal="items"] > :nth-child(2) { transition-delay: 0.1s; }
  .js [data-reveal="items"] > :nth-child(3) { transition-delay: 0.2s; }
  .js [data-reveal="items"] > :nth-child(4) { transition-delay: 0.3s; }
  .js [data-reveal="items"] > :nth-child(5) { transition-delay: 0.4s; }

  /* Photo curtain: the frame opens from the top while the photo settles */
  .js [data-reveal="img"] {
    transition: background-color 0.6s ease;
  }

  .js [data-reveal="img"]:not([data-in]) {
    background-color: transparent;
  }

  .js [data-reveal="img"] img {
    clip-path: inset(0 0 0 0);
    transition: clip-path 1.1s var(--ease-out), scale 1.5s var(--ease-out);
  }

  .js [data-reveal="img"]:not([data-in]) img {
    clip-path: inset(0 0 100% 0);
    scale: 1.18;
  }

  /* Headings: words rise out of masked lines, one line after another */
  .js [data-split]:not([data-ready]) {
    visibility: hidden;
  }

  .js [data-split] .word {
    display: inline-block;
    overflow: hidden;
    padding-bottom: 0.16em;
    margin-bottom: -0.16em;
    vertical-align: top;
  }

  .js [data-split] .word__in {
    display: inline-block;
    transition: transform 0.8s var(--ease-io) calc(var(--l, 0) * 90ms),
      opacity 0.8s var(--ease-io) calc(var(--l, 0) * 90ms);
  }

  .js [data-split]:not([data-in]) .word__in {
    opacity: 0;
    transform: translateY(110%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .px img,
  .fullbleed img {
    height: 100%;
    transform: none;
  }

  .work__title {
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
