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

html, body {
  height: 100%;
  background: #24160d;
  color: #fff6ea;
  overflow: hidden;
}

/* no selecting, dragging, long-press menus or tap flashes; links still work */
html {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none; /* no pinch-zoom or pull-to-refresh on the scene */
}
img, canvas, svg { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
a, button { -webkit-user-drag: none; touch-action: manipulation; }

body {
  font-family: "Jost", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- scene layers ---------- */
.scene, .layer { position: fixed; inset: 0; }
.layer { width: 100%; height: 100%; pointer-events: none; }

.ground {
  position: absolute;
  inset: -5%;
  will-change: transform;
}
.ground img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 40%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 2s ease;
  animation: drift 80s ease-in-out infinite alternate;
}
.ground img.loaded { opacity: 1; }

@keyframes drift {
  from { transform: scale(1.06) translate(0, 0); }
  to   { transform: scale(1.16) translate(-2.5%, 1.5%); }
}

/* cloud + bird shadows darken the ground */
.shadows { mix-blend-mode: multiply; }

/* golden-hour colour grade */
.grade {
  background:
    linear-gradient(155deg, rgba(255, 168, 80, .30) 0%, rgba(255, 150, 70, .08) 45%, rgba(70, 30, 60, .30) 100%);
  mix-blend-mode: soft-light;
}
.vignette {
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(30, 16, 8, .38) 0%, rgba(30, 16, 8, 0) 70%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 50%, rgba(22, 11, 5, .6) 100%);
}
.sunglow {
  background:
    radial-gradient(circle at 6% -6%, rgba(255, 196, 120, .55) 0%, rgba(255, 170, 90, .18) 28%, rgba(255, 160, 80, 0) 55%);
  mix-blend-mode: screen;
}

/* ---------- headline ---------- */
.hero {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  pointer-events: none;
  will-change: transform;
  animation: float 9s ease-in-out infinite;
}

.title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: .9;
  text-shadow: 0 2px 40px rgba(40, 18, 6, .55), 0 1px 2px rgba(20, 10, 4, .45);
}
.title span { display: block; }
.t-big {
  font-size: clamp(3.4rem, 12vw, 10rem);
  letter-spacing: -.005em;
  color: #fff8ee;
  --delay: .2s;
}
.subtitle {
  margin-top: clamp(.9rem, 2.2vw, 1.6rem);
  font-weight: 400;
  font-size: clamp(.9rem, 1.7vw, 1.2rem);
  letter-spacing: .42em;
  padding: .55em 1.1em .55em 1.52em; /* extra left pad balances trailing letter-spacing */
  border-radius: 999px;
  color: #fff3e2;
  background: radial-gradient(ellipse at center, rgba(30, 14, 5, .55) 0%, rgba(30, 14, 5, .25) 60%, rgba(30, 14, 5, 0) 100%);
  text-shadow: 0 1px 3px rgba(20, 8, 2, .9), 0 0 18px rgba(30, 14, 5, .8);
  --delay: .7s;
}
.subtitle i { font-style: normal; color: #ffc985; }

/* Entrance: hidden until the web fonts are ready (no swap mid-animation),
   then only opacity + transform animate, which the GPU composites smoothly. */
.t-big, .subtitle, .social { opacity: 0; will-change: opacity, transform; }
.ready .t-big, .ready .subtitle, .ready .social {
  animation: rise 2.2s var(--delay, 0s) cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 24px, 0) scale(.985); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -8px, 0); }
}

/* ---------- social ---------- */
.social {
  position: fixed;
  left: 0; right: 0;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  --delay: 1.3s;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  color: #fff3e2;
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .06em;
  background: rgba(36, 20, 10, .32);
  border: 1px solid rgba(255, 228, 190, .28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .3s, border-color .3s, transform .3s;
}
.social a:hover, .social a:focus-visible {
  background: rgba(255, 190, 110, .22);
  border-color: rgba(255, 220, 170, .6);
  transform: translateY(-2px);
}
.social a:focus-visible { outline: 2px solid #ffd9a0; outline-offset: 3px; }
.social svg { width: 18px; height: 18px; flex: none; }

/* ---------- tilt hint (iOS) ---------- */
.tilt-hint {
  position: fixed;
  left: 50%;
  bottom: calc(max(24px, env(safe-area-inset-bottom)) + 56px);
  transform: translateX(-50%);
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  font: 300 .75rem/1.2 "Jost", system-ui, sans-serif;
  letter-spacing: .14em;
  color: #fff3e2;
  background: rgba(36, 20, 10, .35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  opacity: 0;
  animation: hint-in 1.2s 2.4s ease forwards, hint-pulse 2.8s 3.6s ease-in-out infinite;
  transition: opacity .6s;
}
.tilt-hint[hidden] { display: none; }
.tilt-hint.gone { animation: none; opacity: 0; pointer-events: none; }
@keyframes hint-in { to { opacity: .9; } }
@keyframes hint-pulse { 0%, 100% { opacity: .9; } 50% { opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  .ground img, .hero, .ready .t-big, .ready .subtitle, .ready .social { animation: none; }
  .t-big, .subtitle, .social { opacity: 1; }
}

@media (max-width: 520px) {
  .subtitle {
    font-size: .8rem;
    letter-spacing: .24em;
    padding: .55em .9em .55em 1.14em;
    white-space: nowrap;
  }
  .social a { font-size: .8rem; padding: 8px 14px 8px 11px; }
}
