/* The background of pool reflections on a whitewashed wall: the hero of an island hotel. The WebGL canvas fills the
   stage and draws the wall in the shade of the eaves, the slice of direct sun across the top and the net of caustics
   that the pool throws up onto the plaster; the words sit on top and their faint shadow trembles with the water.
   Without WebGL a soft CSS glow takes its place. */
:root {
  --wall: #d8d5cd;          /* the whitewashed wall in the shade */
  --sun: #fff8ec;           /* the direct sun and the brightest caustics */
  --water: #7fd3d6;         /* the cool bounce of the pool */
  --ink: #17282b;           /* the heading */
  --muted: #4f5f60;         /* the small words */
  --line: rgba(23, 40, 43, 0.14); /* thin edges */
  --teal: #0e4a52;          /* the button */
  --teal-ink: #f2fbf9;      /* the words on the button */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  background: var(--wall);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  background: var(--wall);
  --sx: 3px;
  --sy: 4px;
}

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

/* the light without WebGL */
.glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  background:
    radial-gradient(120% 60% at 50% 105%, color-mix(in srgb, var(--water) 45%, transparent), transparent 70%),
    linear-gradient(170deg, color-mix(in srgb, var(--sun) 70%, transparent) 0 14%, transparent 22%);
}

.no-gl .glow {
  display: block;
}

.bar,
.hero,
.hint {
  position: relative;
  z-index: 2;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 3vh, 22px) clamp(16px, 4vw, 40px) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 19px;
  font-weight: 480;
  font-variation-settings: 'opsz' 36, 'SOFT' 80;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link,
.book {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.book {
  color: var(--ink);
  font-weight: 560;
  background: rgba(250, 253, 252, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 14px -8px rgba(20, 50, 55, 0.3);
}

@media (hover: hover) {
  .nav__link:hover {
    color: var(--ink);
  }
  .book:hover {
    background: rgba(250, 253, 252, 0.72);
  }
}

.hero {
  align-self: center;
  justify-self: center;
  width: min(100%, 720px);
  padding: 0 clamp(16px, 5vw, 40px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(250, 253, 252, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 18px -10px rgba(20, 50, 55, 0.3);
  transition: color 0.3s;
}

.chip__new {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
  color: var(--teal-ink);
  background: var(--teal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.chip__arrow {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .chip:hover {
    color: var(--ink);
  }
  .chip:hover .chip__arrow {
    transform: translateX(2px);
  }
}

/* the heading: Fraunces with a soft optical size; its faint shadow turns with the sun (--sx, --sy from the script) */
.title {
  margin: clamp(10px, 2.6vh, 20px) 0 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(30px, min(9.4vw, 9.6vh), 88px);
  line-height: 1;
  font-weight: 380;
  font-variation-settings: 'opsz' 144, 'SOFT' 60, 'WONK' 0;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: var(--sx) var(--sy) 7px rgba(20, 50, 55, 0.16);
}

.title__line {
  display: inline-block;
}

.title__line:last-child {
  font-style: italic;
  font-weight: 340;
}

.lede {
  margin: clamp(10px, 2.2vh, 16px) 0 0;
  max-width: 40ch;
  font-size: clamp(13px, min(3.6vw, 2.2vh), 16px);
  line-height: 1.5;
  color: var(--muted);
}

.actions {
  margin-top: clamp(14px, 3.4vh, 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  height: clamp(42px, 7vh, 54px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--teal-ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* the face: deep teal with a light top edge and a two-layer shadow that trembles with the water */
.btn__face {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 100%;
  padding: 0 clamp(18px, 4.4vw, 24px);
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--teal) 86%, #fff), var(--teal) 60%, color-mix(in srgb, var(--teal) 88%, #000));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(10, 35, 40, 0.28),
    calc(var(--sx) * 2) calc(var(--sy) * 2.4) 22px -8px rgba(10, 45, 50, 0.45);
  transition: box-shadow 0.4s;
}

/* a soft band of sun that slides across the face when it is pressed or hovered */
.btn__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(210, 250, 245, 0.3) 48%, transparent 66%);
  transform: translateX(-110%);
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn__words {
  position: relative;
  font-size: 14.5px;
  font-weight: 600;
  font-variation-settings: 'wdth' 100;
  white-space: nowrap;
  transition: font-variation-settings 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .btn:hover .btn__words {
    font-variation-settings: 'wdth' 110;
  }
}

.btn__icon {
  position: relative;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.btn__check {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.ghost {
  height: clamp(42px, 7vh, 54px);
  display: inline-flex;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 20px);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 540;
  color: var(--ink);
  text-decoration: none;
  background: rgba(250, 253, 252, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: background-color 0.3s, box-shadow 0.3s;
}

@media (hover: hover) {
  .ghost:hover {
    background: rgba(250, 253, 252, 0.65);
    box-shadow: inset 0 0 0 1px rgba(23, 40, 43, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
}

.note {
  margin: clamp(10px, 2vh, 14px) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--muted) 85%, transparent);
  letter-spacing: 0.01em;
}

.note__count {
  display: inline-block;
  height: 1.25em;
  line-height: 1.25em;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  color: var(--ink);
}

.note__roll {
  display: flex;
  flex-direction: column;
}

.hint {
  margin: 0;
  padding: 0 16px clamp(10px, 3vh, 22px);
  text-align: center;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  letter-spacing: 0.01em;
}

@media (max-height: 480px) {
  .hint {
    display: none;
  }
}

@media (max-height: 420px) {
  .note {
    display: none;
  }
}

@media (max-width: 380px) {
  .nav__link--wide {
    display: none;
  }
}

[data-in],
.title__line {
  opacity: 0;
}
