/* The opening is a commemorative print, not a restaurant booking page. */
:root {
  --hero-gap: clamp(40px, 5vw, 80px);
  --header-height: 112px;
}

.hero {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--hero-gap);
  min-height: calc(100svh - 112px);
  padding-block: 36px 64px;
}

.hero h1 {
  font-size: clamp(76px, 8vw, 116px);
  line-height: 1;
  letter-spacing: -.04em;
}

.hero-intro {
  max-width: 43ch;
  margin-top: 32px;
}

.hero-actions { margin-top: 32px; }

.hero .keepsake {
  align-self: center;
  display: flex;
  border-radius: 0;
  animation: none;
}

.hero .keepsake-inner {
  width: 100%;
  min-height: 560px;
  padding: 48px 28px;
}

.hero .keepsake-top { margin-bottom: 40px; font-size: 14px; }
.hero .keepsake-logo { width: min(90%, 360px); }
.hero .keepsake-dates {
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  margin-top: 44px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(44px, 4.5vw, 64px);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.035em;
  line-height: 1;
  color: #c9b47c;
}
.hero .date-separator {
  color: inherit;
  font-size: .5em;
  opacity: .75;
}
.hero .keepsake-caption {
  margin-top: 26px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 16px;
  line-height: 1.5;
}

/* Rare, first-visit delight: short travel, then a still page. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 {
    animation: hero-arrival 600ms var(--ease-out) both;
  }

  .hero .keepsake-inner {
    animation: hero-arrival 640ms var(--ease-out) 70ms both;
  }

  @keyframes hero-arrival {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (min-width: 821px) {
  .site-header {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: calc(56.52% - 5px) minmax(0, 1fr);
    gap: 0;
  }

  .site-header nav {
    color: var(--inverse);
    justify-content: center;
    gap: clamp(16px, 2vw, 28px);
    padding-inline: 24px;
  }
  .site-header nav :focus-visible { outline-color: var(--inverse); }

  .hero {
    position: relative;
    isolation: isolate;
  }

  .hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -112px;
    bottom: 0;
    left: calc(56.52% - 5px);
    right: 0;
    background: var(--ink);
  }

  .hero .keepsake {
    background: transparent;
    margin-left: calc(-.4348 * var(--hero-gap) - 5px);
  }
}

@media (max-width: 1100px) {
  :root { --hero-gap: 36px; }
  .hero h1 { font-size: clamp(64px, 8vw, 88px); }
  .hero .keepsake-inner { min-height: 500px; padding-inline: 24px; }
  .hero .keepsake-dates { font-size: clamp(44px, 5vw, 60px); }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    gap: 28px;
    padding-block: 36px 64px;
  }
  .hero h1 { font-size: 64px; }
  .hero-intro { margin-top: 25px; }
  .hero .keepsake-inner { min-height: 445px; padding: 32px 18px; }
  .hero .keepsake-top { margin-bottom: 28px; }
  .hero .keepsake-dates { margin-top: 32px; font-size: 46px; }
  .hero .keepsake-caption { font-size: 16px; }
}

@media (max-width: 620px) {
  .hero { gap: 36px; padding-block: 32px 59px; }
  .hero h1 { font-size: clamp(48px, 14vw, 78px); line-height: 1.05; }
  .hero-actions { margin-top: 25px; }
  .hero .keepsake-inner { min-height: 400px; padding: 32px 24px; }
  .hero .keepsake-logo { width: 230px; }
  .hero .keepsake-dates { margin-top: 32px; font-size: clamp(40px, 13vw, 52px); }
  .hero .keepsake-caption { margin-top: 22px; }
}

/* One persistent header: no duplicate navigation, replacement, or layout jump. */
html {
  background-color: var(--paper);
  scroll-padding-top: calc(var(--header-height) + 24px + env(safe-area-inset-top, 0px));
}
.header-scroll-marker {
  position: absolute;
  top: 24px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.mobile-header-spacer { display: none; }
.site-header.persistent-header {
  position: sticky;
  top: 0;
  z-index: 10;
  isolation: isolate;
  min-height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}
.persistent-header::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  z-index: -1;
  background: var(--paper);
  opacity: 0;
}
.persistent-header.is-scrolled::before { opacity: 1; }
.persistent-header .brand { position: relative; }
.persistent-header .brand-name { transform: translateX(0); }
.persistent-header .compact-logo {
  position: absolute;
  left: 0;
  width: 54px;
  opacity: 0;
  transform: translateY(4px) scale(.96);
  filter: brightness(0) saturate(100%) invert(23%) sepia(18%) saturate(915%) hue-rotate(99deg) brightness(91%) contrast(91%);
}
.persistent-header.is-scrolled .compact-logo { opacity: 1; transform: none; }
.persistent-header.is-scrolled .brand-name { transform: translateX(68px); }
.persistent-header.is-scrolled nav { color: var(--ink); }
.persistent-header.is-scrolled nav :focus-visible { outline-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .persistent-header::before { transition: opacity 180ms var(--ease-out); }
  .persistent-header .brand-name,
  .persistent-header .compact-logo {
    transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
  }
}
@media (max-width: 820px) {
  :root { --header-height: 100px; }
  /* Keep the mobile reading navigation opaque. */
  .site-header.persistent-header {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-inline: 24px;
    background-color: var(--paper);
  }
  .mobile-header-spacer {
    display: block;
    height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  }
  .persistent-header::before { display: none; }
}
@media (max-width: 620px) {
  :root { --header-height: 92px; }
  .persistent-header .compact-logo { width: 38px; }
  .persistent-header.is-scrolled .brand-name { transform: translateX(48px); }
  .site-header.persistent-header { padding-inline: 22px; }
}

