/* ============================================================
   Lightkeeper's Watch — marketing site
   Painterly nautical night theme. Epic & playful.
   ============================================================ */

:root {
  --night:      #0a1120;
  --night-2:    #0e1830;
  --night-3:    #12213f;
  --panel:      rgba(255, 255, 255, 0.045);
  --panel-2:    rgba(255, 255, 255, 0.07);
  --stroke:     rgba(242, 236, 221, 0.10);
  --amber:      #f4b24c;
  --amber-hi:   #ffd07a;
  --amber-deep: #d8913a;
  --moon:       #f3ecdd;
  --moon-dim:   rgba(243, 236, 221, 0.62);
  --moon-faint: rgba(243, 236, 221, 0.40);
  --sea:        #3e5c7e;
  --green:      #82bd73;
  --maxw:       1180px;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --shadow:     0 30px 80px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  overflow-x: hidden; max-width: 100vw;
}

body {
  background: var(--night);
  color: var(--moon);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden; max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

body::before {                     /* base atmospheric gradient */
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(244, 178, 76, 0.10), transparent 60%),
    radial-gradient(900px 700px at 10% 110%, rgba(62, 92, 126, 0.18), transparent 60%),
    linear-gradient(180deg, #0a1120 0%, #0b1426 55%, #091020 100%);
  z-index: -3;
}

#stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; }

h1, h2, h3, .display {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.eyebrow {
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--amber);
  font-weight: 600;
}
.grad-amber {
  background: linear-gradient(120deg, var(--amber-hi), var(--amber) 55%, var(--amber-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 0.85rem; --pad-x: 1.5rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(120deg, var(--amber-hi), var(--amber) 60%, var(--amber-deep));
  color: #2a1c07;
  box-shadow: 0 12px 34px rgba(244, 178, 76, 0.32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(244, 178, 76, 0.45); }
.btn-ghost { background: var(--panel); color: var(--moon); border-color: var(--stroke); }
.btn-ghost:hover { background: var(--panel-2); transform: translateY(-2px); }

/* App Store badge */
.appstore {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1.25rem; border-radius: 14px;
  background: #05070d; border: 1px solid var(--stroke); color: var(--moon);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.appstore:hover { transform: translateY(-3px); border-color: rgba(244,178,76,0.5); }
.appstore svg { width: 26px; height: 26px; }
.appstore small { display: block; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--moon-dim); }
.appstore b { font-family: "Cinzel", serif; font-size: 1.12rem; font-weight: 700; }
.appstore--mobile { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(9, 15, 28, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--stroke);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; }
.brand { display: flex; align-items: center; gap: 0.7rem; font-family: "Cinzel", serif; font-weight: 700; font-size: 1.12rem; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.brand span { color: var(--moon); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--moon-dim); font-size: 0.94rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--moon); }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.menu-btn { display: none; background: none; border: 0; color: var(--moon); cursor: pointer; }

/* ---------- Scroll hero ---------- */
.hero {
  position: relative;
  height: 320vh;                    /* scroll length for the frame scrub */
}
.hero-sticky {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  overflow: hidden;
  display: grid; place-items: center;
}
.hero-poster {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
#hero-canvas {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 20%, transparent 40%, rgba(6, 10, 20, 0.55) 100%),
    linear-gradient(180deg, rgba(8,12,22,0.55) 0%, transparent 22%, transparent 55%, rgba(8,12,22,0.92) 100%);
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  padding: 0 1.25rem; max-width: 880px;
  transition: opacity 0.2s linear, transform 0.2s linear;
}
.hero-content h1 { font-size: clamp(2.5rem, 7vw, 5.4rem); text-shadow: 0 8px 40px rgba(0,0,0,0.6); }
.hero-content p {
  margin: 1.2rem auto 2rem; max-width: 560px;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: var(--moon);
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--moon-faint); font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.scroll-cue .dot { width: 22px; height: 34px; border: 1px solid var(--moon-faint); border-radius: 12px; position: relative; }
.scroll-cue .dot::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; border-radius: 3px;
  background: var(--amber); transform: translateX(-50%); animation: cue 1.6s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Sections ---------- */
section { position: relative; }
.section-pad { padding: clamp(5rem, 12vh, 9rem) 0; }
.section-head { max-width: 640px; margin-bottom: 3.2rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin: 0.9rem 0 0.8rem; }
.section-head p { color: var(--moon-dim); font-size: 1.08rem; }

/* Intro band */
.band {
  background:
    linear-gradient(180deg, transparent, rgba(244,178,76,0.05), transparent);
}
.lead {
  font-family: "Cinzel", serif; font-weight: 500;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem); line-height: 1.35;
  text-align: center; max-width: 900px; margin-inline: auto;
}
.lead b { color: var(--amber); font-weight: 700; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 22px;
  padding: 2rem 1.6rem; position: relative; overflow: hidden;
}
.step .num {
  font-family: "Cinzel", serif; font-size: 3rem; color: rgba(244,178,76,0.22);
  line-height: 1; margin-bottom: 0.6rem;
}
.step h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.step p { color: var(--moon-dim); font-size: 0.98rem; }
.step .ico { font-size: 1.6rem; margin-bottom: 0.4rem; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.feature {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 22px;
  padding: 1.9rem 1.6rem; transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(244,178,76,0.4); background: var(--panel-2); }
.feature .badge {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(244,178,76,0.35), rgba(244,178,76,0.08));
  border: 1px solid rgba(244,178,76,0.28); font-size: 1.5rem; margin-bottom: 1.1rem;
}
.feature h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.feature p { color: var(--moon-dim); font-size: 0.97rem; }

/* Split showcase (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.split.rev .split-media { order: 2; }
.split-media { position: relative; }
.split-media .frame {
  border-radius: 26px; overflow: hidden; border: 1px solid var(--stroke);
  box-shadow: var(--shadow); background: var(--night-2);
}
.split-media video, .split-media img { width: 100%; display: block; }
.split-media .glow {
  position: absolute; inset: -12% -8%; z-index: -1; border-radius: 40px;
  background: radial-gradient(circle at 50% 40%, rgba(244,178,76,0.28), transparent 62%);
  filter: blur(30px);
}
.split-text h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0.8rem 0 1rem; }
.split-text p { color: var(--moon-dim); font-size: 1.05rem; margin-bottom: 1rem; }
.ticks { list-style: none; display: grid; gap: 0.7rem; margin-top: 1.2rem; }
.ticks li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--moon); }
.ticks li::before { content: "◆"; color: var(--amber); font-size: 0.7rem; margin-top: 0.42rem; }

/* Chip stat row */
.stat-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.stat {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 18px;
  padding: 1.1rem 1.4rem; min-width: 150px; flex: 1;
}
.stat b { font-family: "Cinzel", serif; font-size: 1.9rem; color: var(--amber); display: block; }
.stat span { color: var(--moon-dim); font-size: 0.9rem; }

/* Gallery marquee */
.gallery { overflow: hidden; padding: 1rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: 1.2rem; width: max-content; animation: marquee 46s linear infinite; }
.track:hover { animation-play-state: paused; }
.tile {
  width: 150px; height: 150px; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--stroke); background: var(--night-2); display: grid; place-items: center; flex: none;
}
.tile img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* CTA */
.cta {
  text-align: center; border-radius: 34px; padding: clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(244,178,76,0.16), transparent 60%),
    linear-gradient(180deg, var(--night-3), var(--night-2));
  border: 1px solid rgba(244,178,76,0.25); position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
.cta p { color: var(--moon-dim); max-width: 520px; margin: 1rem auto 2rem; font-size: 1.08rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer { border-top: 1px solid var(--stroke); padding: 3.5rem 0 2.5rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.footer .brand { margin-bottom: 0.8rem; }
.footer p { color: var(--moon-dim); font-size: 0.92rem; max-width: 300px; }
.footer-col h4 { font-family: "Cinzel", serif; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--moon-faint); margin-bottom: 0.9rem; }
.footer-col a { display: block; color: var(--moon-dim); font-size: 0.95rem; margin-bottom: 0.55rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid var(--stroke); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--moon-faint); font-size: 0.85rem; }

/* ---------- Doc pages (privacy / terms / features) ---------- */
.doc { padding: 9rem 0 5rem; }
.doc-hero { text-align: center; margin-bottom: 3rem; }
.doc-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.doc-hero p { color: var(--moon-dim); margin-top: 0.6rem; }
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { font-size: 1.5rem; margin: 2.4rem 0 0.8rem; color: var(--moon); }
.prose h3 { font-family: "Inter", sans-serif; font-size: 1.08rem; font-weight: 700; margin: 1.6rem 0 0.5rem; }
.prose p, .prose li { color: var(--moon-dim); margin-bottom: 0.9rem; }
.prose ul { padding-left: 1.3rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--amber); }
.prose strong { color: var(--moon); }
.card-note {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 18px;
  padding: 1.3rem 1.5rem; margin: 1.6rem 0; color: var(--moon-dim);
}

