:root {
  --ink: #29494d;
  --ink-deep: #193235;
  --paper: #f5f0e3;
  --paper-deep: #e4dac1;
  --paper-bright: #fffaf0;
  --dahlia: #c7627f;
  --dahlia-deep: #8f3e57;
  --pollen: #e8ad38;
  --leaf: #526a4b;
  --text: #222722;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow-paper: 0 18px 45px rgb(25 50 53 / 0.22), 0 3px 10px rgb(25 50 53 / 0.14);
  --page-pad: clamp(1.25rem, 4vw, 4rem);
  --content: 90rem;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--dahlia) var(--paper-deep);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::-webkit-scrollbar { width: 11px; }
body::-webkit-scrollbar-track { background: var(--paper-deep); }
body::-webkit-scrollbar-thumb { background: var(--dahlia); border: 3px solid var(--paper-deep); }
::selection { background: var(--pollen); color: var(--ink-deep); }

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

a:focus-visible { outline: 3px solid var(--pollen); outline-offset: 5px; }

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0.65rem 0.9rem;
  background: var(--paper-bright);
  color: var(--ink-deep);
  font-weight: 700;
  clip-path: inset(50%);
}
.skip-link:focus {
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(100%, var(--content));
  margin-inline: auto;
  padding: 1.15rem var(--page-pad);
  background: linear-gradient(180deg, rgb(14 35 35 / 0.86), rgb(14 35 35 / 0.66));
  color: var(--paper-bright);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand img { width: 3.5rem; height: 3.5rem; }

.site-header nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }

.hero {
  position: relative;
  display: grid;
  min-height: max(43rem, 94svh);
  overflow: hidden;
  background: var(--ink-deep);
  isolation: isolate;
}

.hero-photo, .hero-photo img, .hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-photo img { object-fit: cover; object-position: 58% center; }
.hero-shade {
  z-index: 1;
  background: linear-gradient(90deg, rgb(14 35 35 / 0.64) 0%, rgb(14 35 35 / 0.22) 49%, rgb(14 35 35 / 0.08) 100%);
}

.hero-note {
  position: relative;
  z-index: 2;
  align-self: end;
  width: min(46rem, calc(100% - 2 * var(--page-pad)));
  margin: 8rem var(--page-pad) clamp(4.75rem, 9vh, 7rem);
  padding: clamp(1.65rem, 3.8vw, 3.6rem);
  background: var(--paper-bright);
  box-shadow: var(--shadow-paper);
  transform: rotate(-0.35deg);
  transform-origin: bottom left;
}

.hero-note h1, .intro h2, .journal-heading h2, .location h2, .about h2, .error-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero-note h1 {
  max-width: 11ch;
  color: var(--ink-deep);
  font-size: clamp(3.25rem, 7.2vw, 6rem);
}
.hero-note > p {
  max-width: 48ch;
  margin: 1.45rem 0 1.75rem;
  color: #3e4b43;
  font-size: clamp(1.02rem, 1.55vw, 1.22rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.35rem;
  padding: 0.82rem 1.15rem;
  border: 0;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}
.button-primary {
  background: var(--ink);
  color: var(--paper-bright);
  box-shadow: 0 8px 20px rgb(25 50 53 / 0.22);
}
.button-primary:hover { background: var(--dahlia-deep); }
.button-primary svg, .popup-note a svg { flex: 0 0 auto; }

.hero-place {
  position: absolute;
  right: var(--page-pad);
  bottom: 1.25rem;
  z-index: 2;
  margin: 0;
  color: var(--paper-bright);
  font-size: 0.79rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: clamp(2rem, 8vw, 8rem);
  width: min(100%, var(--content));
  margin-inline: auto;
  padding: clamp(6rem, 12vw, 11rem) var(--page-pad);
}
.intro h2 {
  max-width: 12ch;
  color: var(--ink);
  font-size: clamp(3rem, 6vw, 5.5rem);
}
.intro p {
  align-self: end;
  max-width: 39ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.72rem);
  line-height: 1.45;
}

