:root {
  --sea: #0a2630;
  --deep: #061419;
  --haze: #f0c48e;
  --foam: #f6eee2;
  --ink: #f6eee2;
  --ink-soft: rgba(246, 238, 226, 0.7);
  --ink-faint: rgba(246, 238, 226, 0.46);
  --line: rgba(246, 238, 226, 0.12);
  --sans: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  --serif: "Fraunces Variable", "Fraunces", Georgia, serif;
}

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

html, body { height: 100%; }

body {
  background: var(--deep);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  /* where the path of glitter is (in px, for each [data-lit] element) and how much it sparkles right now */
  --lx: 50%;
  --ly: 50%;
  --lg: 0.5;
  --hit: 0;
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  /* what is left without WebGL: a warm haze over a dark sea and a soft path of light */
  background:
    radial-gradient(ellipse 14% 60% at 50% 70%, rgba(240, 196, 142, 0.22), transparent 70%),
    linear-gradient(180deg, #2a4651 0%, #c99a73 17%, #f0c48e 19.5%, #10313b 20.5%, var(--sea) 55%, var(--deep) 100%);
}

.sea {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  display: block;
  opacity: 0;
}

/* a soft shade behind the words, so the headline always reads over the brightest glitter */
.veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse min(48vw, 560px) min(30vh, 280px) at 50% 54%, rgba(6, 20, 25, 0.58), transparent 74%);
}