/* ---------- Emotional image band ---------- */
.showcase-band {
  position: relative; min-height: 78vh;
  display: grid; align-items: center; overflow: hidden;
  border-block: 1px solid var(--stroke);
}
.showcase-img {
  position: absolute; inset: -6%;
  background-size: cover; background-position: center;
  will-change: transform;
}
[data-kenburns] { animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02) translateY(0); } to { transform: scale(1.12) translateY(-2%); } }
.showcase-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,12,22,0.92) 0%, rgba(8,12,22,0.55) 45%, rgba(8,12,22,0.15) 100%),
    linear-gradient(180deg, rgba(8,12,22,0.4), transparent 30%, transparent 70%, rgba(8,12,22,0.6));
}
.showcase-copy { position: relative; z-index: 2; max-width: 640px; padding-block: 3rem; }
.showcase-copy h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0.8rem 0 1rem; text-shadow: 0 6px 30px rgba(0,0,0,0.6); }
.showcase-copy p { color: var(--moon); font-size: 1.1rem; max-width: 500px; text-shadow: 0 2px 16px rgba(0,0,0,0.6); }

/* ---------- Subtle motion ---------- */
[data-float] { animation: float 7s var(--ease) infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Feature cards: a soft light that follows the cursor */
.feature { position: relative; }
.feature::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(244,178,76,0.16), transparent 60%);
  transition: opacity 0.4s; pointer-events: none;
}
.feature:hover::before { opacity: 1; }

/* CTA particle layer */
.cta { }
.cta canvas.sparks { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cta > * { position: relative; z-index: 1; }

/* Coming-soon toast */
.soon-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: linear-gradient(120deg, var(--amber-hi), var(--amber-deep));
  color: #2a1c07; font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; box-shadow: 0 12px 34px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); z-index: 200;
}
.soon-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Coming-soon badge tag */
.appstore[href="#coming-soon"] { position: relative; }

@media (prefers-reduced-motion: reduce) {
  [data-kenburns], [data-float] { animation: none; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(9,15,28,0.96); backdrop-filter: blur(14px); padding: 1.2rem 1.25rem; gap: 1.1rem;
    border-bottom: 1px solid var(--stroke);
  }
  .appstore.appstore--mobile { display: inline-flex; margin-top: 0.4rem; color: var(--moon); }
  .steps, .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split.rev .split-media { order: 0; }
  .footer-grid { flex-direction: column; }
  .hero { height: 260vh; }
}
@media (max-width: 560px) {
  .nav-cta .btn-ghost { display: none; }
  .appstore small { display: none; }
}