.journal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(14rem, 0.32fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  width: min(100%, var(--content));
  margin-inline: auto;
  padding: 2rem var(--page-pad) clamp(7rem, 13vw, 12rem);
}
.journal-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(3rem, 7vw, 6rem);
  padding-bottom: 1.3rem;
  border-bottom: 2px solid var(--ink);
}
.journal-heading h2 { color: var(--ink); font-size: clamp(3.4rem, 7vw, 6rem); }
.journal-heading p {
  max-width: 27ch;
  margin: 0 0 0.35rem;
  color: var(--leaf);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-style: italic;
}

.popup-note {
  position: sticky;
  top: 2rem;
  align-self: start;
  margin: 0;
  padding: 2rem 1.5rem 2.15rem;
  background-color: #f6d57b;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 2.05rem, rgb(41 73 77 / 0.18) 2.05rem, rgb(41 73 77 / 0.18) 2.1rem);
  box-shadow: 0 15px 30px rgb(56 44 20 / 0.18), 0 3px 8px rgb(56 44 20 / 0.12);
  color: var(--ink-deep);
  transform: rotate(1.1deg);
}
.popup-note-title {
  margin: 0 0 1.2rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.06;
}
.popup-note > p:not(.popup-note-title) { margin: 0 0 1.4rem; font-weight: 600; }
.popup-note a { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; }

