/* Sydänmänty® – shared styles for index.html and ukk.html
   World: Finnish architecture monograph. Large photo plates on warm paper,
   hairline rules, one measured drawing, brand olive/green as ink. */

@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* brand (client palette + sampled booth olive) */
  --forest: #3f5927;        /* tummanvihreä, headings and deep fields */
  --forest-deep: #2e411c;   /* footer */
  --moss: #726f44;          /* brand olive, text-safe on paper: links, buttons */
  --olive: #95916a;         /* Pantone 5773 C, fields, rules, bark */
  --sand: #e5d7c1;          /* brand beige */
  --linen: #eadfcd;         /* beige 80 %, as in the logo */

  /* paper and ink */
  --paper: #f6f2ea;
  --paper-2: #efe8db;
  --ink: #2a2b22;
  --ink-soft: #5b5a49;
  --rule: rgb(114 111 68 / 0.28);
  --on-forest: #eadfcd;
  --on-forest-soft: #cfccab;
  --rule-on-forest: rgb(234 223 205 / 0.22);

  /* type */
  --font: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(3rem, 1.9rem + 4.6vw, 6rem);
  --fs-h2: clamp(2.25rem, 1.55rem + 2.6vw, 4rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.45vw, 1.5rem);
  --fs-lead: clamp(1.25rem, 1.08rem + 0.7vw, 1.75rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-caption: 0.8125rem;

  /* space */
  --margin: clamp(20px, 4.6vw, 72px);
  --gutter: clamp(16px, 2.2vw, 32px);
  --section: clamp(96px, 11vw, 176px);
  --max: 1440px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 {
  color: var(--forest);
  font-weight: 300;
  text-wrap: balance;
}
p { text-wrap: pretty; hyphens: auto; hyphenate-limit-chars: 12 5 5; }
.nowrap { white-space: nowrap; }

a {
  color: var(--moss);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgb(114 111 68 / 0.45);
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover { color: var(--forest); text-decoration-color: currentColor; }

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

::selection { background: var(--forest); color: var(--linen); }

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

.skip-link {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--forest);
  color: var(--linen);
  border-radius: 999px;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Type roles ---------- */
.display {
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.032em;
  font-weight: 300;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.03;
  letter-spacing: -0.028em;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 500;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.42;
  font-weight: 300;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.prose { max-width: 62ch; }
.prose > * + * { margin-top: 1.1em; }


/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--linen);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-soft), transform 0.25s var(--ease-soft);
}
.btn:hover { background: var(--moss); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: var(--fs-small); }
.btn--light { background: var(--linen); color: var(--forest); }
.btn--light:hover { background: var(--paper); color: var(--forest); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: var(--fs-small);
  text-decoration: none;
  color: var(--forest);
}
.arrow-link svg {
  width: 18px; height: 18px;
  transition: transform 0.3s var(--ease-out);
}
.arrow-link span {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.2s;
}
.arrow-link:hover span { text-decoration-color: currentColor; }
.arrow-link:hover svg { transform: translateX(4px); }
.arrow-link--down:hover svg { transform: translateY(3px); }
.arrow-link--ext:hover svg { transform: translate(2px, -2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgb(246 242 234 / 0);
  transition: background-color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}
.site-header.is-scrolled {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { position: relative; z-index: 2; display: inline-flex; color: var(--forest); padding-block: 8px; }
.brand__logo {
  display: block;
  width: clamp(168px, 14vw, 200px);
  height: auto;
  aspect-ratio: 1082.67 / 151.32;
}

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.site-nav ul { display: flex; gap: clamp(18px, 2.2vw, 34px); }
.site-nav ul a {
  position: relative;
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
}
.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--moss);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.site-nav ul a:hover::after,
.site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav ul a[aria-current="page"] { color: var(--forest); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 12px;
  border: 0;
  background: none;
  color: var(--forest);
  font: 600 0.9375rem/1 var(--font);
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 22px; height: 12px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }

@media (max-width: 959px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; position: relative; z-index: 2; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 40px;
    padding: calc(var(--header-h) + 32px) var(--margin) 48px;
    background: var(--paper);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s var(--ease-soft), visibility 0s linear 0.35s;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s var(--ease-soft);
  }
  .site-nav ul { flex-direction: column; gap: 6px; }
  .site-nav ul a {
    display: inline-block;
    font-size: clamp(2.25rem, 10vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--forest);
  }
  .site-nav ul a::after { display: none; }
  .site-nav .btn { min-height: 52px; padding: 0 26px; font-size: var(--fs-small); }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { background: var(--paper); box-shadow: none; }
}

