:root {
  --ink:        #0a0f17;
  --ink-deep:   #050810;
  --fog:        rgba(180, 200, 220, 0.05);
  --bone:       #e8e0cf;
  --bone-dim:   #9a9282;
  --phosphor:   #7fc7b2;
  --brass:      #c9a66b;
  --water:      #14202c;

  --serif-display: 'Cormorant Garamond', serif;
  --serif-body:    'EB Garamond', serif;
  --mono:          'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--serif-body);
  background: var(--ink);
  color: var(--bone);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmospheric backdrop */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, var(--water) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(127, 199, 178, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 50%, var(--ink-deep) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Drifting fog */
body::after {
  content: '';
  position: fixed; inset: -10%;
  background-image:
    radial-gradient(ellipse 40% 20% at 30% 40%, var(--fog), transparent),
    radial-gradient(ellipse 30% 15% at 70% 60%, var(--fog), transparent),
    radial-gradient(ellipse 50% 25% at 50% 80%, var(--fog), transparent);
  pointer-events: none;
  z-index: 1;
  animation: drift 80s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateX(-4%) translateY(0); }
  50%      { transform: translateX(4%)  translateY(-1%); }
}

/* Film grain */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.35;
  mix-blend-mode: overlay;
}

main {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.5vh, 2.25rem) clamp(1.5rem, 5vw, 4rem);
}

/* ── Top bar ───────────────────────────── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  animation: fade 1.6s ease-out;
}
.topbar-mark {
  width: 28px; height: 28px;
  color: var(--phosphor);
  opacity: 0.85;
}
.topbar-meta { font-feature-settings: 'tnum'; }

/* ── Hero (centered) ───────────────────── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1rem, 3vh, 3rem) 1rem;
  gap: clamp(1.25rem, 3vh, 2.25rem);
}

.hero-image {
  position: relative;
  width: clamp(220px, 38vw, 420px);
  max-height: 42vh;
  aspect-ratio: 4 / 5;
  max-width: calc(42vh * 4 / 5);
  opacity: 0;
  animation: fade 2.2s ease-out 0.3s forwards;
}

/* TODO: When swapping the SVG for a photograph or illustration, replace the
   .hero-image-art block with an <img> tag (portrait 4:5, ~1200x1500). */
.hero-image-art {
  position: absolute; inset: 0;
  overflow: visible;
  background: transparent;
}
.hero-image-art svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Layered atmosphere — subtle parallax */
.layer-fog-far  { animation: drift-sway-far  50s ease-in-out infinite; }
.layer-fog-mid  { animation: drift-sway-mid  28s ease-in-out infinite; }
.layer-halo     { animation: pulse-halo  5s ease-in-out infinite; }
.layer-boat     { animation: bob         7s ease-in-out infinite; }
.layer-ripples path:nth-child(1) { animation: ripple-drift-a 6s ease-in-out infinite; }
.layer-ripples path:nth-child(2) { animation: ripple-drift-b 8s ease-in-out infinite; }
.layer-ripples path:nth-child(3) { animation: ripple-drift-c 10s ease-in-out infinite; }
.layer-embers circle:nth-child(1) { animation: ember-rise 6s ease-out infinite; }
.layer-embers circle:nth-child(2) { animation: ember-rise 7s ease-out 2s infinite; }
.layer-embers circle:nth-child(3) { animation: ember-rise 8s ease-out 4s infinite; }

@keyframes drift-sway-far {
  0%, 100% { transform: translate(-5px, -2px); }
  50%      { transform: translate(5px, 2px); }
}
@keyframes drift-sway-mid {
  0%, 100% { transform: translate(7px, 2px); }
  50%      { transform: translate(-7px, -2px); }
}
@keyframes pulse-halo { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.5px); }
}
@keyframes ripple-drift-a {
  0%, 100% { transform: translateX(-1.5px); opacity: 0.55; }
  50%      { transform: translateX(1.5px);  opacity: 0.75; }
}
@keyframes ripple-drift-b {
  0%, 100% { transform: translateX(2px);    opacity: 0.5; }
  50%      { transform: translateX(-2px);   opacity: 0.7; }
}
@keyframes ripple-drift-c {
  0%, 100% { transform: translateX(-1px);   opacity: 0.4; }
  50%      { transform: translateX(1px);    opacity: 0.6; }
}
@keyframes ember-rise {
  0%   { transform: translateY(8px);   opacity: 0; }
  20%  { opacity: 0.85; }
  100% { transform: translateY(-14px); opacity: 0; }
}

/* ── Tagline ───────────────────────────── */
.tagline {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--bone);
  max-width: 18ch;
  opacity: 0;
  animation: rise 1.1s ease-out 0.9s forwards;
}
.tagline em {
  font-style: italic;
  font-weight: 400;
  display: block;
  color: var(--bone);
}

/* ── Signup ────────────────────────────── */
.signup {
  width: 100%;
  max-width: 440px;
  opacity: 0;
  animation: rise 1.1s ease-out 1.2s forwards;
}
.signup-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 0.85rem;
  display: block;
}
.signup-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(232, 224, 207, 0.22);
  padding-bottom: 0.5rem;
  transition: border-color 0.4s;
}
.signup-form:focus-within { border-bottom-color: var(--phosphor); }
.signup-form input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  color: var(--bone);
  font-family: var(--serif-body);
  font-size: 1.1rem;
  padding: 0.6rem 0;
  text-align: left;
}
.signup-form input::placeholder {
  color: var(--bone-dim);
  font-style: italic;
  opacity: 0.7;
}
.signup-form button {
  background: transparent;
  border: none;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  transition: color 0.3s, transform 0.3s;
  white-space: nowrap;
}
.signup-form button:hover {
  color: var(--phosphor);
  transform: translateX(2px);
}
.signup-note {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
  opacity: 0.75;
  text-align: center;
}

/* ── Footer ────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(232, 224, 207, 0.08);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  opacity: 0;
  animation: fade 1.5s ease-out 1.6s forwards;
  flex-wrap: wrap;
}
.footer a {
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.footer a:hover { color: var(--phosphor); }
.footer .links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ── Animations ────────────────────────── */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .footer { justify-content: center; text-align: center; }
  .footer > * { width: 100%; }
  .footer .links { justify-content: center; }
}