@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f1e7;
  --print: #fffaf0;
  --ink: #2b2119;
  --muted: #6a584a;
  --rule: #d9cbb9;
  --accent: #963925;
  --gold: #ffcf8e;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier New", monospace;
}

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

html { scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
figure, p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.arrow {
  display: inline-block;
  position: relative;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -.17em;
}

.arrow::before, .arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 19%;
}

.arrow::before {
  width: 65%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
}

.arrow::after {
  width: 41%;
  height: 41%;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.arrow-diagonal { transform: rotate(-45deg); }
.arrow-up { transform: rotate(-90deg); }
.arrow-down { transform: rotate(90deg); }
.arrow-left { transform: rotate(180deg); }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 4;
  transform: translateY(-160%);
  padding: 12px 16px;
  background: var(--print);
}

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

.site-header { border-bottom: 1px solid var(--rule); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 77px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.035em;
}

.camera-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 17px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  color: var(--accent);
  flex: none;
}

.camera-icon::before {
  content: "";
  position: absolute;
  inset: -4px auto auto 4px;
  width: 8px;
  height: 4px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.camera-icon i {
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.camera-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 3px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 3vw, 44px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.site-nav a, .site-footer a { padding-block: 7px; }
.site-nav a:first-child { color: var(--accent); }
.site-nav a:hover, .site-footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.share-button {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  min-height: 40px;
  padding: 7px 15px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.share-button span { color: var(--accent); font-size: 17px; }
.share-button:hover { border-color: var(--accent); }

.cover { margin-top: 24px; }

.cover-picture {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(490px, 43.5vw, 594px);
  overflow: hidden;
  border-radius: 2px;
  background: #291a15;
  color: #fff5e5;
}

.cover-picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-position, 60% 55%);
  z-index: -2;
}

.cover-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(23, 15, 12, .91) 0%, rgba(23, 15, 12, .74) 29%, rgba(23, 15, 12, .2) 61%, transparent 82%),
    linear-gradient(0deg, rgba(23, 15, 12, .17), transparent 35%);
}

.cover-content {
  padding: 53px clamp(35px, 5vw, 80px) 60px;
  position: relative;
  max-width: 590px;
}

.overline {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .085em;
  font-weight: 700;
  text-transform: uppercase;
}

.cover-overline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 21px;
  color: var(--gold);
}

.cover-overline::before {
  content: "";
  width: 25px;
  height: 1px;
  background: currentColor;
}

.cover h1 {
  width: max-content;
  max-width: 100%;
  font: 400 clamp(80px, 9vw, 140px)/.79 var(--serif);
  letter-spacing: -.035em;
}

.cover h1 em { color: var(--gold); font-style: italic; }

.cover-description {
  max-width: 365px;
  margin-top: 28px;
  color: #f4e9da;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.5;
  text-wrap: balance;
}

.cover-link {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  min-height: 46px;
  margin-top: 27px;
  padding: 10px 16px;
  border: 1px solid #fff2dd;
  border-radius: 2px;
  background: #fff2dd;
  color: #3c2417;
  font-size: 14px;
  font-weight: 700;
}

.cover-link .arrow { font-size: 18px; color: var(--accent); }
.cover-link:hover { background: var(--gold); border-color: var(--gold); }
.cover-link:focus-visible { outline-color: var(--gold); }

[data-launch-cover] .cover-media { position: absolute; inset: 0; z-index: -2; }

[data-entry-cover] .cover-picture {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: stretch;
  min-height: clamp(435px, 42vw, 565px);
}

[data-entry-cover] .cover-picture::after { display: none; }
[data-entry-cover] .cover-media { position: relative; grid-area: 1 / 2; }
[data-entry-cover] .cover-media img { z-index: 0; }
[data-entry-cover] .cover-content { grid-area: 1 / 1; align-self: center; }
[data-entry-cover] h1 { font-size: clamp(68px, 8.3vw, 122px); }

.cover-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  padding: 14px 2px 15px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
}

.cover-camera {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4f3c2d;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.cover-camera .camera-icon { transform: scale(.65); margin-inline: -4px; }
.cover-date { padding-left: 10px; border-left: 1px solid var(--rule); }

.home-sections {
  display: grid;
  grid-template-columns: minmax(240px, .85fr) minmax(0, 2fr);
  gap: clamp(35px, 5vw, 76px);
  margin-block: 49px 76px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--rule);
}

.section-head h2, .about h2 {
  font: 400 clamp(40px, 4.05vw, 59px)/.98 var(--serif);
  letter-spacing: -.025em;
}