/* ---------- Plates (photographs) ---------- */
.plate {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Plates settle into place as they enter the viewport (scroll-driven, no JS, content always visible) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .plate[data-settle] img {
      animation: plate-settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    .plate[data-settle] {
      animation: plate-open linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}
@keyframes plate-settle {
  from { transform: scale(1.09); }
  to { transform: scale(1); }
}
@keyframes plate-open {
  from { clip-path: inset(7% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(28px, 5vw, 72px); }
.hero__text {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 28px;
  align-items: end;
}
.hero__title { grid-column: 1 / span 8; }
.hero__title .line { display: block; }
.hero__aside { grid-column: 9 / -1; padding-bottom: 0.6rem; }
.hero__lede { max-width: 38ch; color: var(--ink-soft); }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 26px;
}

.hero__figure {
  margin-top: clamp(40px, 5vw, 72px);
  /* plate bleeds off the right edge, aligned to the text column on the left */
  padding-left: max(var(--margin), calc((100vw - var(--max)) / 2 + var(--margin)));
}
.hero__plate { height: clamp(380px, 64vh, 760px); }
.hero__plate img { object-position: 50% 62%; }

@media (prefers-reduced-motion: no-preference) {
  .hero__title .line,
  .hero__aside {
    animation: rise 1.1s var(--ease-out) both;
  }
  .hero__title .line:nth-child(2) { animation-delay: 0.12s; }
  .hero__aside { animation-delay: 0.38s; }
  .hero__plate { animation: unveil 1.6s var(--ease-out) 0.15s both; }
  .hero__plate img { animation: settle 2.2s var(--ease-out) 0.15s both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.45em); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes unveil {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes settle {
  from { transform: scale(1.14); }
  to { transform: scale(1); }
}

@media (max-width: 959px) {
  .hero__title,
  .hero__aside { grid-column: 1 / -1; }
  .hero__aside { padding-bottom: 0; }
  .hero__figure { padding-left: 0; }
  .hero__plate { height: clamp(320px, 58vh, 620px); }
}
@media (max-width: 719px) {
  .hero__plate img { object-position: 22% 62%; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* Story: "Tukin tumma sydän" */
.story__head { align-items: start; row-gap: 32px; }
.story__head .h2 { grid-column: 1 / span 5; }
.story__head .lead { grid-column: 7 / -1; padding-top: 0.5rem; }

.story__drawing {
  margin-top: clamp(72px, 9vw, 144px);
  align-items: center;
  row-gap: 48px;
}
.story__drawing figure { grid-column: 1 / span 7; }
.story__drawing .prose { grid-column: 9 / -1; }

.log-plate {
  position: relative;
  background: var(--paper-2);
  padding: clamp(24px, 4vw, 56px);
}
.log-plate__art { position: relative; }
.log-plate__art img { width: 100%; }
.log-plate__label {
  position: absolute;
  transform: translateY(-50%);
  font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--forest);
  white-space: nowrap;
  padding-left: 8px;
}
.log-plate__label small {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.86em;
}

.story__close {
  margin-top: clamp(72px, 9vw, 144px);
  row-gap: 48px;
}
.story__close .portrait { grid-column: 1 / span 5; }
.story__close .portrait .plate { aspect-ratio: 4 / 5; }
.story__close-text {
  grid-column: 7 / -1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
}
.statement {
  font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.875rem);
  line-height: 1.12;
  letter-spacing: -0.024em;
  font-weight: 300;
  color: var(--forest);
  max-width: 20ch;
  text-wrap: balance;
}
.story__close-text .plate { aspect-ratio: 3 / 2; }

@media (max-width: 959px) {
  .story__head .h2,
  .story__head .lead,
  .story__drawing figure,
  .story__drawing .prose,
  .story__close .portrait,
  .story__close-text { grid-column: 1 / -1; }
  .story__close-text { gap: 40px; }
}
@media (max-width: 719px) {
  .log-plate { padding: 16px 12px 16px 16px; }
  .log-plate__label {
    white-space: normal;
    max-width: 27%;
    padding-left: 5px;
    font-size: var(--fs-caption);
    line-height: 1.15;
    hyphens: manual;
  }
  .log-plate__label small { display: none; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .story__drawing figure { grid-column: 1 / span 7; }
  .story__drawing .prose { grid-column: 8 / -1; }
}

/* Properties */
.props { background: var(--paper-2); padding-block: var(--section); }
.props__grid { row-gap: 56px; align-items: start; }
.props__figure { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + 32px); }
.props__figure .plate { aspect-ratio: 4 / 5; }
.props__body { grid-column: 7 / -1; }
.props__list { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule); }
.prop {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  column-gap: clamp(20px, 2.4vw, 40px);
  padding-block: 24px 26px;
  border-bottom: 1px solid var(--rule);
}
.prop__term { display: flex; align-items: flex-start; gap: 14px; }
.prop__icon {
  flex: none;
  width: 30px; height: 30px;
  margin-top: 1px;
  color: var(--moss);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.prop__icon .fill { fill: currentColor; stroke: none; opacity: 0.22; }
.prop h3 { font-size: 1.25rem; }
.prop p { color: var(--ink-soft); max-width: 48ch; padding-top: 2px; }
.props__more { margin-top: 40px; max-width: 46ch; }
.props__more p { color: var(--ink-soft); margin-bottom: 14px; }

@media (max-width: 959px) {
  .props__figure { position: static; grid-column: 1 / -1; }
  .props__figure .plate { aspect-ratio: 4 / 3; }
  .props__body { grid-column: 1 / -1; }
  .prop { grid-template-columns: 1fr; row-gap: 8px; }
  .prop p { padding-left: 44px; }
}

/* Full-bleed interlude */
.interlude { padding-top: var(--section); }
.interlude .plate { height: clamp(360px, 82vh, 920px); }
.interlude .plate img { object-position: 50% 58%; }

/* Products */
.products__head { align-items: end; row-gap: 24px; }
.products__head .h2 { grid-column: 1 / span 7; }
.products__head p { grid-column: 9 / -1; color: var(--ink-soft); max-width: 40ch; }

.compare {
  --pos: 50%;
  position: relative;
  margin-top: clamp(40px, 5vw, 72px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 30%;
  pointer-events: none;
}
.compare__top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare__line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgb(42 43 34 / 0.08);
  pointer-events: none;
}
.compare__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest);
  box-shadow: 0 6px 20px rgb(42 43 34 / 0.22), 0 1px 3px rgb(42 43 34 / 0.18);
  transition: transform 0.3s var(--ease-out);
}
.compare__knob svg { width: 26px; height: 26px; }
.compare:hover .compare__knob { transform: scale(1.06); }
.compare:has(.compare__range:focus-visible) .compare__knob {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}
.compare__tag {
  position: absolute;
  top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(246 242 234 / 0.9);
  color: var(--forest);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 0.3s;
}
.compare__tag--a { left: 18px; }
.compare__tag--b { right: 18px; }
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.compare__range::-webkit-slider-thumb { -webkit-appearance: none; width: 56px; height: 100vh; }
.compare__range::-moz-range-thumb { width: 56px; height: 100vh; border: 0; }


.product-list {
  margin-top: clamp(56px, 7vw, 104px);
  row-gap: 64px;
}
.product { grid-column: span 6; padding-right: clamp(0px, 3vw, 48px); }
.product h3 {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.product h3 span { display: block; color: var(--moss); }
.product p { margin-top: 18px; max-width: 54ch; }
.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  margin-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-small);
}
.specs dt,
.specs dd { padding-block: 12px; border-bottom: 1px solid var(--rule); }
.specs dt { color: var(--ink-soft); padding-right: 32px; }
.specs dd { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.product .arrow-link { margin-top: 26px; }

@media (max-width: 959px) {
  .products__head .h2,
  .products__head p { grid-column: 1 / -1; }
  .compare { aspect-ratio: 4 / 3; }
}
@media (max-width: 719px) {
  .product { grid-column: 1 / -1; padding-right: 0; }
  .compare { aspect-ratio: 4 / 5; }
  .compare__tag { top: 12px; padding: 6px 11px; }
  .compare__tag--a { left: 12px; }
  .compare__tag--b { right: 12px; }
}

/* References */
.refs__head { align-items: end; row-gap: 20px; }
.refs__head .h2 { grid-column: 1 / span 7; }
.refs__head .project { grid-column: 9 / -1; }
.project__name { color: var(--forest); font-weight: 600; }
.project__meta { color: var(--ink-soft); font-size: var(--fs-small); }

.gallery {
  margin-top: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
.gallery__item { margin: 0; }
.gallery__item a { display: block; color: inherit; text-decoration: none; cursor: zoom-in; }
.gallery__item .plate img { transition: transform 1.1s var(--ease-out); }
.gallery__item a:hover .plate img { transform: scale(1.035); }
.gallery__item a:focus-visible { outline-offset: 6px; }

.g-1 { grid-column: 1 / span 8; }
.g-1 .plate { aspect-ratio: 16 / 10; }
.g-2 { grid-column: 9 / span 4; }
.g-2 .plate { aspect-ratio: 3 / 4; }
.g-3 { grid-column: 2 / span 4; align-self: start; }
.g-3 .plate { aspect-ratio: 3 / 4; }
.g-4 { grid-column: 7 / span 6; align-self: start; margin-top: clamp(48px, 9vw, 160px); }
.g-4 .plate { aspect-ratio: 3 / 2; }
.g-5 { grid-column: 1 / span 4; align-self: start; }
.g-5 .plate { aspect-ratio: 3 / 4; }
.g-6 { grid-column: 6 / span 3; align-self: start; margin-top: clamp(64px, 12vw, 200px); }
.g-6 .plate { aspect-ratio: 1 / 1; }
.g-7 { grid-column: 10 / span 3; align-self: start; margin-top: clamp(24px, 4vw, 64px); }
.g-7 .plate { aspect-ratio: 2 / 3; }

@media (max-width: 959px) {
  .refs__head .h2,
  .refs__head .project { grid-column: 1 / -1; }
  .g-1, .g-4 { grid-column: 1 / -1; margin-top: 0; }
  .g-2, .g-3, .g-5, .g-6 { grid-column: span 6; margin-top: 0; }
  .g-7 { grid-column: 1 / -1; margin-top: 0; }
  .g-7 .plate { aspect-ratio: 3 / 2; }
}
@media (max-width: 719px) {
  .gallery { row-gap: 32px; column-gap: 14px; }
  .g-2, .g-3, .g-5, .g-6 { grid-column: span 6; }
}

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #1f2118;
  color: var(--linen);
}
.lightbox::backdrop { background: rgb(31 33 24 / 0.6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: fade 0.35s var(--ease-soft); }
.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--margin);
  font-size: var(--fs-small);
}
.lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 0 var(--margin);
}
.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100dvh - 176px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  padding: 16px var(--margin) 22px;
}
.lightbox__nav { display: flex; gap: 10px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid rgb(234 223 205 / 0.3);
  border-radius: 50%;
  background: none;
  color: var(--linen);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: rgb(234 223 205 / 0.12); border-color: rgb(234 223 205 / 0.6); }
