:root {
  --text: var(--color-ivory-50);
  --text-muted: rgba(250, 243, 220, 0.78);

  --overlay-strong: rgba(40, 21, 10, 0.78);
  --overlay-soft: rgba(40, 21, 10, 0.34);
  --overlay-clear: rgba(40, 21, 10, 0.08);

  --accent: var(--color-gold-300);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  background: var(--color-ink-900);
  color: var(--text);
}

body:has(.modal:target) {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(250, 243, 220, 0.12);
  border: 1px solid rgba(250, 243, 220, 0.24);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
}

.splash {
  --pad: clamp(1.25rem, 2.8vw, 2.5rem);
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--pad);
  padding-top: max(var(--pad), env(safe-area-inset-top, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: clip;
}

.top-nav {
  position: absolute;
  top: var(--pad);
  right: var(--pad);
  top: max(var(--pad), env(safe-area-inset-top, 0px));
  right: max(var(--pad), env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(250, 243, 220, 0.1);
  border: 1px solid rgba(250, 243, 220, 0.22);
  backdrop-filter: blur(10px);
  color: rgba(250, 243, 220, 0.9);
  text-decoration: none;
  font-size: 0.92rem;
}

.top-nav a:hover {
  background: rgba(250, 243, 220, 0.14);
}

.bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, var(--overlay-strong), var(--overlay-soft) 48%, var(--overlay-clear));
}

.content {
  max-width: 52rem;
}

.monogram {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 40px;
  padding: 0 0.9rem 0 0.6rem;
  border-radius: 999px;
  background: rgba(250, 243, 220, 0.12);
  border: 1px solid rgba(250, 243, 220, 0.24);
  backdrop-filter: blur(10px);
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.82rem;
  text-decoration: none;
}

.monogram-mark {
  width: 22px;
  height: 22px;
}

h1 {
  margin: 0.85rem 0 0.35rem;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(2rem, 3.4vw + 0.9rem, 4.2rem);
  text-shadow: 0 14px 60px rgba(0, 0, 0, 0.6);
}

.tagline {
  margin: 0 0 1.05rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.email {
  display: inline-block;
  color: rgba(250, 243, 220, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(213, 171, 117, 0.72);
  padding-bottom: 0.15rem;
}

.email:hover {
  border-bottom-color: rgba(213, 171, 117, 1);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: clamp(1rem, 3vw, 2rem);
  place-items: center;
}

.modal:target {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(40, 21, 10, 0.82), rgba(40, 21, 10, 0.58));
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 22px;
  border: 1px solid rgba(250, 243, 220, 0.18);
  background: rgba(40, 21, 10, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: clamp(1.1rem, 2.8vw, 2rem);
}

.modal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid rgba(250, 243, 220, 0.14);
}

.modal h2 {
  margin: 0;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.55rem;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 243, 220, 0.18);
  background: rgba(250, 243, 220, 0.08);
  color: rgba(250, 243, 220, 0.9);
  text-decoration: none;
  font-size: 0.92rem;
}

.modal-close:hover {
  background: rgba(250, 243, 220, 0.12);
}

.modal-lede {
  margin: 0 0 1.25rem;
  max-width: 70ch;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(250, 243, 220, 0.86);
}

.modal-body {
  margin: 0 0 1.1rem;
  max-width: 70ch;
  line-height: 1.65;
  color: rgba(250, 243, 220, 0.82);
}

.modal-label {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 243, 220, 0.72);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(250, 243, 220, 0.12);
}

.modal-list {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(250, 243, 220, 0.82);
  display: grid;
  gap: 0.7rem;
}

.modal-list li {
  line-height: 1.5;
}

.modal-footer {
  margin: 1.25rem 0 0;
}

.notfound {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 20% 15%, rgba(104, 138, 133, 0.22), transparent 55%),
    radial-gradient(circle at 85% 25%, rgba(165, 114, 33, 0.16), transparent 55%),
    var(--color-ink-900);
}

.notfound-inner {
  max-width: 52rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 760px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .monogram {
    height: 38px;
    padding: 0 0.75rem 0 0.55rem;
  }

  .top-nav a {
    height: 36px;
    padding: 0 0.7rem;
    font-size: 0.9rem;
  }

  .modal-card {
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
  }
}
