/* The rippling lake photo: the opening of a made-up lake house. The photo is a real one; the canvas on top of it
   redraws only the water, below the horizon, bent by a field of waves. The words and the button are plain HTML. */
:root {
  --mist: #dfe4e8;          /* the misty sky, the ground before the photo arrives */
  --ink: #17263a;           /* the heading and the button */
  --muted: #3c4b5e;         /* the small words */
  --accent: #b4643a;        /* the one accent: the water lines of the mark, the drop of the hint */
  --veil: rgba(232, 236, 240, 0.62); /* the soft veil behind the words */
  --line: rgba(23, 38, 58, 0.18);    /* thin lines */
}

* {
  box-sizing: border-box;
}

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

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

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 300px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  background: var(--mist);
  touch-action: manipulation;
}

/* the photo: object-position is read by the script too, keep them in step */
.photo,
.water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.photo {
  object-fit: cover;
  object-position: 50% 42%;
  z-index: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.water {
  z-index: 1;
  cursor: default;
}

.water.is-water {
  cursor: pointer;
}

/* the soft veil behind the words, so they read on the sky and the hills */
.veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(70% 60% at 18% 30%, var(--veil), transparent 72%),
    linear-gradient(180deg, rgba(232, 236, 240, 0.35), transparent 38%);
}

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

/* the bar at the top */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(12px, 3vh, 26px) clamp(16px, 4vw, 44px);
  font-size: clamp(12px, 0.8vw + 6px, 15px);
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__mark {
  width: 1.5em;
  height: 1.5em;
  flex: none;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__water {
  stroke: var(--accent);
}

.bar__links {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-weight: 500;
}

/* the heading, high up in the sky */
.hero {
  align-self: start;
  padding: clamp(4px, 4vh, 48px) clamp(16px, 6vw, 88px) 0;
  max-width: 1100px;
  pointer-events: none;
}

.hero .pill {
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 clamp(6px, 1.6vh, 16px);
  color: var(--muted);
  font-size: clamp(10px, 0.7vw + 5px, 13px);
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-size: clamp(30px, min(7.6vw, 10.5vh), 112px);
  font-weight: 640;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.title__mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.title__line {
  display: inline-block;
}

.lede {
  margin: clamp(8px, 2vh, 20px) 0 clamp(12px, 3vh, 28px);
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(13px, 0.6vw + 9px, 18px);
  line-height: 1.45;
}

/* the elastic pill: the words widen on the wdth axis, the fill swells with a bounce */
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: clamp(40px, 6.4vh, 52px);
  padding: 0 clamp(18px, 2vw, 26px);
  border-radius: 999px;
  color: #f2f5f8;
  font-size: clamp(13px, 0.4vw + 10px, 16px);
  font-weight: 620;
  font-stretch: 100%;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.pill__fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--ink);
  box-shadow: 0 10px 24px -14px rgba(23, 38, 58, 0.6);
}

.pill__words {
  display: inline-block;
}

.pill__arrow {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* the line at the bottom, over the water */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 44px) clamp(12px, 3vh, 28px);
  color: rgba(244, 247, 250, 0.92);
  font-size: clamp(11px, 0.5vw + 8px, 13px);
  font-weight: 540;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(23, 38, 58, 0.35);
  pointer-events: none;
}

.foot__data {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.foot__sep {
  width: 1px;
  height: 0.9em;
  background: currentColor;
  opacity: 0.55;
}

.foot__hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.foot__hint svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #f4d9c8;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

@media (max-width: 560px) {
  .bar__links span:first-child {
    display: none;
  }

  .lede {
    max-width: 28ch;
  }
}

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

  .foot__data {
    display: none;
  }
}
