/* Sisu Magazine. Colours come from the porch film: dry meadow grass, boot leather, ridge haze. */
:root {
  --grass: #cdbf94;
  --leather: #2b241b;
  --bark: #4b4437;
  --haze: #7d7b70;
  --sky: #bfcbd0;
  --light: #f6f2e7;
  --stem: #a89a70;
  --sans: Futura, "Futura PT", "Century Gothic", "Trebuchet MS", sans-serif;
  --text: "Iowan Old Style", "Sitka Text", Cambria, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grass);
  color: var(--leather);
  font: 1.125rem/1.62 var(--text);
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:focus-visible { outline: 3px solid var(--leather); outline-offset: 3px; }

/* ---------- homepage: the porch ---------- */
.porch {
  position: relative;
  min-height: 100svh;
  background: var(--sky);
  overflow: hidden;
}
.porch-film, .porch-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 50%;
}
.porch-still { display: none; }
.plate {
  position: relative;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  max-width: 46rem;
}
.plate h1 {
  margin: 0;
  font: 500 clamp(3rem, 10vw, 8.75rem)/0.88 var(--sans);
  letter-spacing: -0.02em;
}
.plate .line {
  margin: 0.9rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 22rem;
}
.plate nav { margin-top: 1.1rem; font-family: var(--sans); font-size: 1rem; }
.plate nav a { margin-right: 1.4rem; }

.sayso { background: var(--haze); color: var(--light); }
.sayso p {
  margin: 0 auto;
  max-width: 50rem;
  padding: clamp(3rem, 8vw, 6.5rem) clamp(1.25rem, 5vw, 2rem);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.32;
}

/* ---------- homepage: the index ---------- */
.index { position: relative; padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 4vw, 3rem); }
.trail {
  position: absolute;
  top: 3rem; bottom: 3rem;
  left: 50%;
  width: 7rem;
  height: calc(100% - 6rem);
  transform: translateX(-50%);
  display: none;
}
.trail path { fill: none; stroke: var(--stem); stroke-width: 2; stroke-linecap: round; }
.entries { list-style: none; margin: 0 auto; padding: 0; max-width: 72rem; position: relative; }
.entry + .entry { margin-top: clamp(3rem, 7vw, 6.5rem); }
.entry a { display: grid; gap: 1.1rem; text-decoration: none; }
.frame { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--haze); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.words .t {
  display: block;
  font: 500 clamp(1.5rem, 2.6vw, 2.15rem)/1.12 var(--sans);
  letter-spacing: -0.01em;
}
.words .s { display: block; margin-top: 0.6rem; color: var(--bark); max-width: 28rem; }
.entry a:hover .t, .entry a:focus-visible .t { text-decoration: underline; text-decoration-thickness: 2px; }

@media (min-width: 56rem) {
  .trail { display: block; }
  .entry a { grid-template-columns: 7fr 5fr; gap: 0 clamp(3rem, 8vw, 7rem); align-items: end; }
  .e-r a { grid-template-columns: 5fr 7fr; }
  .e-r .frame { order: 2; }
  .e-r .words { text-align: right; }
  .e-r .words .s { margin-left: auto; }
}

/* ---------- inner pages ---------- */
.bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--stem);
  font-family: var(--sans);
}
.bar .name { font-size: 1.45rem; font-weight: 500; text-decoration: none; letter-spacing: -0.01em; }
.bar nav a { margin-left: 1.3rem; }
.bar nav a:first-child { margin-left: 0; }

.post article, .about, .list {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2.25rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 1.5rem) 4rem;
}
.post h1, .about h1, .list h1 {
  margin: 0;
  font: 500 clamp(2.1rem, 5vw, 3.4rem)/1.05 var(--sans);
  letter-spacing: -0.015em;
}
.stand { font-size: 1.3rem; line-height: 1.45; color: var(--bark); margin: 1.1rem 0 2rem; }
.post h2 { font: 500 1.45rem/1.2 var(--sans); margin: 2.4rem 0 0.6rem; }
.post ul, .post ol { padding-left: 1.3rem; }
.post li + li { margin-top: 0.55rem; }

.wide { margin: 0 0 2.2rem; }
@media (min-width: 70rem) { .wide { margin-left: -12rem; margin-right: -12rem; } }
.wide figcaption { font-size: 0.98rem; color: var(--bark); margin-top: 0.6rem; }
.bleed img { width: 100%; max-height: 78vh; object-fit: cover; }
.inset { margin: 2rem 0; }
@media (min-width: 60rem) { .inset { margin-left: -6rem; margin-right: -6rem; } }

.list ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.list li { padding: 1.3rem 0; border-top: 1px solid var(--stem); }
.list li a { font: 500 1.45rem/1.2 var(--sans); }
.list li p { margin: 0.4rem 0 0; color: var(--bark); }

.foot {
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  font-family: var(--sans);
  border-top: 1px solid var(--stem);
}
.foot p { margin: 0; }

/* ---------- motion: images and the trail line only; text never moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .porch-film { display: none; }
  .porch-still { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .frame img { transition: filter 0.4s ease; }
  .entry a:hover .frame img { filter: saturate(1.15) brightness(1.04); }
  @supports (animation-timeline: view()) {
    .frame img {
      transform: scale(1.14);
      animation: sisu-drift linear both;
      animation-timeline: view();
    }
    .index { view-timeline: --sisu-walk block; }
    .trail path {
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
      animation: sisu-walk linear both;
      animation-timeline: --sisu-walk;
      animation-range: entry 15% exit 85%;
    }
    @keyframes sisu-drift {
      from { transform: scale(1.14) translateY(-5%); }
      to   { transform: scale(1.14) translateY(5%); }
    }
    @keyframes sisu-walk {
      from { stroke-dashoffset: 1; }
      to   { stroke-dashoffset: 0; }
    }
  }
}
