@font-face {
  font-family: Bricolage;
  src: url("./media/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f8ee;
  --white: #fffefa;
  --green: #164429;
  --green-deep: #102e1e;
  --green-light: #e6ecd9;
  --red: #c62524;
  --text: #222d23;
  --muted: #4b594b;
  --line: #c8cfc0;
  --gutter: clamp(1rem, 4vw, 4.5rem);
  background: var(--paper);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.58;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
address { font-style: normal; }
[id] { scroll-margin-top: 6.8rem; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.frame {
  width: min(82rem, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 0.75rem auto auto var(--gutter);
  transform: translateY(-160%);
  padding: 0.55rem 0.8rem;
  background: var(--white);
  font-weight: 700;
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  border-top: 4px solid var(--green);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.header-inner, .header-inner nav, .section-links, .site-footer {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: 5.4rem;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: block;
  flex: none;
  width: 7.6rem;
}

.wordmark img { width: 100%; height: auto; }

.header-inner nav, .section-links { gap: clamp(1.2rem, 3.1vw, 3rem); }

.section-links a {
  position: relative;
  padding: 0.65rem 0;
  color: var(--green-deep);
  font-weight: 700;
  text-decoration: none;
}

.section-links a::after {
  position: absolute;
  inset: auto 0 0.4rem;
  height: 2px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.section-links a:is(:hover, :focus-visible)::after { transform: scaleX(1); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 3rem;
  padding: 0.65rem 1.12rem;
  border: 1px solid transparent;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-green { color: var(--white); background: var(--green); }
.button-green:hover { background: var(--green-deep); }
.button-green:focus-visible { outline-color: var(--green); }
.button-paper { color: var(--green-deep); background: var(--paper); }
.button-paper:hover { background: var(--green-light); }
.button-paper:focus-visible { outline-color: var(--paper); }

.text-link {
  width: fit-content;
  font-weight: 700;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.text-link:hover { text-decoration-thickness: 2px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12.5rem, 24%);
  align-items: end;
  gap: clamp(1rem, 2.4vw, 2.55rem) clamp(1rem, 5vw, 5rem);
  padding-top: clamp(2.1rem, 5vw, 5rem);
}

.location, .story-date {
  font-size: 0.875rem;
  font-weight: 750;
}

.location {
  margin-bottom: 0.9rem;
  color: var(--green);
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

h1, h2, h3, .footer-brand {
  color: var(--green-deep);
  font-family: Bricolage, "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.052em;
  line-height: 0.97;
}

h1 { font-size: clamp(3.25rem, 7.1vw, 7.6rem); }
h2 { font-size: clamp(2.7rem, 5.2vw, 5.35rem); }
h3 { font-size: clamp(2.25rem, 4.05vw, 4.1rem); }

.intro-aside {
  display: grid;
  justify-items: start;
  gap: 0.58rem;
  padding-bottom: 0.25rem;
}

.intro-aside p {
  max-width: 31ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.signature {
  width: clamp(8rem, 14vw, 12.2rem);
  height: auto;
  margin-bottom: 0.15rem;
  overflow: visible;
  fill: none;
  stroke: var(--red);
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-feature { grid-column: 1 / -1; }

.field-image {
  position: relative;
  overflow: hidden;
  height: clamp(18rem, 34vw, 32rem);
  background: var(--green);
}

.field-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 64%;
}

.field-feature figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 1rem;
  min-height: 3.4rem;
  padding: 0.65rem 0.95rem;
  background: var(--green);
  color: var(--white);
}

.field-feature figcaption span { color: #e5eddf; }

.stories { padding-block: clamp(3.5rem, 8.2vw, 8rem); }

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.45rem, 3vw, 2.7rem);
}

.story-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.4rem;
  border-bottom: 1px solid var(--line);
}

.story-tabs button {
  position: relative;
  min-height: 3.1rem;
  padding: 0.5rem 1.1rem;
  border: 0;
  background: none;
  color: var(--green-deep);
  font-weight: 750;
  cursor: pointer;
}

.story-tabs button::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms ease;
}

.story-tabs button[aria-selected="true"] { background: var(--green-light); }
.story-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.story-tabs button:hover { background: #eef1e4; }

.story-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  margin-top: 1.05rem;
  background: var(--green-light);
}

.story-picture {
  display: grid;
  overflow: hidden;
  min-height: 19rem;
}

.story-picture.photo-pair { grid-template-columns: 1.35fr 1fr; gap: 3px; }
.photo-link { position: relative; display: block; overflow: hidden; background: var(--green); cursor: zoom-in; }
.photo-link:focus-visible { z-index: 1; outline-offset: -5px; outline-color: var(--white); }

.photo-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(.22, .7, .36, 1);
}

.photo-link:is(:hover, :focus-visible) img { transform: scale(1.04); }
.photo-pair .photo-link:first-child img { object-position: center 66%; }

.story-copy {
  align-self: center;
  padding: clamp(1.35rem, 4vw, 4.2rem);
}

.story-date { margin-bottom: 0.75rem; color: var(--muted); }
.story-copy h3 + p { margin-block: 1rem 1.15rem; }
.story-copy p { max-width: 43ch; }

.contact {
  background: var(--green-deep);
  color: var(--white);
  border-top: 5px solid var(--red);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.67fr);
  gap: 2rem clamp(2rem, 10vw, 9.5rem);
  align-items: center;
  padding-block: clamp(2.7rem, 7vw, 6.5rem);
}

.contact h2 { color: inherit; }
.contact h2 + p { margin-block: 0.85rem 1.45rem; color: #e3eee2; }

.contact-details {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 0 1rem 1.2rem;
  border-left: 1px solid #809485;
}

.contact-details address { line-height: 1.45; }
.contact-phone { margin-top: 0.2rem; font-size: 1.2rem; }

.site-footer {
  flex-wrap: wrap;
  justify-content: space-between;
  min-height: 5.2rem;
  gap: 0.65rem 1.5rem;
  padding-block: 1.15rem;
  color: var(--green-deep);
}

.footer-brand {
  font-size: 1.3rem;
  letter-spacing: -0.012em;
  text-decoration: none;
}

.photo-dialog {
  width: min(65rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0.75rem;
  border: 1px solid #96a998;
  background: var(--green-deep);
  color: var(--white);
}

.photo-dialog::backdrop { background: #101f16bf; }

.photo-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.1rem 0.7rem;
}

.photo-dialog-header h2 { color: inherit; font-size: clamp(1.2rem, 3.5vw, 1.75rem); }
.dialog-image img { width: auto; max-height: calc(100dvh - 8rem); margin: auto; object-fit: contain; }

@media (max-width: 59rem) {
  h1 { font-size: clamp(3.25rem, 7.2vw, 5.5rem); }
  .intro { gap: clamp(1rem, 3vw, 1.6rem); }
  .story-picture { min-height: 15.5rem; }
}

@media (max-width: 44rem) {
  [id] { scroll-margin-top: 7.8rem; }
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(3.65rem, auto) auto;
    gap: 0 0.75rem;
  }
  .wordmark { width: 5.3rem; }
  .header-inner nav { display: contents; }
  .section-links {
    grid-area: 2 / 1 / 3 / -1;
    gap: 1.25rem;
    border-top: 1px solid var(--line);
  }
  .section-links a { min-height: 2.7rem; padding-block: 0.58rem; font-size: 0.9rem; }
  .header-inner .button { grid-area: 1 / 2; min-height: 2.55rem; padding-inline: 0.7rem; font-size: 0.9rem; }
  .intro { grid-template-columns: 1fr; align-items: start; padding-top: 1.6rem; }
  h1 { font-size: clamp(3rem, 10.3vw, 5.5rem); }
  h1 br { display: none; }
  .intro-aside { position: relative; gap: 0.45rem; padding-right: 4.5rem; }
  .intro-aside p { max-width: 25ch; font-size: 1rem; }
  .signature { position: absolute; right: 0; bottom: 0.15rem; width: 4.1rem; margin: 0; }
  .location { margin-bottom: 0.55rem; }
  .field-image { height: auto; aspect-ratio: 1.46; }
  .field-image img { object-position: 49% 64%; }
  .field-feature figcaption { min-height: 2.75rem; padding: 0.45rem 0.7rem; font-size: 0.875rem; }
  .stories { padding-block: 2.9rem; }
  .story-panel, .contact-inner { grid-template-columns: 1fr; }
  .story-picture { min-height: 0; aspect-ratio: 1.45; }
  .story-tabs { column-gap: 0; }
  .story-tabs button { min-height: 2.8rem; padding-inline: 0.6rem; font-size: 0.88rem; }
  .contact-inner { gap: 1.6rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .signature path { animation: draw-heart 1400ms 140ms cubic-bezier(.43, .03, .25, 1) both; }
  .field-image { animation: open-field 790ms cubic-bezier(.21, .72, .38, 1) both; }
  .story-panel.is-entering .story-picture { animation: slide-print 430ms cubic-bezier(.22, .69, .31, 1) both; }
  .photo-dialog[open] { animation: slide-print 260ms cubic-bezier(.22, .69, .31, 1) both; }

  @supports (animation-timeline: scroll()) {
    .site-header::after {
      position: absolute;
      inset: auto 0 -2px;
      height: 2px;
      background: var(--red);
      content: "";
      transform-origin: left;
      animation: reading-progress linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes draw-heart {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; }
  to { stroke-dasharray: 1; stroke-dashoffset: 0; }
}

@keyframes open-field {
  from { clip-path: inset(0 25% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes slide-print {
  from { clip-path: inset(0 12% 0 0); transform: translateX(0.85rem); }
  to { clip-path: inset(0); transform: translateX(0); }
}

@keyframes reading-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .section-links a::after, .story-tabs button::after, .photo-link img { transition: none; }
  .photo-link:is(:hover, :focus-visible) img { transform: none; }
}