.section-note { color: var(--accent); font-size: 11px; }

.journal-empty {
  padding: 21px 20px 23px;
  background: #efe5d6;
  border: 1px solid #e5d8c6;
}

.journal-empty .overline { color: var(--accent); }
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 2px;
}

.journal-empty-title {
  max-width: 235px;
  margin-top: 10px;
  font: 400 clamp(30px, 3vw, 43px)/.98 var(--serif);
  letter-spacing: -.015em;
}

.frame-grid { display: grid; gap: 17px; }
.contact-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 7px 7px 0;
  background: var(--print);
  border: 1px solid #e1d6c7;
  box-shadow: 0 2px 5px #50351a0a;
}

.frame-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e9ddcd;
  cursor: zoom-in;
}

.frame-link img { width: 100%; height: auto; }
.contact-sheet img { aspect-ratio: 4/3; object-fit: cover; object-position: var(--photo-position, center); }
.contact-sheet .frame { padding-bottom: 7px; }
.frame figcaption { padding: 8px 3px 3px; font-size: 13px; color: var(--muted); line-height: 1.35; }

.frame-expand {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: #fff4e3;
  color: var(--ink);
  border: 1px solid #fff4e3;
  border-radius: 2px;
  opacity: .9;
  font-size: 19px;
  transition: opacity .2s ease, background .2s ease;
}

.frame-link:hover .frame-expand, .frame-link:focus-visible .frame-expand {
  opacity: 1;
  background: var(--gold);
}

.archive { list-style: none; padding: 0; margin: 0; }
.archive li + li { border-top: 1px solid var(--rule); }

.archive-link {
  position: relative;
  display: block;
  padding: 15px 28px 16px 0;
}

.archive-link:hover h3 { color: var(--accent); }
.archive-link h3 { font: 400 31px/1.03 var(--serif); margin-block: 7px; }
.archive-link > .arrow { position: absolute; top: 50%; right: 3px; font-size: 20px; color: var(--accent); }
.archive-place { font-size: 13px; color: var(--muted); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; color: var(--accent); }

