:root {
  --ink: #f6f1e8;
  --ink-soft: rgba(246, 241, 232, 0.78);
  --bg: #0e0d0b;
  --gutter: clamp(20px, 4vw, 56px);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ---------- Background ---------- */

#bg, #fallback, .scrim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#bg {
  display: block;
  opacity: 0;
  transition: opacity 1.6s ease;
}
#bg.ready { opacity: 1; }

#fallback { display: none; }
#fallback img {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  object-fit: cover;
  filter: blur(3px);
  opacity: 0;
  transition: opacity 2.5s ease;
}
#fallback img.on { opacity: 1; }

/* Keeps type legible on bright photos without flattening the image. */
.scrim {
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.12) 45%, rgba(0,0,0,0) 70%);
}

/* ---------- Content ---------- */

.top, .hero, .bottom {
  position: relative;
  z-index: 1;
  padding-inline: var(--gutter);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: calc(var(--gutter) * 0.8);
}

.wordmark {
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.link {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(246, 241, 232, 0.4);
  transition: border-color 0.3s ease;
}
.link:hover { border-color: var(--ink); }

.hero {
  align-self: end;
  max-width: 44rem;
  padding-bottom: clamp(28px, 5vh, 56px);
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.25);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 em { font-style: italic; }

.lede {
  margin-top: 1.25rem;
  max-width: 32rem;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1.8rem;
  padding: 0.85em 1.4em;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid rgba(246, 241, 232, 0.55);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(14, 13, 11, 0.12);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cta span { transition: transform 0.3s ease; }
.cta:hover span { transform: translateX(3px); }

a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.bottom {
  display: flex;
  justify-content: flex-end;
  padding-bottom: calc(var(--gutter) * 0.6);
  min-height: 1.5em;
}

.credit {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(246, 241, 232, 0.6);
  transition: opacity 0.8s ease;
}
.credit.hidden { opacity: 0; }

@media (max-width: 600px) {
  .bottom { justify-content: flex-start; }
}