.photo-notes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  row-gap: clamp(4rem, 9vw, 8rem);
}
.photo-note { margin: 0; }
.photo-note picture, .photo-note img { width: 100%; }
.photo-note img {
  height: auto;
  background: var(--paper-deep);
  box-shadow: 0 18px 40px rgb(25 50 53 / 0.16), 0 4px 11px rgb(25 50 53 / 0.12);
}
.photo-note figcaption { display: grid; gap: 0.25rem; max-width: 38ch; margin-top: 1rem; }
.photo-note figcaption strong {
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.15;
}
.photo-note figcaption span { color: #485348; font-size: 0.94rem; }
.note-bloomquist { grid-column: 1 / span 7; }
.note-stand { grid-column: 8 / -1; align-self: end; margin-bottom: 10%; transform: rotate(0.75deg); }
.note-baker { grid-column: 2 / span 5; transform: rotate(-0.65deg); }
.note-porch { grid-column: 7 / -1; margin-top: -8%; }
.note-market { grid-column: 3 / span 7; transform: rotate(0.45deg); }

.location {
  display: grid;
  grid-template-columns: minmax(13rem, 0.38fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: clamp(5rem, 10vw, 9rem) max(var(--page-pad), calc((100% - var(--content)) / 2 + var(--page-pad)));
  background: var(--ink);
  color: var(--paper-bright);
}
.location-mark { color: var(--pollen); }
.location-mark svg { width: min(100%, 17rem); margin-inline: auto; }
.location-copy { max-width: 55rem; }
.location h2 { max-width: 10ch; font-size: clamp(3.5rem, 7vw, 6rem); }
.location-copy > p {
  max-width: 54ch;
  margin: 1.6rem 0 2.2rem;
  color: #e6eadc;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}
.location-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.35rem 1.8rem; }
.button-paper {
  background: var(--paper-bright);
  color: var(--ink-deep);
  box-shadow: 0 8px 22px rgb(11 25 27 / 0.28);
}
.button-paper:hover { background: var(--pollen); }
.text-link { color: var(--ink-deep); font-weight: 800; }
.light-link { color: var(--paper-bright); }

.about {
  display: grid;
  grid-template-columns: minmax(10rem, 0.3fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 8vw, 8rem);
  width: min(100%, 74rem);
  margin-inline: auto;
  padding: clamp(6rem, 12vw, 11rem) var(--page-pad);
}
.about-logo { position: sticky; top: 2rem; }
.about-logo img {
  width: min(100%, 12rem);
  height: auto;
  margin-inline: auto;
  box-shadow: 0 14px 28px rgb(25 50 53 / 0.17);
  transform: rotate(-2.5deg);
}
.about-copy { max-width: 46rem; }
.about h2 { color: var(--dahlia-deep); font-size: clamp(3.7rem, 8vw, 6rem); }
.about p { max-width: 64ch; margin: 1.5rem 0 0; font-size: clamp(1.04rem, 1.5vw, 1.18rem); }
.about .text-link { display: inline-block; margin-top: 1.4rem; font-size: clamp(1rem, 2vw, 1.22rem); overflow-wrap: anywhere; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem var(--page-pad);
  background: var(--paper-deep);
  color: var(--ink-deep);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; font-family: var(--serif); font-weight: 700; }
.site-footer div { display: flex; gap: 1.4rem; }

.error-page { min-height: 100svh; background: var(--ink); }
.error-shell {
  display: grid;
  grid-template-columns: 10rem minmax(0, 40rem);
  align-items: start;
  justify-content: center;
  gap: clamp(2rem, 6vw, 6rem);
  min-height: 100svh;
  padding: clamp(3rem, 10vw, 8rem) var(--page-pad);
}
.error-shell > img { width: 100%; height: auto; box-shadow: 0 15px 32px rgb(7 19 20 / 0.3); transform: rotate(-2deg); }
.error-copy { padding: clamp(2rem, 5vw, 4rem); background: var(--paper-bright); box-shadow: var(--shadow-paper); }
.error-copy h1 { color: var(--dahlia-deep); font-size: clamp(3rem, 8vw, 5.5rem); }
.error-copy p { max-width: 45ch; margin: 1.5rem 0 2rem; font-size: 1.1rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-note { animation: note-settle 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .button, .site-header a, .text-link { transition: background-color 180ms ease-out, color 180ms ease-out, text-decoration-color 180ms ease-out; }
  @keyframes note-settle {
    from { filter: blur(2px); opacity: 0.9; transform: translateY(1.4rem) rotate(-0.75deg) scale(0.99); }
    to { filter: blur(0); opacity: 1; transform: translateY(0) rotate(-0.35deg) scale(1); }
  }
}

@media (max-width: 760px) {
  .site-header { align-items: flex-start; padding-top: 0.9rem; }
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand img { width: 3.2rem; height: 3.2rem; }
  .site-header nav { gap: 0.75rem; padding-top: 0.65rem; font-size: 0.84rem; letter-spacing: 0.015em; }
  .site-header nav a:first-child { display: none; }
  .hero { min-height: 48rem; }
  .hero-photo img { object-position: 62% center; }
  .hero-shade { background: linear-gradient(180deg, rgb(14 35 35 / 0.12) 0%, rgb(14 35 35 / 0.18) 42%, rgb(14 35 35 / 0.62) 100%); }
  .hero-note { width: calc(100% - 2rem); margin: 8rem 1rem 4.7rem; padding: 1.45rem 1.25rem 1.55rem; transform: none; }
  .hero-note h1 { max-width: 9.5ch; font-size: clamp(3.15rem, 15.5vw, 4.7rem); }
  .hero-note > p { margin-block: 1rem 1.3rem; font-size: 1rem; }
  .button-primary { width: 100%; }
  .hero-place { right: 1rem; bottom: 1rem; left: 1rem; text-align: center; }
  .intro, .about { grid-template-columns: 1fr; }
  .intro { gap: 2rem; padding-block: 6rem; }
  .intro p { font-size: 1.25rem; }
  .journal { grid-template-columns: 1fr; padding-top: 0; }
  .journal-heading { display: block; margin-bottom: 2.5rem; }
  .journal-heading h2 { font-size: clamp(3.2rem, 15vw, 4.8rem); }
  .journal-heading p { margin-top: 1rem; }
  .popup-note { position: relative; top: auto; z-index: 2; margin: 0 0 4.5rem; transform: rotate(0.5deg); }
  .photo-notes { grid-template-columns: 1fr; row-gap: 4.5rem; }
  .note-bloomquist, .note-stand, .note-baker, .note-porch, .note-market { grid-column: 1; margin: 0; }
  .note-stand, .note-baker, .note-market { transform: none; }
  .location { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 5.5rem; }
  .location-mark svg { width: 8rem; margin-inline: 0; }
  .location h2 { font-size: clamp(3.3rem, 15vw, 4.8rem); }
  .location-actions { align-items: stretch; flex-direction: column; }
  .button-paper { width: 100%; }
  .about { gap: 3rem; }
  .about-logo { position: static; }
  .about-logo img { width: 8.5rem; margin-inline: 0; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 0.8rem; }
}

@media (max-width: 620px) {
  .error-shell { grid-template-columns: 1fr; }
  .error-shell > img { width: 7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