.about {
  display: grid;
  grid-template-columns: auto minmax(0, .9fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 29px 31px;
  background: #efe5d6;
  border: 1px solid #e5d8c6;
}

.about-mark {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border: 1px solid #ceb8a4;
  border-radius: 50%;
}

.about h2 { font-size: clamp(30px, 3.1vw, 46px); }
.about p { color: var(--muted); max-width: 430px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 56px;
  padding-block: 16px 27px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
}

.footer-brand { font-weight: 700; color: var(--ink); }
.site-footer .arrow { color: var(--accent); margin-left: 4px; }

.day { margin-top: 42px; }
.day-header, .story-text, .day-navigation { max-width: 760px; margin-inline: auto; }

.journal-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-block: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.journal-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.day-header .entry-meta { margin-top: 25px; }
.day h1, .not-found h1 { font: 400 clamp(54px, 8vw, 100px)/.9 var(--serif); letter-spacing: -.035em; margin-block: 13px 18px; }
.day-summary { margin-bottom: 28px; font-size: clamp(18px, 2vw, 23px); line-height: 1.4; color: var(--muted); }
.day-cover { width: min(100%, 990px); margin: 0 auto 38px; }
.day-cover .frame, .story-photos .frame { padding-bottom: 7px; }
.day-cover .frame-link { display: flex; justify-content: center; background: #e6dacb; }
.day-cover img { width: auto; max-height: 72vh; object-fit: contain; }
.story { display: grid; gap: 28px; }
.story-text { width: 100%; font-size: 18px; line-height: 1.7; }
.story-photos { width: min(100%, 990px); margin-inline: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.story-photos[data-count="1"] { max-width: 760px; grid-template-columns: 1fr; }
.story-photos[data-count="1"]:has([data-portrait]) { max-width: 450px; }

.photo-note {
  width: min(100%, 760px);
  margin-inline: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

.day-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  padding-top: 19px;
}

.day-navigation a {
  display: grid;
  gap: 4px;
  align-content: start;
  font: 400 clamp(23px, 3vw, 31px)/1.1 var(--serif);
}

.day-navigation a:nth-child(2) { text-align: right; }
.day-navigation a:hover, .day-navigation .overline { color: var(--accent); }
.not-found { margin-block: 70px; }

dialog::backdrop { background: #1c140fdd; }

.photo-dialog {
  width: min(1100px, calc(100vw - 26px));
  max-width: none;
  max-height: calc(100dvh - 20px);
  padding: 10px clamp(10px, 2vw, 24px) 14px;
  border: 1px solid #fff0d929;
  border-radius: 3px;
  background: #251a14;
  color: #fff3e0;
}

.photo-toolbar, .photo-controls, .share-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.photo-counter { font-family: var(--mono); font-size: 12px; }
.dialog-figure { margin: 8px 0 13px; }
.dialog-figure img { width: auto; margin: auto; max-height: calc(100dvh - 205px); object-fit: contain; }
.dialog-figure figcaption { text-align: center; margin-top: 9px; font-size: 14px; }
.dialog-figure figcaption:empty { display: none; }
.photo-dialog :focus-visible { outline-color: var(--gold); outline-offset: 1px; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 1;
  font-size: 23px;
}

.photo-dialog .icon-button { border-color: #fff0d961; }
.icon-button:disabled { opacity: .35; cursor: default; }
.photo-dialog .icon-button:not(:disabled):hover { color: var(--gold); border-color: var(--gold); }
.photo-toolbar .close-photo { font-size: 28px; }
.photo-controls { justify-content: center; }
.photo-controls .arrow { font-size: 20px; }

.share-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 19px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}

.share-dialog h2 { font: 400 36px/1 var(--serif); }
.share-dialog label { display: block; margin-block: 14px 6px; font-size: 13px; }
.share-dialog input { width: 100%; padding: 10px; font: inherit; color: var(--ink); border: 1px solid var(--rule); border-radius: 2px; background: var(--print); }

.toast:empty { display: none; }
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3;
  max-width: calc(100% - 40px);
  padding: 10px 15px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--print);
  font-size: 14px;
}

@media (max-width: 1000px) {
  .shell { width: calc(100% - 64px); }
  .home-sections { gap: 29px; grid-template-columns: minmax(210px, .8fr) minmax(0, 2fr); }
  .frame-grid { gap: 11px; }
  .frame figcaption { font-size: 12px; }
}

@media (max-width: 730px) {
  .shell { width: calc(100% - 36px); }
  [data-entry-cover] .cover-picture { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  [data-entry-cover] .cover-media { grid-area: 1 / 1; aspect-ratio: 4/3; }
  [data-entry-cover] .cover-content { grid-area: 2 / 1; padding: 30px 24px; }
  .home-sections { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-block: 36px 52px; }
  .journal-empty-title { max-width: none; }
  .about { grid-template-columns: auto minmax(0, 1fr); padding: 19px; gap: 11px 12px; }
  .about p { grid-column: 2; }
  .about-mark { width: 43px; height: 43px; }
  .about-mark .camera-icon { transform: scale(.8); }
  .site-footer { margin-top: 38px; }
}

@media (max-width: 560px) {
  .header-inner { grid-template-columns: 1fr auto; min-height: auto; gap: 0 12px; padding-top: 10px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand .camera-icon { transform: scale(.86); }
  .share-button { grid-column: 2; grid-row: 1; }
  .site-nav { grid-column: span 2; justify-content: start; gap: 26px; margin-top: 6px; font-size: 13px; }
  .site-nav a { padding-block: 10px; }
  .cover { margin-top: 14px; }
  .cover-picture { align-items: end; min-height: clamp(465px, 109vw, 525px); }
  [data-launch-cover] .cover-picture img { object-position: 74% 50%; }
  .cover-picture::after {
    background: linear-gradient(0deg, rgba(23, 15, 12, .99), rgba(23, 15, 12, .8) 28%, rgba(23, 15, 12, .28) 62%, transparent 100%),
      linear-gradient(90deg, rgba(23, 15, 12, .27), transparent 78%);
  }
  .cover-content { padding: 24px 21px 27px; }
  .cover-overline { margin-bottom: 15px; font-size: 11px; }
  .cover h1 { font-size: clamp(69px, 17vw, 94px); }
  .cover-description { max-width: 302px; margin-top: 17px; }
  .cover-link { margin-top: 16px; }
  .cover-caption { align-items: start; font-size: 11px; padding-block: 10px; }
  .cover-camera { align-items: start; gap: 7px; }
  .cover-date { display: none; }
  .cover-camera .camera-icon { margin-top: 0; }
  .section-head { margin-bottom: 13px; padding-bottom: 9px; }
  .contact-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .contact-sheet .frame { padding: 5px 5px 4px; }
  .frame-expand { right: 5px; bottom: 5px; width: 26px; height: 26px; font-size: 16px; }
  .about p { grid-column: 1 / -1; font-size: 14px; }
  .day { margin-top: 25px; }
  .day-cover { margin-bottom: 24px; }
  .story { gap: 21px; }
  .story-text { font-size: 16px; }
  .story-photos { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