/* a still grain over everything, so the long gradients of the haze never band */
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---- the top bar, over the sky */
.top {
  position: absolute;
  top: clamp(12px, 3vh, 26px);
  left: clamp(14px, 3.4vw, 34px);
  right: clamp(14px, 3.4vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: clamp(12px, min(1.5vw, 2.6vh), 14px);
  text-shadow: 0 1px 10px rgba(6, 20, 25, 0.35);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--serif);
  font-size: 1.18em;
  font-weight: 460;
  font-variation-settings: "opsz" 40, "SOFT" 100;
  letter-spacing: -0.01em;
}
.brand__mark { width: 1.3em; height: 1.3em; }
.brand__sun { fill: var(--haze); }
.brand__sea { fill: none; stroke: var(--foam); stroke-width: 1.3; stroke-linecap: round; }
.top__nav {
  display: flex;
  gap: clamp(14px, 2.6vw, 30px);
  color: var(--ink-soft);
}
.top__link {
  color: var(--ink);
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(10, 38, 48, 0.28);
  box-shadow: 0 0 0 1px rgba(246, 238, 226, 0.22) inset;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- the hero */
.hero {
  width: min(660px, 100% - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(9px, 2.3vh, 20px);
  margin-top: clamp(26px, 9vh, 90px);
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: rgba(8, 30, 38, 0.5);
  box-shadow: 0 0 0 1px var(--line) inset, 0 1px 0 rgba(255, 245, 230, 0.08) inset, 0 10px 24px -16px #000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: clamp(10.5px, min(1.6vw, 2.6vh), 13px);
  letter-spacing: 0.01em;
}
/* the rim of the pill catches the glitter where the path crosses it */
.pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: radial-gradient(90px 40px at var(--lx) 100%, rgba(255, 228, 186, calc(0.85 * var(--lg))), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.pill__tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbe3c2, var(--haze) 60%, #d79f68);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 -1px 0 rgba(110, 60, 20, 0.3) inset;
  color: #2b1a0c;
  font-weight: 620;
}
.pill__text { color: var(--ink-soft); }

/* the headline: a soft serif in pale foam that takes the gold of the path where it runs under the words */
.title {
  font-family: var(--serif);
  font-weight: 330;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0;
  font-size: clamp(32px, min(8vw, 10.6vh), 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  padding-bottom: 0.08em;
  background:
    radial-gradient(calc(70px + 90px * var(--lg)) calc(180px + 80px * var(--lg)) at var(--lx) 100%, rgba(255, 246, 228, calc(0.95 * var(--lg))) 0%, rgba(240, 196, 142, calc(0.9 * var(--lg))) 38%, transparent 76%),
    linear-gradient(180deg, #fbf5ea 0%, #ecdfcd 56%, #b8a690 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(4, 14, 18, 0.5));
}

.line {
  max-width: 31em;
  font-size: clamp(12px, min(1.9vw, 2.9vh), 17px);
  line-height: 1.45;
  text-wrap: balance;
  background:
    radial-gradient(80px 60px at var(--lx) 50%, rgba(255, 236, 206, calc(0.7 * var(--lg))), transparent 75%),
    linear-gradient(var(--ink-soft), var(--ink-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 18px);
  margin-top: clamp(2px, 1vh, 10px);
}
.price {
  color: var(--ink-faint);
  font-size: clamp(11.5px, min(1.6vw, 2.6vh), 14px);
}
.price b { color: var(--ink); font-weight: 560; }

/* ---- the button: a pill of warm foam on dark glass, its rim lit by the glitter under it */
.book {
  position: relative;
  flex: none;
  border: 0;
  padding: 0;
  background: none;
  color: #172a30;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.book__face {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: clamp(36px, 6.4vh, 46px);
  padding: 0 clamp(15px, 2.6vh, 20px) 0 clamp(17px, 2.9vh, 22px);
  border-radius: inherit;
  overflow: hidden;
  font-size: clamp(12.5px, min(1.8vw, 2.8vh), 15px);
  font-weight: 600;
  font-variation-settings: "wdth" 104;
  background:
    radial-gradient(70px 46px at var(--lx) 110%, rgba(255, 214, 160, calc(0.75 * var(--lg))), transparent 72%),
    linear-gradient(180deg, #fffaf2 0%, var(--foam) 50%, #e4d3bc 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(120, 90, 50, 0.22) inset,
    0 0 0 1px rgba(255, 240, 220, 0.4),
    0 8px 22px -8px rgba(240, 196, 142, calc(0.3 + 0.4 * var(--lg))),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 18px 40px -20px rgba(0, 0, 0, 0.8);
}
/* a ring of gold light on the rim that flashes when the button is pressed */
.book__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background:
    linear-gradient(rgba(240, 196, 142, var(--hit)), rgba(240, 196, 142, var(--hit))),
    radial-gradient(60px 30px at var(--lx) 100%, rgba(214, 150, 84, calc(0.6 * var(--lg))), transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.book__sheen {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: translateX(-160%) skewX(-18deg);
  pointer-events: none;
}
.book__label { position: relative; }
.book__arrow {
  position: relative;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- the two small readings at the bottom */
.foot {
  position: absolute;
  bottom: clamp(12px, 3vh, 26px);
  left: clamp(14px, 3.4vw, 34px);
  right: clamp(14px, 3.4vw, 34px);
  display: flex;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: clamp(10.5px, min(1.4vw, 2.4vh), 12.5px);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.foot__item { display: inline-flex; align-items: center; gap: 6px; }
.foot__item b { color: var(--ink-soft); font-weight: 520; }
.foot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; }

/* the drawn pointer of the preview */
.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.ghost path { fill: #fff; stroke: #10232a; stroke-width: 1.1; stroke-linejoin: round; }

@media (hover: hover) {
  .book:hover .book__face { filter: brightness(1.03); }
  .top__link:hover { background: rgba(10, 38, 48, 0.45); }
}

/* phones: the same, the type a little tighter and the menu folded away */
@media (max-width: 560px) {
  .top__nav { display: none; }
  .hero { width: calc(100% - 24px); margin-top: clamp(20px, 7vh, 60px); }
  .line { max-width: 24em; }
  .actions { flex-direction: column; gap: 8px; }
  .veil { background: radial-gradient(ellipse 72vw 34vh at 50% 54%, rgba(6, 20, 25, 0.62), transparent 74%); }
}
