@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-300-latin.woff2") format("woff2");
}

:root {
  --ink: #e6ebee;
  --ink-dim: rgba(216, 226, 232, .6);
  --night: #0a121b;
  /* focal points (object-position) keep the cave in frame at any aspect */
  --focus-land: 30% 55%;
  --focus-port: 60% 62%;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); overflow: hidden; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: geometricPrecision; }

.scene { position: fixed; inset: 0; overflow: hidden; isolation: isolate; background: var(--night); }

/* ---------- photo (slightly oversized for parallax) ---------- */
.photo {
  position: absolute;
  inset: -3%;
  will-change: transform;
}
.photo picture, .photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.photo img {
  object-fit: cover;
  object-position: var(--focus-land);
}
@media (max-aspect-ratio: 4/5) {
  .photo img { object-position: var(--focus-port); }
  .photo { animation: breathe 48s ease-in-out infinite alternate; }   /* slow ambient drift on phones */
}
@keyframes breathe {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-1.2%, -.8%, 0) scale(1.025); }
}

/* ---------- fog ---------- */
.fog {
  position: absolute;
  left: 0;
  width: 200%;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 50% 100%;
  will-change: transform;
}
.fog-1 {
  top: 30%; height: 45%;
  opacity: .5;
  background-image:
    radial-gradient(30% 38% at 15% 55%, rgba(170, 196, 214, .18), transparent 70%),
    radial-gradient(34% 30% at 52% 48%, rgba(170, 196, 214, .14), transparent 70%),
    radial-gradient(26% 40% at 84% 58%, rgba(170, 196, 214, .16), transparent 70%);
  animation: drift 180s linear infinite;
}
.fog-2 {
  top: 50%; height: 40%;
  opacity: .55;
  background-image:
    radial-gradient(28% 34% at 22% 60%, rgba(180, 204, 220, .16), transparent 72%),
    radial-gradient(22% 30% at 60% 66%, rgba(180, 204, 220, .12), transparent 72%),
    radial-gradient(32% 36% at 90% 56%, rgba(180, 204, 220, .14), transparent 72%);
  animation: drift 120s linear infinite reverse;
}
.fog-3 {
  top: 68%; height: 38%;
  opacity: .6;
  background-image:
    radial-gradient(34% 40% at 12% 62%, rgba(190, 210, 224, .13), transparent 72%),
    radial-gradient(30% 34% at 48% 70%, rgba(190, 210, 224, .1), transparent 72%),
    radial-gradient(30% 38% at 80% 60%, rgba(190, 210, 224, .12), transparent 72%);
  animation: drift 80s linear infinite;
}
@keyframes drift { from { translate: 0 0; } to { translate: -50% 0; } }

/* ---------- bats ---------- */
.bats { position: absolute; inset: 0; pointer-events: none; }
.bat {
  position: absolute;
  left: 0; top: 0;
  width: 44px; height: 24px;
  margin: -12px 0 0 -22px;
  color: #05080c;
  will-change: transform, opacity;
  overflow: visible;
}
.bat .wings { transform-origin: 22px 11px; animation: flap var(--flap, .2s) ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(-.4); } }

/* ---------- finishing ---------- */
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 22% at 50% var(--title-y, 22%), rgba(4, 8, 14, .32), rgba(4, 8, 14, 0) 100%),
    radial-gradient(130% 100% at 50% 45%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .45) 100%);
}
.grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- lettering ---------- */
.scene { --title-y: 19%; }
@media (max-aspect-ratio: 4/5) { .scene { --title-y: 27%; } }
.mark {
  position: absolute; left: 0; right: 0;
  top: var(--title-y);
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; pointer-events: none; z-index: 2;
  animation: rise 2.6s cubic-bezier(.2, .7, .2, 1) .3s both;
}
.title {
  margin: 0;
  font-family: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 6.6vw, 6rem);
  line-height: 1;
  letter-spacing: .42em;
  padding-left: .42em;
  text-transform: uppercase;
  color: var(--ink);
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  text-shadow: 0 0 18px rgba(8, 14, 22, .55), 0 0 2px rgba(8, 14, 22, .35);
  white-space: nowrap;
}
.ornament { display: flex; align-items: center; gap: 14px; margin-top: clamp(14px, 2.4vmin, 26px); color: var(--ink-dim); }
.ornament .rule { display: block; width: clamp(48px, 9vw, 120px); height: 1px; background: linear-gradient(90deg, rgba(216, 226, 232, 0), rgba(216, 226, 232, .6)); transform: scaleY(.6); }
.ornament .rule:last-child { background: linear-gradient(270deg, rgba(216, 226, 232, 0), rgba(216, 226, 232, .6)); }
.ornament svg { fill: none; stroke: currentColor; stroke-width: .8; stroke-linejoin: round; stroke-linecap: round; }
@keyframes rise {
  from { opacity: 0; translate: 0 8px; filter: blur(3px); }
  to   { opacity: 1; translate: 0 0; filter: blur(0); }
}

/* ---------- final wordmark (Tin Bat v2, roosting bat 1.25x) ----------
   width = the old live-text glyph width (6.25 x the old title font-size), so placement and scale are unchanged */
/* the new block is taller (rule + bat hang below the letters): nudge it down so the letters sit where the old title did */
.mark.mark-logo { transform: translateY(-36%); }
.title.logo {
  letter-spacing: 0; padding-left: 0; line-height: 0; text-shadow: none;
  color: var(--ink);
}
.wordmark {
  display: block;
  width: calc(6.25 * clamp(2.5rem, 6.6vw, 6rem));
  max-width: 88vw;
  height: auto;
  aspect-ratio: 4200 / 1232;
  overflow: visible;
  shape-rendering: geometricPrecision;
  filter: drop-shadow(0 0 14px rgba(8, 14, 22, .55)) drop-shadow(0 0 2px rgba(8, 14, 22, .35));
}
.ornament.logo-orn { gap: 0; color: var(--ink); }
.ornament.logo-orn svg {
  display: block; width: clamp(190px, 26vw, 360px); height: auto; aspect-ratio: 3648 / 617;
  stroke: none; fill: currentColor; overflow: visible;
  filter: drop-shadow(0 0 2px rgba(8, 14, 22, .35));
}

/* ---------- reduced motion: still photo + lettering only ---------- */
@media (prefers-reduced-motion: reduce) {
  .photo, .mark { animation: none !important; transform: none; }
  .mark { transform: translateY(-50%); }
  .fog, .bats { display: none; }
}
