@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* One deep-night theme: dark water, bright type */
  --backdrop-top: #060b20;
  --backdrop-bottom: #0a1330;
  --veil: rgba(4, 8, 22, 0.66);
  --edge: rgba(1, 3, 12, 0.6);
  --ink: #f7faff;
  --ink-soft: #dce6fa;
  --accent: #8db7f6;
  --accent-deep: #b9d4fb;
  --cool: #b4d3ff;
  --warm: #8cf0b6;
  --paper: rgba(12, 21, 50, 0.62);
  --paper-line: rgba(169, 200, 245, 0.24);
  --shadow: rgba(0, 3, 14, 0.6);
  --font: "Newsreader", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: linear-gradient(160deg, var(--backdrop-top), var(--backdrop-bottom));
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

/* ---------- Living background (drawn by site.js) ---------- */

#water {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 46%, transparent 55%, var(--edge) 100%);
}

main {
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 46rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* A soft pool of calm behind the words so text never fights the tiles */
.hero-inner::before {
  content: "";
  position: absolute;
  inset: -12% -14%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--veil) 55%, transparent);
  pointer-events: none;
}

.mark {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: clamp(1.75rem, 4.5vw, 3rem);
  box-shadow: 0 14px 34px var(--shadow), 0 0 0 1px var(--paper-line);
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

h1 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(2.7rem, 7.4vw, 5.2rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 .cool,
.cool {
  color: var(--cool);
}

h1 .warm,
.warm {
  color: var(--warm);
}

.sub {
  margin: clamp(1.5rem, 3.5vw, 2.25rem) 0 0;
  max-width: 30rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.wave {
  width: min(100%, 26rem);
  height: 48px;
  opacity: 0.85;
  margin: clamp(1.75rem, 4vw, 2.75rem) 0;
}

.wave-path {
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 2.4s ease-out 0.9s forwards, sway 6s ease-in-out 3.3s infinite;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes sway {
  0%, 100% {
    transform: translateY(0) scaleY(1);
  }
  50% {
    transform: translateY(-3px) scaleY(1.08);
  }
}

.cta {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.5s ease, color 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--accent);
  color: #060b20;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px var(--shadow);
}

.hint {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Breath ---------- */

.breath {
  padding: clamp(5rem, 13vw, 9rem) 1.5rem;
  display: grid;
  place-items: center;
}

.breath p {
  position: relative;
  margin: 0;
  max-width: 37rem;
  text-align: center;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  text-wrap: pretty;
}

.wide {
  display: none;
}

.breath p::before,
footer::before {
  content: "";
  position: absolute;
  inset: -40% -12%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--veil) 55%, transparent);
  pointer-events: none;
}

footer::before {
  inset: -40% 0;
}

footer {
  position: relative;
}

@media (min-width: 640px) {
  .wide {
    display: inline;
  }
}

/* ---------- Gentle cards ---------- */

.gifts {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem clamp(4rem, 9vw, 7rem);
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.card {
  padding: clamp(1.6rem, 3vw, 2.1rem);
  border-radius: 1.6rem;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  box-shadow: 0 18px 44px var(--shadow);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.card .glyph {
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.1rem;
  color: var(--accent);
}

.card h2 {
  margin: 0 0 0.6rem;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.005em;
}

.card p {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- Still ---------- */

.still {
  display: grid;
  place-items: center;
  padding: 0 1.5rem clamp(3.5rem, 9vw, 6rem);
}

.line {
  display: block;
  width: 1px;
  height: clamp(4rem, 10vw, 7rem);
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: 0.6;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    opacity: 0.35;
    transform: scaleY(0.92);
  }
  50% {
    opacity: 0.8;
    transform: scaleY(1);
  }
}

/* ---------- Footer ---------- */

footer {
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.dedication {
  margin: 0 auto 1.25rem;
  max-width: 34rem;
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.legal {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.legal a {
  text-decoration: none;
  transition: opacity 0.4s ease;
}

.legal a:hover,
.legal a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

/* ---------- Motion ---------- */

.fade {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

.floaty {
  animation: rise 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards, float 5s ease-in-out infinite;
  animation-delay: var(--d, 0s), 1.6s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

.reveal {
  transition: opacity 1.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0s);
}

/* Hidden only once site.js is confirmed running, so content never stays invisible without it */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade,
  .reveal,
  .js .reveal,
  .floaty,
  .wave-path,
  .line {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
    stroke-dashoffset: 0;
  }
}

/* ---------- Legal pages ---------- */

.doc {
  max-width: 42rem;
  margin: clamp(1.5rem, 5vw, 4rem) auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.4rem, 4vw, 3rem);
  border-radius: 1.8rem;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  box-shadow: 0 22px 54px var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.doc .back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.doc .back:hover {
  color: var(--ink);
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.5rem;
}

.doc .meta {
  margin: 0 0 2.25rem;
  color: var(--ink-soft);
  font-style: italic;
}

.doc h2 {
  font-weight: 400;
  font-size: 1.35rem;
  margin: 2.4rem 0 0.7rem;
}

.doc p {
  margin: 0 0 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.doc ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}

.doc li {
  margin: 0 0 0.4rem;
}

.doc .intro {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

.doc a:not(.back) {
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

/* ---------- 404 ---------- */

.lost {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.lost p {
  margin: 1.25rem 0 2rem;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--ink-soft);
}

.lost > div {
  position: relative;
  padding: 1rem 2rem;
}

.lost > div::before {
  content: "";
  position: absolute;
  inset: -30% -40%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--veil) 55%, transparent);
  pointer-events: none;
}

/* ---------- Accessibility ---------- */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--backdrop-top);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip:focus {
  top: 1rem;
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Site header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.1rem, 4vw, 2.5rem);
  font-size: 0.98rem;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
}

.site-header .brand img {
  border-radius: 50%;
}

.site-header nav {
  display: flex;
  gap: clamp(0.9rem, 3vw, 1.75rem);
}

.site-header nav a {
  text-decoration: none;
  color: var(--ink);
}

.site-header nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.25em;
}

@media (max-width: 520px) {
  .site-header .brand span {
    display: none;
  }
}

/* ---------- Facts strip ---------- */

.facts {
  list-style: none;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem clamp(2.5rem, 6vw, 4rem);
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  text-align: center;
}

.facts li {
  padding: 1.1rem 0.75rem;
  border-radius: 1.2rem;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.facts strong {
  display: block;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: var(--cool);
}

.facts span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- Screens ---------- */

.screens {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem clamp(4rem, 9vw, 7rem);
  text-align: center;
}

.screens > h2 {
  position: relative;
}

.screens > h2::before {
  content: "";
  position: absolute;
  inset: -80% -10%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--veil) 55%, transparent);
  pointer-events: none;
}

.screens h2,
.get h2 {
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  letter-spacing: -0.01em;
}

.phones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  margin: 0;
}

.phones figure {
  margin: 0;
}

.phones img {
  display: block;
  width: min(15rem, 68vw);
  height: auto;
  filter: drop-shadow(0 22px 34px var(--shadow));
}

.phones figcaption {
  margin-top: 1rem;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- Get the app ---------- */

.get {
  padding: 0 1.5rem clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.6rem 0.7rem 1.2rem;
  border-radius: 0.9rem;
  background: #0b0f1a;
  color: #fff;
  text-align: left;
  text-decoration: none;
  line-height: 1.1;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.store:hover,
.store:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--shadow);
}

.store svg {
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
}

.store small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store b {
  display: block;
  font-weight: 500;
  font-size: 1.35rem;
}

.get > div {
  position: relative;
  display: inline-block;
  padding: 1rem 2rem;
}

.get > div::before {
  content: "";
  position: absolute;
  inset: -25% -30%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--veil) 55%, transparent);
  pointer-events: none;
}

.trademark {
  margin: 1rem auto 0;
  max-width: 34rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
