/* ---------- base ---------- */

@font-face {
  font-family: "Fraunces";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-latin-500-normal.woff2") format("woff2");
}

:root {
  --night: #0b1426;
  --deep: #13223f;
  --land: #081020;
  --glow-rgb: 255 210 122;
  --glow: rgb(var(--glow-rgb));
  --text: #eef1f7;
  --muted: #a9b3c7;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

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

html { background: var(--night); }

body {
  font-family: var(--sans);
  color: var(--text);
}

a { text-underline-offset: 3px; }


/* ---------- home ---------- */

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* fixed bg so iOS doesn't flash white when the toolbar hides */
.home::before {
  content: "";
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100lvh;
  background: radial-gradient(ellipse at 50% 120%, var(--deep) 0%, var(--night) 60%);
  z-index: -1;
  pointer-events: none;
}

/* scene layers sit behind the text */
.lights, .island, .rv, .lighthouse {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}
.home main, .home footer { position: relative; z-index: 1; }

/* stars */
.lights { inset: 0; }
.light {
  position: absolute;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 12px 3px rgb(var(--glow-rgb) / 0.18);
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* hills, cliff and ocean */
.island {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28vh;
  height: 28svh;
}
.waves path { animation: shimmer 4.5s ease-in-out infinite; }
.waves path:nth-child(3n+1) { animation-duration: 3.6s; animation-delay: -1.2s; }
.waves path:nth-child(3n+2) { animation-duration: 5.4s; animation-delay: -3.1s; }
.waves path:nth-child(4n)   { animation-delay: -4.6s; }
@keyframes shimmer {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

/*
  The rv and lighthouse are separate svgs so they don't stretch with the
  hills. Their bottom offsets line up with the hill path in .island:
  offset = (300 - svg y) / 300 * 28svh
*/

/* rv (sits at y ~157) */
.rv {
  left: 36%;
  bottom: 12.5vh;
  bottom: 12.5svh;
  width: clamp(70px, 9vw, 120px);
}
.rv .window { animation: flicker 6s ease-in-out infinite; }
@keyframes flicker {
  0%, 100% { opacity: 0.9; }
  45% { opacity: 0.75; }
  50% { opacity: 1; }
}

/* lighthouse on the cliff top (y ~110) */
.lighthouse {
  left: 70%;
  translate: -50% 0;
  bottom: 17.6vh;
  bottom: 17.6svh;
  height: clamp(90px, 15vh, 150px);
  height: clamp(90px, 15svh, 150px);
  aspect-ratio: 40 / 100;
}
.lighthouse svg { display: block; width: 100%; height: 100%; }
.beam {
  position: absolute;
  left: 50%;
  top: 15%;
  width: 75vw;
  height: 22vh;
  height: 22svh;
  transform-origin: 0 50%;
  translate: 0 -50%;
  background: linear-gradient(to right, rgb(255 220 150 / 0.45), rgb(255 220 150 / 0.08) 60%, transparent);
  clip-path: polygon(0 47%, 100% 0, 100% 100%, 0 53%);
  animation: sweep 9s ease-in-out infinite;
}
@keyframes sweep {
  0%, 100% { transform: scaleX(1); opacity: 0.9; }
  25% { transform: scaleX(0.05); opacity: 0.2; }
  50% { transform: scaleX(-1); opacity: 0.9; }
  75% { transform: scaleX(-0.05); opacity: 0.2; }
}
.lamp-glow { animation: lamp 9s ease-in-out infinite; }
@keyframes lamp {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.55; }
}

/* content */
.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem 30vh;
  padding: 2rem 1.5rem 30svh;
}

.icon {
  width: clamp(3.5rem, 9vw, 5rem);
  height: clamp(3.5rem, 9vw, 5rem);
  margin-bottom: 1rem;
  color: var(--glow);
  animation: beacon 4s ease-in-out infinite;
}
@keyframes beacon {
  0%, 100% { filter: drop-shadow(0 0 10px rgb(var(--glow-rgb) / 0.35)); }
  50% { filter: drop-shadow(0 0 28px rgb(var(--glow-rgb) / 0.8)); }
}

.badge {
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgb(var(--glow-rgb) / 0.4);
  border-radius: 999px;
  background: rgb(var(--glow-rgb) / 0.06);
  color: var(--glow);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.8rem, 9vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgb(var(--glow-rgb) / 0.25);
}
.home h1 span { color: var(--glow); }

.tagline {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.6;
}

.home footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.home footer a {
  color: inherit;
  text-decoration-color: rgb(169 179 199 / 0.4);
}
.home footer a:hover { color: var(--text); }

@media (max-width: 600px) {
  .home main {
    justify-content: flex-start;
    padding-top: 10vh;
    padding-top: 10svh;
  }
  .rv { left: 6%; }
  .lighthouse {
    height: clamp(80px, 12vh, 110px);
    height: clamp(80px, 12svh, 110px);
  }
  .tagline { font-size: 1rem; }
}


/* ---------- text pages (privacy) ---------- */

.doc {
  min-height: 100vh;
  padding: 3rem 1.5rem 4rem;
  background: linear-gradient(to bottom, var(--night), var(--deep));
  color: var(--muted);
  line-height: 1.7;
}
.doc main, .doc footer {
  max-width: 40rem;
  margin: 0 auto;
}
.doc a { color: var(--glow); }

.back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-weight: 500;
  text-decoration: none;
}
.back:hover { text-decoration: underline; }

.doc h1 {
  color: var(--text);
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 7vw, 3rem);
  line-height: 1.1;
}
.updated {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.doc h2 {
  margin: 2.25rem 0 0.5rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
}
.doc p + p { margin-top: 0.85rem; }

.doc footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(169 179 199 / 0.15);
  font-size: 0.85rem;
}


/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .light { animation: none; opacity: 0.6; }
  .waves path { animation: none; opacity: 0.5; }
  .rv .window, .lamp-glow, .icon { animation: none; }
  .icon { filter: drop-shadow(0 0 18px rgb(var(--glow-rgb) / 0.55)); }
  .beam { animation: none; transform: scaleX(-0.6); opacity: 0.5; }
}