.icon-btn svg { width: 20px; height: 20px; }
.lightbox :focus-visible { outline-color: var(--linen); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Contact (forest field) ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--forest);
  color: var(--on-forest);
  padding-block: var(--section);
}
.contact__mark {
  position: absolute;
  right: -6vw;
  bottom: -14vw;
  width: clamp(360px, 46vw, 720px);
  height: auto;
  aspect-ratio: 490.8 / 545.7;
  color: color-mix(in srgb, var(--forest) 90%, var(--linen));
  pointer-events: none;
}
.contact .grid { position: relative; row-gap: 56px; align-items: start; }
.contact__head { grid-column: 1 / span 6; }
.contact h2 { color: var(--linen); }
.contact__intro { color: var(--on-forest-soft); margin-top: 24px; max-width: 40ch; }
.contact__intro a { color: var(--linen); text-decoration-color: rgb(234 223 205 / 0.45); }
.contact__intro a:hover { color: var(--paper); text-decoration-color: currentColor; }
.contact__people { grid-column: 8 / -1; border-top: 1px solid var(--rule-on-forest); }
.person { padding-block: 28px; border-bottom: 1px solid var(--rule-on-forest); }
.person__name { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.01em; color: var(--linen); }
.person__links { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 10px; }
.person__links a {
  color: var(--on-forest);
  font-size: 1.0625rem;
  text-decoration-color: rgb(234 223 205 / 0.35);
  font-variant-numeric: tabular-nums;
}
.person__links a:hover { color: var(--paper); text-decoration-color: currentColor; }
.contact :focus-visible { outline-color: var(--linen); }

