/* ==========================================================================
   Puutyö Ra-Pe — sivuston tyylit
   Vanilla CSS, ei buildia. Toimii myös file://-protokollalla.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fontit (self-hosted, latin + latin-ext)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fraunces-v38-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/fraunces-v38-latin_latin-ext-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fraunces-v38-latin_latin-ext-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/schibsted-grotesk-v7-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/schibsted-grotesk-v7-latin_latin-ext-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/schibsted-grotesk-v7-latin_latin-ext-700.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Design-tokenit
   -------------------------------------------------------------------------- */

:root {
  --paper: #f5f0e6;
  --paper-deep: #ebe3d3;
  --ink: #2b211a;
  --ink-soft: #6b5d51;
  --green: #22713a;
  --green-deep: #0f4a24;
  --oak: #b98b52;
  --line: rgba(43, 33, 26, 0.14);
  --line-dark: rgba(245, 240, 230, 0.16);

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --shell: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4rem, 9vw, 8rem);
  --radius: 6px;
  --radius-card: 12px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
}

/* --------------------------------------------------------------------------
   3. Perusta
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 0.42vw + 0.98rem, 1.125rem);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--green);
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

p,
figure,
blockquote {
  margin: 0;
}

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

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   4. Typografian apuluokat
   -------------------------------------------------------------------------- */

.h1 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.h1--hero {
  font-size: clamp(2.5rem, 4.6vw, 4.4rem);
}

.h2 {
  font-size: clamp(1.85rem, 3.4vw, 3rem);
}

.h3 {
  font-size: clamp(1.3rem, 1.6vw, 1.6rem);
  line-height: 1.18;
}

