/* ============================================================
   Svalbo — Off-grid at Horse Mountain
   Teaser / coming-soon page. Dark, cinematic, atmospheric.
   ============================================================ */

:root {
  --night-top:  #101120;
  --night-mid:  #1c1a2e;
  --dusk:       #3a2f45;
  --glow-warm:  #8a5a4e;
  --glow-amber: #d99a63;
  --ridge-far:  #262338;
  --ridge-near: #14121f;

  --bone:       #f2ece3;
  --bone-dim:   rgba(242, 236, 227, 0.62);
  --bone-faint: rgba(242, 236, 227, 0.20);
  --amber:      #e6ac74;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  --frame-inset: clamp(10px, 1.6vw, 22px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--night-top);
}

body {
  font-family: var(--sans);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ---------- Designer frame ---------- */
.frame {
  position: fixed;
  inset: var(--frame-inset);
  border: 1px solid var(--bone-faint);
  border-radius: clamp(12px, 1.4vw, 20px);
  pointer-events: none;
  z-index: 40;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
}

/* ---------- Hero shell ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  isolation: isolate;
}

/* ---------- Optional real photo (swap in when available) ---------- */
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ---------- Sky / dusk scene ---------- */
.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(130% 70% at 50% 92%,
      rgba(217, 154, 99, 0.60) 0%,
      rgba(138, 90, 78, 0.28) 32%,
      rgba(138, 90, 78, 0.0) 62%),
    linear-gradient(180deg,
      #0d0e1b 0%,
      #17162a 34%,
      #322843 62%,
      #55414f 82%,
      #6f4e4e 100%);
  animation: skyBreathe 26s ease-in-out infinite alternate;
}

@keyframes skyBreathe {
  from { filter: brightness(0.96) saturate(1.0); }
  to   { filter: brightness(1.06) saturate(1.08); }
}

.stars {
  position: absolute;
  inset: 0 0 42% 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 24%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.2px 1.2px at 28% 12%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.3px 1.3px at 44% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px   at 62% 16%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 74% 26%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.1px 1.1px at 86% 14%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px   at 20% 40%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.2px 1.2px at 54% 8%,  rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px   at 92% 34%, rgba(255,255,255,0.5), transparent);
  opacity: 0.7;
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.45; }
  to   { opacity: 0.8; }
}

/* Ridge silhouette — Horse Mountain */
.ridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
  min-height: 220px;
}
.ridge__far  { fill: var(--ridge-far); opacity: 0.9; }
.ridge__near { fill: var(--ridge-near); }

/* Swallow gliding in the sky */
.bird {
  position: absolute;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.16;
  pointer-events: none;
}
.bird--1 {
  width: 46px;
  top: 22%;
  left: 16%;
  transform: rotate(-8deg);
  animation: drift1 34s ease-in-out infinite alternate;
}
.bird--2 {
  width: 30px;
  top: 30%;
  right: 22%;
  transform: rotate(4deg) scaleX(-1);
  opacity: 0.12;
  animation: drift2 40s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate(0,0) rotate(-8deg); }
  to   { transform: translate(40px,-18px) rotate(-4deg); }
}
@keyframes drift2 {
  from { transform: translate(0,0) rotate(4deg) scaleX(-1); }
  to   { transform: translate(-34px,14px) rotate(8deg) scaleX(-1); }
}

/* Film grain */
.grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Legibility scrim behind text */
.scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(80% 60% at 50% 46%, rgba(8,8,16,0.42), transparent 70%),
    linear-gradient(180deg, rgba(8,8,16,0.30) 0%, transparent 26%, transparent 68%, rgba(8,8,16,0.30) 100%);
}

/* ---------- Content ---------- */
.content {
  position: relative;
  z-index: 10;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: min(720px, 88vw);
  padding: clamp(40px, 6vh, 80px) 0 clamp(24px, 4vh, 48px);
  text-align: center;
  animation: rise 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo {
  width: min(340px, 66vw);
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.96;
  margin: 0 auto clamp(28px, 5vh, 46px);
  display: block;
}

.kicker {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.62rem, 1.5vw, 0.74rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 clamp(18px, 3vh, 26px);
}

.headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0 0 clamp(20px, 3vh, 28px);
  color: var(--bone);
}

.story {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.95rem, 2.1vw, 1.08rem);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--bone-dim);
  max-width: 46ch;
  margin: 0 auto clamp(34px, 5vh, 46px);
}

/* ---------- CTA ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.72rem, 1.7vw, 0.82rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  padding: 0.95em 1.8em;
  border: 1px solid var(--bone-faint);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(2px);
  transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.cta:hover {
  border-color: var(--amber);
  color: #fff;
  background: rgba(230, 172, 116, 0.10);
  transform: translateY(-1px);
}
.cta__arrow { transition: transform 0.4s ease; }
.cta:hover .cta__arrow { transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 10;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 24px);
  padding: 0 0 clamp(26px, 5vh, 42px);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.6rem, 1.4vw, 0.72rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-dim);
  animation: rise 1.5s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.footer__star {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
  opacity: 0.34;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .headline .brk { display: none; }
  .footer { flex-wrap: wrap; gap: 10px 18px; }
  .bird--2 { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sky, .stars, .bird, .content, .footer {
    animation: none !important;
  }
  .cta, .cta__arrow { transition: none; }
}