@media (max-width: 959px) {
  .contact__head,
  .contact__people { grid-column: 1 / -1; }
  .contact__mark { right: -30vw; bottom: -20vw; width: 90vw; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-deep);
  color: var(--on-forest-soft);
  padding-block: clamp(64px, 7vw, 104px) 40px;
  font-size: var(--fs-small);
}
.site-footer .grid { row-gap: 48px; }
.sources { grid-column: 1 / span 8; }
.sources h2 {
  font-size: var(--fs-h3);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--linen);
}
.sources ol { margin-top: 20px; border-top: 1px solid var(--rule-on-forest); }
.sources li { padding-block: 16px; border-bottom: 1px solid var(--rule-on-forest); }
.sources a {
  color: var(--linen);
  font-weight: 500;
  text-decoration-color: rgb(234 223 205 / 0.3);
}
.sources a:hover { color: var(--paper); text-decoration-color: currentColor; }
.sources a svg { display: inline-block; width: 0.9em; height: 0.9em; margin-left: 0.25em; vertical-align: -0.05em; }
.sources .src-meta { display: block; margin-top: 4px; color: var(--on-forest-soft); }
.footer-nav { grid-column: 10 / -1; }
.footer-nav ul { display: grid; gap: 10px; }
.footer-nav a { color: var(--linen); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--linen); }

