:root {
  --ink: #3a2e2c;
  --paper: #fffff5;
  --blush: #e8b4bc;
  --blush-soft: #f6dfe2;
  --gold: #806200;
  --focus-outline: #8a3f54;
  --muted: #766b64;
  --content-width: 1120px;
  --reading-width: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 4px;
  border-radius: 2px;
}

.home-hero {
  position: relative;
  min-height: min(92svh, 900px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.home-hero__image,
.home-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero__image {
  object-fit: cover;
  object-position: center 46%;
}

.home-hero__shade {
  background: linear-gradient(180deg, transparent 35%, rgba(35, 24, 21, 0.72));
}

.home-hero__content {
  position: relative;
  z-index: 1;
  width: min(var(--content-width), calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 8rem) 0 clamp(2.5rem, 7vh, 5rem);
  text-shadow: 0 1px 16px rgba(35, 24, 21, 0.48);
}

.home-hero h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
}

.home-hero__subtitle {
  margin: 0.8rem 0 1.75rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-style: italic;
}

.home-hero__explore {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.65rem 1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-shadow: none;
  text-transform: uppercase;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.home-hero__explore:hover {
  background: #fff;
  color: var(--ink);
  transform: translateY(-2px);
}

#journal-index {
  width: min(var(--content-width), calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.journal-grid,
#journal-index:not(:has(> .empty-state)):not(:has(> .journal-grid)) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.journal-grid {
  width: min(var(--content-width), calc(100% - 3rem));
  margin: 0 auto;
}

.journal-card-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.journal-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(58, 46, 44, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(58, 46, 44, 0.06);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.journal-card-link:hover .journal-card {
  box-shadow: 0 14px 30px rgba(58, 46, 44, 0.16);
  transform: translateY(-4px);
}

.journal-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.journal-card--no-photo {
  display: grid;
  min-height: 236px;
  place-items: end start;
  background: linear-gradient(145deg, var(--blush-soft), #fff 72%);
}

.journal-card-content {
  width: 100%;
  display: grid;
  gap: 0.35rem;
  padding: 1.4rem;
}

.journal-card .entry-day,
.journal-card .entry-date,
.journal-card .entry-location {
  display: block;
}

.journal-card .entry-date {
  color: var(--gold);
}

.journal-card .entry-location {
  color: var(--muted);
  font-size: 0.9rem;
}

.journal-card h2 {
  margin: 0.3rem 0 0;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.15;
}

.entry {
  padding: clamp(2rem, 5vw, 4.5rem) 0 2.5rem;
}

#day-entry,
.not-found {
  width: min(var(--reading-width), calc(100% - 3rem));
  margin: 0 auto;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.entry-day {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: var(--blush-soft);
  color: var(--ink);
  font-weight: bold;
  font-size: 0.8rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
}

.entry-date {
  color: var(--gold);
  font-weight: bold;
  font-size: 0.95rem;
}

.entry-location {
  color: var(--muted);
  font-size: 0.9rem;
}

.entry h1,
.entry h2 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.05;
}

.entry-text p {
  margin: 0 0 0.9rem;
}

.entry-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.entry-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.entry-photos img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  border: 1px solid var(--blush-soft);
  cursor: zoom-in;
}

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(58, 46, 44, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
  overscroll-behavior: contain;
  touch-action: pan-y;
  z-index: 20;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-nav {
  display: grid;
  padding: 0;
  border: 2px solid #fff;
  background: rgba(58, 46, 44, 0.72);
  color: #fff;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  place-items: center;
}

.lightbox-close {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 64px;
  border-radius: 24px;
  font-size: 2.6rem;
  transform: translateY(-50%);
}

.lightbox-previous {
  left: max(1rem, env(safe-area-inset-left));
}

.lightbox-next {
  right: max(1rem, env(safe-area-inset-right));
}

.lightbox-nav[hidden] {
  display: none;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline-color: #fff;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--blush-soft);
  background: var(--paper);
}

.site-home {
  width: min(var(--reading-width), 100%);
  margin: 0 auto;
  color: var(--ink);
  font-weight: bold;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.day-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--blush-soft);
}

.day-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem;
  border: 1px solid var(--blush);
  border-radius: 999px;
  color: var(--ink);
  font-weight: bold;
  text-decoration: none;
}

.day-nav a[href="/honeymoon/"] {
  grid-column: 2;
}

.day-nav a[rel="next"] {
  grid-column: 3;
}

.day-nav a:hover {
  background: var(--blush-soft);
}

.empty-state,
.not-found {
  text-align: center;
  color: var(--muted);
  padding: 4rem 0;
}

.not-found h1 {
  color: var(--ink);
}

.not-found a {
  color: var(--ink);
  font-weight: bold;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .home-hero {
    min-height: 82svh;
  }

  .home-hero__image {
    object-position: center 42%;
  }

  .home-hero__content {
    width: min(100% - 2rem, 34rem);
    padding-bottom: 2rem;
  }

  .home-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.3rem);
  }

  #journal-index,
  .journal-grid {
    width: min(100% - 2rem, 34rem);
  }

  .journal-grid,
  #journal-index:not(:has(> .empty-state)):not(:has(> .journal-grid)) {
    grid-template-columns: 1fr;
  }

  #day-entry,
  .not-found {
    width: min(100% - 2rem, var(--reading-width));
  }

  .entry-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-photos img {
    height: 150px;
  }

  .day-nav {
    gap: 0.45rem;
  }

  .day-nav a {
    font-size: 0.84rem;
  }
}
