/* Nelumbo public site: the landing (a slow scroll over a particle field)
   and the legal pages. Palette from assets/brand: terracotta and sand. */

@font-face { font-family: "Caveat"; src: url(/assets/fonts/caveat-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #241b16;
  --muted: #6e5f54;
  --terracotta: #be6c46;
  --terracotta-deep: #a55a39;
  --sand: #d9ae84;
  --cream: #fbf4ea;
  --line: rgba(36, 27, 22, 0.12);
  /* The sky behind the particles; scene.js eases these per section. */
  --sky-top: #fbf4ea;
  --sky-bottom: #f1e0cc;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
/* The landing moves one whole section per gesture, so the field behind it is
   always a finished shape (2026-11-27). Without WebGL the page scrolls freely. */
html.snap { scroll-snap-type: y mandatory; }
html.snap.no-webgl { scroll-snap-type: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  color: var(--ink);
  font: 18px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)) fixed;
  transition: color 1.2s ease;
}
body.dark { --ink: #f6ebdf; --muted: #c9b6a4; --line: rgba(246, 235, 223, 0.16); }

a { color: var(--terracotta-deep); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; border-radius: 8px; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* --- nav --- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 48px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 21px/1 var(--serif); }
.brand img { width: 34px; height: auto; }
.nav nav { display: flex; align-items: center; gap: 28px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .3s ease; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.pill {
  color: var(--ink); padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--sky-top) 55%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav nav a.pill:hover { border-color: var(--terracotta); }
@media (max-width: 720px) { .nav nav a:not(.pill) { display: none; } }

/* --- scenes --- */
main { position: relative; z-index: 1; }
.scene {
  position: relative; min-height: 100vh; min-height: 100svh;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center;
  padding: 120px clamp(20px, 6vw, 96px);
}
.scene[data-side="left"] { justify-content: flex-start; }
.scene[data-side="right"] { justify-content: flex-start; }
.scene[data-side="center"] { justify-content: center; text-align: center; }
/* Particles sit opposite the words. */
.scene[data-side="right"] .copy { margin-right: auto; }
.scene[data-side="left"] .copy { margin-left: auto; }

.copy { max-width: 540px; }
.copy.wide { max-width: 1080px; }
.copy > * { opacity: 0; transform: translateY(22px); transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.scene.in .copy > * { opacity: 1; transform: none; }
.scene.in .copy > *:nth-child(2) { transition-delay: .12s; }
.scene.in .copy > *:nth-child(3) { transition-delay: .24s; }
.scene.in .copy > *:nth-child(4) { transition-delay: .36s; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  color: var(--terracotta-deep);
}
body.dark .eyebrow { color: var(--sand); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--terracotta); box-shadow: 0 0 0 5px rgba(190, 108, 70, .18); animation: pulse 10s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(.8); } 40% { transform: scale(1.35); } }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(48px, 6.6vw, 96px); line-height: 1; }
h1 em, h2 em { font-style: italic; color: var(--terracotta); }
h2 { font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; }
.copy p { color: var(--muted); font-size: clamp(18px, 1.6vw, 21px); margin: 24px 0 0; }
.copy p.lead { max-width: 34ch; margin-inline: auto; }

/* The hero lotus floats above the words. */
.hero { align-items: flex-end; padding-bottom: 9vh; }
/* On a phone the words sit low and the shape floats above them. */
@media (max-width: 820px) {
  .scene[data-shape="noise"], .scene[data-shape="order"], .scene[data-shape="cup"] { align-items: flex-end; padding-bottom: 9vh; }
}
.hero .copy { max-width: 760px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.scene[data-side="center"] .actions { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  padding: 15px 26px; border-radius: 999px; font: 600 16px/1 var(--sans); border: 0;
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.btn.primary { background: var(--terracotta); color: #fff; box-shadow: 0 14px 34px -14px rgba(190, 108, 70, .9); }
.btn.primary:hover { background: var(--terracotta-deep); transform: translateY(-2px); }
.btn.ghost { color: var(--ink); border: 1px solid var(--line); background: color-mix(in srgb, var(--sky-top) 50%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn.ghost:hover { border-color: var(--terracotta); }

/* --- the worries: the sticky notes draw them; this list is what reads without WebGL --- */
html:not(.no-webgl) .worries { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.worries { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.worries li {
  position: absolute; left: var(--x); top: var(--y);
  font: italic 500 clamp(15px, 1.4vw, 19px)/1.2 var(--serif); color: var(--ink);
  padding: 10px 16px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, #fff 55%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 1.4s ease, filter 1.4s ease;
  animation: drift 9s ease-in-out infinite; animation-delay: var(--d);
}
#noise.in .worries li { opacity: .92; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-14px, -18px); } }
@media (max-width: 820px) {
  .worries li { left: auto; right: 6%; font-size: 14px; }
  .worries li:nth-child(n+4) { display: none; }
}

/* --- gifts --- */
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; text-align: left; }
@media (max-width: 980px) { .gift-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gift-grid { grid-template-columns: 1fr; } }
.gift {
  padding: 28px; border-radius: 26px;
  background: color-mix(in srgb, #fff 48%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .5s ease;
}
.gift:hover { transform: translateY(-6px); border-color: rgba(190, 108, 70, .45); }
.gift .glyph { display: block; font: italic 500 22px/1 var(--serif); color: var(--terracotta); }
.gift h3 { font-size: 26px; margin-top: 18px; }
.copy .gift p { font-size: 16px; margin-top: 10px; }

/* --- breathe --- */
/* Words above, cue and button below, and the breathing sphere in the space between. */
.breathe { align-items: stretch; padding-block: 14vh 8vh; }
.breathe .copy { display: flex; flex-direction: column; align-items: center; }
.breath-cue { font: italic 500 clamp(24px, 2.6vw, 34px)/1.2 var(--serif) !important; color: var(--ink) !important; min-height: 2.4em; margin: auto 0 0 !important; max-width: 16ch; }
.breathe .btn { margin-top: 3vh; }

.access { align-items: flex-start; padding-top: 14vh; }
.access .foot { position: absolute; left: 0; right: 0; bottom: 0; }

/* --- footer --- */
.foot {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 36px clamp(20px, 6vw, 96px) 44px; color: var(--muted); font-size: 14px;
  border-top: 1px solid var(--line);
}
.foot nav { display: flex; gap: 22px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* No WebGL, or reduced motion before the scene draws: the words carry the page. */
.no-webgl .scene { min-height: auto; padding-block: 18vh; }

/* --- legal pages --- */
.legal-page { background: var(--cream); }
.legal-page .nav { position: sticky; background: color-mix(in srgb, var(--cream) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.legal { max-width: 760px; margin: 0 auto; padding: 72px 24px 110px; }
.legal h1 { font-size: clamp(44px, 6vw, 68px); }
.legal .updated { color: var(--muted); margin-top: 14px; }
.legal h2 { font-size: 28px; line-height: 1.2; margin: 52px 0 12px; }
.legal p, .legal li { color: #3d322b; }
.legal ul { padding-left: 22px; }
.legal li { margin: 8px 0; }
.legal .note { margin: 32px 0; padding: 20px 24px; border-radius: 18px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--terracotta); }
.legal table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 16px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; }