/* Give the letter a separate, unhurried opening. */
.farewell { padding-top: 96px; }
.farewell .signature { margin-top: 42px; }

/* A quiet closing signature, echoing the dates in the opening. */
.site-footer .footer-name span { color: #c9b47c; }
@media (max-width: 620px) {
  .site-footer.wrap { flex-direction: column; align-items: flex-start; gap: 24px; }
  .site-footer nav { flex-direction: row; gap: 24px; }
}

/* An invitation to write, with practical details kept secondary. */
.contact-details { padding-top: 8px; }
.contact .email-link {
  padding-block: 0 12px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.contact .address-row {
  display: block;
  padding-top: 24px;
}
.contact .address-row address { margin-top: 6px; }
.contact .contact-note {
  margin-top: 32px;
  padding: 18px 20px;
  background: var(--soft);
  color: var(--soft-ink);
}
@media (max-width: 620px) {
  .contact-details { padding-top: 36px; }
  .contact .email-link { font-size: 21px; }
  .contact .address-row { padding-top: 20px; font-size: 15px; }
  .contact .contact-note { margin-top: 26px; font-size: 15px; }
}

/* Keep the personal introduction, but let the photographs stay modest. */
.memories-inner { padding-block: 96px 104px; }
.memories-heading > p {
  max-width: 360px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
  color: var(--ink);
}
.memory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1120px;
  margin-inline: auto;
  gap: 36px;
}
.memory-two { padding-top: 28px; }
.memory-photo h3 { margin-top: 6px; }

@media (max-width: 620px) {
  .memories-inner { padding-block: 64px 72px; }
  .memories-heading > p { font-size: 22px; }
  .memory-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 380px;
    gap: 36px;
  }
  .memory-two { width: 100%; margin-left: 0; padding-top: 0; }
  .photo-wrap img { aspect-ratio: 1.15; }
}

.menu-toggle { display: none; }
.site-header nav[hidden] { display: none; }
.menu-close { display: none; }
.menu-is-open .menu-lines { display: none; }
.menu-is-open .menu-close { display: block; }
.menu-is-open.persistent-header::before { opacity: 1; }

@media (max-width: 820px) {
  .site-header.menu-ready:not(.persistent-header) { position: relative; z-index: 10; }
  .menu-toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 48px;
    padding: 12px;
    border: 0;
    background: transparent;
    color: var(--ink);
    touch-action: manipulation;
    user-select: none;
  }
  .menu-toggle:active { background: var(--soft); }
  .site-header.menu-ready nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 28px;
    background: var(--paper);
    color: var(--ink);
    font-size: 22px;
  }
  .site-header.menu-ready nav a,
  .site-header.menu-ready nav a:first-child:not(.nav-contact) {
    display: flex;
    min-height: 52px;
    padding-block: 10px;
    touch-action: manipulation;
  }
  .site-header.menu-ready nav[hidden] { display: none; }
}

@media (max-width: 620px) {
  .hero .keepsake {
    align-self: stretch;
    width: auto;
    margin-inline: -22px;
  }
  .hero .keepsake-inner { padding-block: 48px; }
  .farewell { padding-top: 56px; }
  .farewell .signature { margin-top: 36px; }
  .site-header.menu-ready nav {
    left: 0;
    right: 0;
    padding-inline: 22px;
  }
}
