/* The background of caustics on the mosaic floor of a pool: the opening of a made-up thermal spa, seen from above.
   The WebGL canvas fills the stage and draws the pale tiles on the floor of the basin, bent by the surface, and the
   net of light the surface throws on them; the words sit on top and their faint shadow on the floor trembles with the
   water. Without WebGL a soft CSS mosaic with a still glow takes its place. */
:root {
  --tile: #eceee8;          /* the glazed tiles of the floor */
  --grout: #b9c8c4;         /* the thin lines between the tiles */
  --water: #9fd6d2;         /* the colour the water gives to the floor */
  --light: #fffaf0;         /* the caustic light */
  --ink: #12302f;           /* the heading */
  --accent: #0d6b6a;        /* the one accent: the italic word and the button */
  --muted: #44605d;         /* the small words */
  --line: rgba(18, 48, 47, 0.16); /* thin edges */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

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

body {
  background: #dcebe7;
  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: 300px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  background: #dcebe7;
  --sx: 0px;
  --sy: 6px;
  --sb: 14px;
}

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

/* the floor without WebGL: a soft mosaic and a still glow */
.glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  background:
    radial-gradient(60% 50% at 30% 35%, color-mix(in srgb, var(--light) 70%, transparent), transparent 70%),
    radial-gradient(50% 40% at 75% 70%, color-mix(in srgb, var(--light) 55%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, var(--grout) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, var(--grout) 0 1px, transparent 1px 44px),
    color-mix(in srgb, var(--tile) 70%, var(--water));
}

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

/* the bar at the top */
.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 3.2vh, 28px) clamp(16px, 4vw, 44px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand__mark {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.brand__grout {
  stroke-width: 0.8;
  opacity: 0.4;
}

/* the small button: a glassy pill that swells on hover and dents when pressed */
.book {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: #f4fbf9;
  font-size: 13px;
  font-weight: 560;
  font-stretch: 100%;
  -webkit-tap-highlight-color: transparent;
}

.book__face {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px 9px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 86%, #000) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 2px rgba(10, 40, 40, 0.18),
    0 6px 16px -6px rgba(10, 60, 60, 0.45);
  transition: box-shadow 0.35s ease;
}

.book__words {
  transition: font-stretch 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@media (hover: hover) {
  .book:hover .book__words {
    font-stretch: 118%;
  }

  .book:hover .book__icon {
    transform: translateX(2px);
  }

  .book:hover .book__face {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.42),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18),
      0 1px 2px rgba(10, 40, 40, 0.18),
      0 10px 22px -8px rgba(10, 60, 60, 0.55);
  }
}

.book:focus-visible {
  outline: none;
}

.book:focus-visible .book__face {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}

/* the heading in the middle, with a soft shadow on the floor that moves with the water */
.hero {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 0 clamp(16px, 6vw, 72px);
  max-width: 1100px;
}

.eyebrow {
  margin: 0 0 clamp(10px, 2.2vh, 20px);
  font-size: clamp(11px, min(1.25vw, 2vh), 14px);
  font-weight: 500;
  font-stretch: 108%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  margin: 0;
  font-family: 'Newsreader Variable', Georgia, serif;
  font-weight: 380;
  font-variation-settings: 'opsz' 72;
  font-size: clamp(40px, min(9.6vw, 15vh), 132px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-shadow:
    var(--sx) var(--sy) var(--sb) rgba(14, 70, 68, 0.16),
    calc(var(--sx) * 0.4) calc(var(--sy) * 0.4) 3px rgba(14, 70, 68, 0.05);
}

.title__line {
  display: block;
}

.title em {
  font-style: italic;
  font-weight: 340;
  color: var(--accent);
}

/* the small reading at the bottom */
.temp {
  position: relative;
  z-index: 2;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 clamp(16px, 4vw, 44px) clamp(14px, 3.4vh, 30px);
  font-size: 12px;
  color: var(--muted);
}

.temp__label {
  font-weight: 500;
  font-stretch: 108%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.temp__value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

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

.no-js [data-in],
.no-js .title__line {
  opacity: 1;
}

@media (max-height: 420px) {
  .eyebrow {
    margin-bottom: 6px;
  }

  .temp {
    padding-bottom: 10px;
  }
}
