/* nightsense.app: what the home page and the legal pages share
   (2026-10-28): the app's own fonts served from here (never Google's), the
   colours, the night sky, the header with the social links, the footer.
   landing.css and legal.css add each page's own layout. */

@font-face {
  font-family: "Jakarta";
  src: url("/assets/fonts/PlusJakartaSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("/assets/fonts/PlusJakartaSans-SemiBold.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("/assets/fonts/PlusJakartaSans-Bold.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}
/* Fraunces, the wordmark's face: its softest, display cut. */
@font-face {
  font-family: "Fraunces Soft";
  src: url("/assets/fonts/Fraunces.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Soft";
  src: url("/assets/fonts/Fraunces-Italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --night: #050818;
  --cream: #fff6e9;
  --moon: #f4e9da;
  --lavender: #b7a8f6;
  --lavender-soft: #d9d0ff;
  --text: #eef1f8;
  --muted: rgba(238, 241, 248, 0.74);
  --faint: rgba(238, 241, 248, 0.5);
  --line: rgba(255, 246, 233, 0.16);
  --glass: rgba(255, 246, 233, 0.07);
  --serif: "Fraunces Soft", Georgia, "Times New Roman", serif;
  --sans: "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: max(20px, env(safe-area-inset-left));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

/* ─── The sky ─── */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.sky picture, .sky img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  animation: drift 40s ease-in-out infinite alternate;
}
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 50% 38%, rgba(5, 8, 24, 0.25), rgba(5, 8, 24, 0) 70%),
    linear-gradient(180deg,
      rgba(5, 8, 24, 0.92) 0%,
      rgba(5, 8, 24, 0.72) 28%,
      rgba(8, 12, 40, 0.42) 58%,
      rgba(5, 8, 24, 0.55) 86%,
      rgba(5, 8, 24, 0.9) 100%);
}
/* For reading: the same sky, mostly dark. */
.sky.quiet::after {
  background: linear-gradient(180deg, rgba(5, 8, 24, 0.9) 0%, rgba(5, 8, 24, 0.86) 60%, rgba(5, 8, 24, 0.78) 100%);
}
@keyframes drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.2%, -0.8%, 0); }
}
.stars { position: absolute; inset: 0; z-index: 1; }
.star {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation: twinkle var(--d) ease-in-out var(--delay) infinite;
}
.mote {
  position: absolute;
  bottom: -10px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #ffd9a0;
  box-shadow: 0 0 10px 2px rgba(255, 200, 120, 0.55);
  opacity: 0;
  animation: rise var(--d) linear var(--delay) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: var(--o); transform: scale(1); }
}
@keyframes rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: 0.9; }
  80% { opacity: 0.5; }
  100% { opacity: 0; transform: translate3d(var(--x), -78vh, 0); }
}

/* ─── Header: the wordmark, and where to follow us ─── */
.top {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 var(--gutter);
}
.brand { display: inline-flex; border-radius: 8px; }
.brand img { height: 28px; width: auto; display: block; }
.socials { display: flex; gap: 10px; }
.social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
a.social:hover { background: rgba(255, 246, 233, 0.16); border-color: rgba(255, 246, 233, 0.32); transform: translateY(-1px); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
/* No profile yet: shown, but not a link. */
span.social { opacity: 0.6; }

/* ─── Footer ─── */
.foot {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
  padding: 22px 16px max(20px, env(safe-area-inset-bottom));
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; }
.foot nav > * + *::before { content: "·"; margin-right: 10px; color: rgba(238, 241, 248, 0.3); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* Focus you can see, on every link and button. */
a:focus-visible, .store:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; }

/* Words arrive softly, one after another. */
.reveal { opacity: 0; transform: translateY(14px); filter: blur(6px); animation: arrive 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal.d1 { animation-delay: 0.12s; }
.reveal.d2 { animation-delay: 0.35s; }
.reveal.d3 { animation-delay: 0.58s; }
.reveal.d4 { animation-delay: 0.8s; }
.reveal.d5 { animation-delay: 1.02s; }
@keyframes arrive { to { opacity: 1; transform: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
  .sky img, .star, .mote { animation: none; }
  .star { opacity: var(--o); }
  .mote { display: none; }
  .reveal { animation: none; opacity: 1; transform: none; filter: none; }
}