.lead {
  font-size: clamp(1.2rem, 1.5vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34ch;
}

.prose {
  max-width: 66ch;
}

.prose p + p {
  margin-top: 1.15em;
}

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

.text-big {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.55;
}

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

.mt-body {
  margin-top: 1.5rem;
}

.mt-link {
  margin-top: 1.75rem;
}

.stack > * + * {
  margin-top: var(--stack, 1.5rem);
}

/* Tekstilinkki, jonka alleviivaus kasvaa vasemmalta */
.tlink {
  position: relative;
  display: inline-block;
  font-weight: 500;
  color: var(--green);
  padding-bottom: 2px;
}

.tlink::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.tlink:hover::after,
.tlink:focus-visible::after {
  animation: tlink-sweep 0.5s var(--ease-out);
}

@keyframes tlink-sweep {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

/* --------------------------------------------------------------------------
   5. Napit
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fbf8f2;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out), color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out);
}

.btn:hover {
  background: var(--green-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(43, 33, 26, 0.18);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn--ghost:hover {
  background: transparent;
  color: var(--green-deep);
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(43, 33, 26, 0.12);
}

.btn--onink {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-dark);
}

.btn--onink:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fbf8f2;
}

.btn--sm {
  min-height: 44px;
  padding: 0 1.25rem;
  font-size: 0.95rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* --------------------------------------------------------------------------
   6. Vuosirengas-motiivi
   -------------------------------------------------------------------------- */

.rings {
  position: absolute;
  pointer-events: none;
  color: var(--oak);
  overflow: visible;
}

.rings path,
.rings circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0.55;
}

.rings--draw path,
.rings--draw circle {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  transition: stroke-dashoffset 1.6s var(--ease-out);
}

.rings--draw.is-in path,
.rings--draw.is-in circle {
  stroke-dashoffset: 0;
}

.rings--draw path:nth-child(2),
.rings--draw circle:nth-child(2) {
  transition-delay: 0.14s;
}

.rings--draw path:nth-child(3),
.rings--draw circle:nth-child(3) {
  transition-delay: 0.28s;
}

.rings--draw path:nth-child(4),
.rings--draw circle:nth-child(4) {
  transition-delay: 0.42s;
}

.rings--draw path:nth-child(5),
.rings--draw circle:nth-child(5) {
  transition-delay: 0.56s;
}

/* --------------------------------------------------------------------------
   7. Navigaatio
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--nav-h);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}

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

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 2.1rem);
  margin-left: auto;
}

.nav__link {
  position: relative;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.4rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

.nav__link[aria-current='page'] {
  color: var(--green-deep);
}

.nav__link[aria-current='page']::after {
  background: var(--green);
  transform: scaleX(1);
}

.nav__cta {
  margin-left: clamp(0.75rem, 2vw, 1.75rem);
  flex: none;
}

.nav__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
}

.nav__burger span {
  position: relative;
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), background 0.2s linear;
}

.nav__burger span::before,
.nav__burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out);
}

.nav__burger span::before {
  top: -6px;
}

.nav__burger span::after {
  top: 6px;
}

.nav__burger[aria-expanded='true'] span {
  background: transparent;
}

.nav__burger[aria-expanded='true'] span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav__burger[aria-expanded='true'] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: calc(var(--nav-h) + 2rem) var(--gutter) 3rem;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out),
    visibility 0.35s;
}

.menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.menu a {
  font-family: var(--display);
  font-size: clamp(2rem, 8vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.menu a[aria-current='page'] {
  color: var(--green-deep);
}

.menu__foot {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 1rem;
}

.menu__foot a {
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--green);
  border: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   8. Sektiot ja pinnat
   -------------------------------------------------------------------------- */

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

.section--tight {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.surface-deep {
  background: var(--paper-deep);
}

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

.surface-ink h2,
.surface-ink h3 {
  color: var(--paper);
}

.surface-ink .muted {
  color: rgba(245, 240, 230, 0.72);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   9. Hero (etusivu)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
}

/* Etusivun taysleveä taustakuvahero */
.hero--full {
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  min-height: min(calc(100svh - var(--nav-h)), 820px);
  background: var(--ink);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(43, 33, 26, 0.9) 0%,
      rgba(43, 33, 26, 0.84) 50%,
      rgba(43, 33, 26, 0.6) 72%,
      rgba(43, 33, 26, 0.18) 100%
    ),
    linear-gradient(
      to top,
      rgba(43, 33, 26, 0.68) 0%,
      rgba(43, 33, 26, 0.28) 34%,
      rgba(43, 33, 26, 0) 62%
    );
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.hero__text {
  max-width: 46rem;
}

.hero--full .h1--hero {
  color: var(--paper);
  text-wrap: balance;
}

.hero--full .lead {
  margin-top: 1.4rem;
  max-width: 38ch;
  color: var(--paper);
  opacity: 0.94;
}

.hero--full .btn-row {
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
}

.hero--full .btn--ghost {
  color: var(--paper);
  border-color: rgba(245, 240, 230, 0.6);
  background: rgba(43, 33, 26, 0.28);
}

.hero--full .btn--ghost:hover {
  color: var(--paper);
  border-color: var(--paper);
  background: rgba(43, 33, 26, 0.5);
  box-shadow: 0 12px 28px rgba(43, 33, 26, 0.32);
}

.hero__rings {
  top: clamp(-70px, -4vw, -40px);
  right: clamp(-70px, -4vw, -40px);
  width: clamp(180px, 20vw, 280px);
  height: clamp(180px, 20vw, 280px);
  z-index: 2;
  color: var(--oak);
  opacity: 0.85;
}

/* Sisasivujen matalampi taysleveä hero (sama kasittely kuin etusivulla) */
.hero--page {
  min-height: min(66svh, 640px);
}

.hero--page .hero__inner {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.hero--page .hero__text {
  max-width: 44rem;
}

.hero--page h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  color: var(--paper);
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: manual;
}

.hero--page .lead {
  margin-top: 1.3rem;
  max-width: 40ch;
  color: var(--paper);
  opacity: 0.94;
}

.hero--page p.prose {
  margin-top: 1.15rem;
  max-width: 54ch;
  color: var(--paper);
  opacity: 0.88;
}

.hero--page .btn-row {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.hero--page .hero__bg {
  object-position: center 45%;
}

.hero--page.hero--terassi .hero__bg {
  object-position: center 52%;
}

/* --------------------------------------------------------------------------
   10. Split-osiot
   -------------------------------------------------------------------------- */

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

.split--narrow {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
}

.split__media img {
  width: 100%;
  border-radius: var(--radius);
}

.figure-stack {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.figure-stack--offset {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.figure-stack--offset > :last-child {
  margin-top: clamp(1.5rem, 5vw, 3.5rem);
}

.figure-stack img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   11. Iso sitaatti (etusivun hetki)
   -------------------------------------------------------------------------- */

.quote {
  position: relative;
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding-block: clamp(4.5rem, 10vw, 9rem);
}

.quote .rings {
  top: 50%;
  left: 50%;
  width: min(150vw, 1100px);
  height: min(150vw, 1100px);
  transform: translate(-50%, -50%);
  opacity: 0.42;
}

.quote__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.quote__mark {
  display: block;
  font-family: var(--display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 0.6;
  color: var(--oak);
  margin-bottom: 0.35em;
}

.quote blockquote {
  margin: 0 auto;
  max-width: 15em;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.quote figcaption {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--body);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.66);
}

/* --------------------------------------------------------------------------
   12. Kolme lupausta
   -------------------------------------------------------------------------- */

.promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
}

.promise {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.promise h3 {
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
}

.promise p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* --------------------------------------------------------------------------
   13. Työnäytteet-nosto (asymmetrinen grid)
   -------------------------------------------------------------------------- */

.works {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.works figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.works img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.works figure:hover img {
  transform: scale(1.03);
}

.works figure:nth-child(1) {
  grid-column: span 4;
  aspect-ratio: 16 / 9;
}

.works figure:nth-child(2) {
  grid-column: span 2;
  aspect-ratio: 3 / 4;
}

.works figure:nth-child(3) {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.works figure:nth-child(4) {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.works figure:nth-child(5) {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.works figure:nth-child(6) {
  grid-column: span 6;
  aspect-ratio: 16 / 7;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.section__head p {
  color: var(--ink-soft);
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   14. Kaksi tekstipalstaa
   -------------------------------------------------------------------------- */

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

.duo__line {
  background: var(--line);
  align-self: stretch;
  min-height: 100%;
}

.duo h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
}

.duo p {
  margin-top: 1.25rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   15. Palvelualueet
   -------------------------------------------------------------------------- */

.areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
}

.area img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}

.area h3 {
  margin-top: 1.5rem;
  font-size: clamp(1.3rem, 1.7vw, 1.65rem);
}

.area p {
  margin-top: 0.85rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   16. Prosessi
   -------------------------------------------------------------------------- */

.steps {
  border-top: 1px solid var(--line);
}

.steps li {
  border-bottom: 1px solid var(--line);
  padding-block: 1.35rem;
}

.steps h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.steps p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   17. Galleria + suodattimet + lightbox
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.filter {
  min-height: 40px;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out),
    background 0.25s var(--ease-out);
}

.filter:hover {
  color: var(--ink);
  border-color: rgba(43, 33, 26, 0.35);
}

.filter[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.gallery {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  columns: 4;
  column-gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.gallery--captions {
  columns: 3;
}

.gallery__item {
  break-inside: avoid;
  margin: 0 0 clamp(0.75rem, 1.6vw, 1.25rem);
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
  font-family: var(--body);
  color: inherit;
}

.gallery__item[hidden] {
  display: none;
}

.gallery__frame {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.gallery__item img {
  width: 100%;
  transition: transform 0.6s var(--ease-out);
}

.gallery__item:hover img {
  transform: scale(1.03);
}

.gallery__cap {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
}

.gallery__empty {
  margin-top: 2rem;
  color: var(--ink-soft);
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(23, 17, 13, 0.94);
  color: var(--paper);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(23, 17, 13, 0.94);
}

.lightbox__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1rem, 5vw, 5rem);
}

.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100% - 3rem);
  width: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__cap {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(245, 240, 230, 0.78);
  text-align: center;
}

.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(43, 33, 26, 0.5);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.lightbox__btn:hover {
  background: var(--green);
  border-color: var(--green);
}

.lightbox__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.lightbox__prev {
  left: clamp(0.6rem, 2vw, 2rem);
}

.lightbox__next {
  right: clamp(0.6rem, 2vw, 2rem);
}

.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.6rem, 2vw, 2rem);
  transform: none;
}

.lightbox__count {
  position: absolute;
  top: clamp(1.35rem, 2.6vw, 2.1rem);
  left: clamp(1rem, 5vw, 3rem);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: rgba(245, 240, 230, 0.66);
}

/* --------------------------------------------------------------------------
   18. Lomake
   -------------------------------------------------------------------------- */

.formwrap {
  background: var(--paper-deep);
  border-radius: var(--radius-card);
  padding: clamp(1.75rem, 3.5vw, 3rem);
}

.surface-deep .formwrap {
  background: var(--paper);
}

.form {
  display: grid;
  gap: 1.6rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.55rem 0 0.6rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.5;
  transition: border-color 0.25s var(--ease-out);
}

.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--green);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-soft);
  opacity: 1;
}

.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-bottom-color: #9d2f22;
}

.field__err {
  font-size: 0.9rem;
  color: #8f2b1f;
  min-height: 0;
}

.field__err[hidden] {
  display: none;
}

.form__note {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form__error {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: #8f2b1f;
}

.form__error[hidden] {
  display: none;
}

.form__success {
  display: none;
}

.form__success.is-visible {
  display: block;
}

.form__success h3 {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
}

.form__success p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   19. Yhteystiedot
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact dl {
  margin: 0;
}

.contact__row + .contact__row {
  margin-top: 1.85rem;
  padding-top: 1.85rem;
  border-top: 1px solid var(--line);
}

.contact dt {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.contact dd {
  margin: 0.4rem 0 0;
  font-size: 1.1rem;
}

.contact__phone {
  font-family: var(--display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  display: inline-block;
}

.contact__phone:hover {
  color: var(--green-deep);
}

.contact__mail {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 500;
  word-break: break-word;
}

.contact__addr {
  font-style: normal;
  font-size: 1.1rem;
  line-height: 1.6;
}

.wideimg {
  position: relative;
  overflow: hidden;
}

.wideimg img {
  width: 100%;
  height: clamp(260px, 40vw, 460px);
  object-fit: cover;
  filter: brightness(0.82) saturate(0.95);
}

/* --------------------------------------------------------------------------
   20. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.75fr);
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: start;
}

.footer__cta h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  max-width: 22ch;
}

.footer__cta p {
  margin-top: 1.1rem;
  color: rgba(245, 240, 230, 0.76);
  max-width: 42ch;
}

.footer__cta .btn-row {
  margin-top: 1.75rem;
}

.footer__title {
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.56);
  margin-bottom: 1rem;
}

.footer address {
  font-style: normal;
  line-height: 1.8;
  color: rgba(245, 240, 230, 0.84);
}

.footer a {
  color: rgba(245, 240, 230, 0.84);
}

.footer a:hover {
  color: var(--paper);
}

.footer__nav li + li {
  margin-top: 0.55rem;
}

.footer__badge {
  margin-top: 1.75rem;
  max-width: 120px;
}

.footer__badge img {
  width: 100%;
  border-radius: 4px;
}

.footer__bar {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  justify-content: space-between;
  font-size: 0.9rem;
  color: rgba(245, 240, 230, 0.6);
}

/* --------------------------------------------------------------------------
   21. Revealit
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-stagger.is-in > * {
  opacity: 1;
  transform: none;
}

.reveal-stagger.is-in > *:nth-child(2) {
  transition-delay: 0.08s;
}
.reveal-stagger.is-in > *:nth-child(3) {
  transition-delay: 0.16s;
}
.reveal-stagger.is-in > *:nth-child(4) {
  transition-delay: 0.24s;
}
.reveal-stagger.is-in > *:nth-child(5) {
  transition-delay: 0.32s;
}
.reveal-stagger.is-in > *:nth-child(6) {
  transition-delay: 0.4s;
}

.hero-in {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-rise 0.75s var(--ease-out) forwards;
}

.hero-in--2 {
  animation-delay: 0.1s;
}

.hero-in--3 {
  animation-delay: 0.2s;
}

.hero__bg {
  opacity: 0;
  transform: scale(1.03);
  animation: hero-fade 0.9s var(--ease-out) 0.05s forwards;
}

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-fade {
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   22. Responsiivisuus
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .gallery {
    columns: 3;
  }
}

@media (max-width: 980px) {
  :root {
    --nav-h: 68px;
  }

  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__burger {
    display: inline-flex;
  }

  .hero--full {
    min-height: max(82svh, 520px);
  }

  .hero--page {
    min-height: max(70svh, 470px);
  }

  .hero__scrim {
    background:
      linear-gradient(
        90deg,
        rgba(43, 33, 26, 0.82) 0%,
        rgba(43, 33, 26, 0.72) 60%,
        rgba(43, 33, 26, 0.55) 100%
      ),
      linear-gradient(
        to top,
        rgba(43, 33, 26, 0.8) 0%,
        rgba(43, 33, 26, 0.45) 45%,
        rgba(43, 33, 26, 0.12) 100%
      );
  }

  .hero__rings {
    top: -44px;
    right: -44px;
    width: 160px;
    height: 160px;
  }

  .split,
  .contact {
    grid-template-columns: 1fr;
  }

  .split--narrow {
    grid-template-columns: 1fr;
  }

  .duo {
    grid-template-columns: 1fr;
  }

  .duo__line {
    height: 1px;
    min-height: 1px;
  }

  .promises {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__cta {
    grid-column: 1 / -1;
  }

  .gallery--captions {
    columns: 2;
  }
}

@media (max-width: 720px) {
  .gallery {
    columns: 2;
  }

  .areas {
    grid-template-columns: 1fr;
  }

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

  .works figure:nth-child(1) {
    grid-column: span 2;
    aspect-ratio: 16 / 10;
  }

  .works figure:nth-child(2),
  .works figure:nth-child(3),
  .works figure:nth-child(4),
  .works figure:nth-child(5) {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
  }

  .works figure:nth-child(6) {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
  }

  .figure-stack--offset {
    grid-template-columns: 1fr;
  }

  .figure-stack--offset > :last-child {
    margin-top: 0;
  }

  .section__head {
    align-items: start;
  }
}

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

  .gallery--captions {
    columns: 1;
  }

  .btn {
    width: 100%;
  }

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

  .lightbox__btn {
    width: 44px;
    height: 44px;
  }

  .lightbox__prev {
    left: 0.5rem;
  }

  .lightbox__next {
    right: 0.5rem;
  }
}

@media (max-width: 400px) {
  .gallery {
    columns: 1;
  }
}

/* --------------------------------------------------------------------------
   23. Liikkeen vähentäminen
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  .hero-in,
  .hero__bg {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .rings--draw path,
  .rings--draw circle {
    stroke-dashoffset: 0;
  }
}

@media print {
  .nav,
  .menu,
  .footer__cta .btn-row,
  .lightbox {
    display: none;
  }
}