.footer-base {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--rule-on-forest);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.by-icoma {
  display: block;
  width: 260px;
  height: auto;
}

@media (max-width: 959px) {
  .sources,
  .footer-nav { grid-column: 1 / -1; }
}

@media (forced-colors: active) {
  .brand__logo { color: CanvasText; }
  .contact__mark { display: none; }
}

/* ---------- UKK page ---------- */
.faq-hero { padding-top: clamp(40px, 6vw, 96px); padding-bottom: clamp(56px, 7vw, 112px); }
.faq-hero .grid { row-gap: 32px; align-items: end; }
.faq-hero h1 { grid-column: 1 / span 7; }
.faq-hero .faq-hero__intro { grid-column: 9 / -1; }
.faq-hero__intro p { color: var(--ink-soft); }
.faq-hero__intro a { font-weight: 600; }

.faq-index {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.faq-index a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--forest);
  font-weight: 500;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.faq-index a:hover { background: var(--paper-2); border-color: var(--moss); }
.faq-index a span { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 400; }

.faq-group { padding-bottom: clamp(72px, 9vw, 136px); }
.faq-group .grid { row-gap: 32px; align-items: start; }
.faq-group__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 32px); }
.faq-group__head .plate { margin-top: 28px; aspect-ratio: 4 / 3; }
.faq-list { grid-column: 6 / -1; border-top: 1px solid var(--rule); }

.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  display: grid;
  grid-template-columns: 1fr 32px;
  gap: 24px;
  align-items: center;
  padding-block: 24px;
  cursor: pointer;
  list-style: none;
  color: var(--forest);
  font-size: var(--fs-h3);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .faq-item__q { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: var(--rule); }
.faq-item__toggle {
  position: relative;
  width: 32px; height: 32px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  transition: background-color 0.25s, border-color 0.25s, transform 0.45s var(--ease-out);
}
.faq-item__toggle::before,
.faq-item__toggle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 1.5px;
  margin: -0.75px 0 0 -6px;
  background: var(--forest);
}
.faq-item__toggle::after { transform: rotate(90deg); transition: transform 0.45s var(--ease-out); }
.faq-item[open] .faq-item__toggle { background: var(--forest); border-color: var(--forest); }
.faq-item[open] .faq-item__toggle::before,
.faq-item[open] .faq-item__toggle::after { background: var(--linen); }
.faq-item[open] .faq-item__toggle::after { transform: rotate(0deg); }

.faq-item__answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 36px;
}
.faq-item__answer .prose { color: var(--ink); }
.faq-item__answer--figure { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.faq-item__answer figure .plate { aspect-ratio: 4 / 3; }
.faq-item__answer figure.log-figure { background: var(--paper-2); padding: 16px; }

.todo {
  padding: 18px 20px;
  border: 1px dashed var(--olive);
  background: rgb(149 145 106 / 0.08);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}
.todo strong { display: block; color: var(--moss); font-weight: 600; margin-bottom: 4px; }
.todo--figure { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; }

@supports selector(::details-content) {
  @media (prefers-reduced-motion: no-preference) {
    .faq-item { interpolate-size: allow-keywords; }
    .faq-item::details-content {
      height: 0;
      overflow: clip;
      opacity: 0;
      transition: height 0.5s var(--ease-out), opacity 0.4s var(--ease-soft), content-visibility 0.5s allow-discrete;
    }
    .faq-item[open]::details-content { height: auto; opacity: 1; }
  }
}

@media (max-width: 959px) {
  .faq-hero h1,
  .faq-hero .faq-hero__intro,
  .faq-group__head,
  .faq-list { grid-column: 1 / -1; }
  .faq-group__head { position: static; }
  .faq-group__head .plate { display: none; }
  .faq-item__answer--figure { grid-template-columns: 1fr; }
}
@media (max-width: 719px) {
  .faq-item summary { padding-block: 20px; gap: 16px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .lightbox, .contact__mark { display: none !important; }
  body { background: none; }
  .contact, .site-footer { background: none; color: var(--ink); }
}
