/* The background of the sun through the raindrops on the glass: the hero of a guesthouse on a pale plaster wall the
   morning after the rain. The WebGL canvas fills the stage and draws the wall, the patch of sun from the window with
   its bars, the shadow ring and the focused point of every drop, the drops that slide and the passing cloud. The words
   sit in the middle. Without WebGL a CSS patch of light with a few soft drops remains. */
:root {
  --wall: #e9e3d8;          /* the plaster wall in the shade */
  --sun: #fff3dc;           /* the morning sun on the wall */
  --cool: #aeb7bd;          /* the cool tint inside the drop shadows */
  --ink: #1c2226;           /* the heading */
  --muted: #586066;         /* the small words */
  --line: rgba(28, 34, 38, 0.13); /* thin edges */
  --accent: #24495b;        /* the button, a lake blue after the rain */
  --accent-ink: #f5f1e8;    /* 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);
}

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

/* the light without WebGL: a slanted window of sun with a few soft drops */
.patch {
  position: absolute;
  inset: 12% 14% 14% 30%;
  z-index: 0;
  display: none;
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(90, 100, 108, 0.22) 49.5% 50.5%, transparent 51%),
    color-mix(in srgb, var(--sun) 85%, transparent);
  transform: skewX(-15deg);
  filter: blur(3px);
  border-radius: 4px;
}

.patch i {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0 8%, rgba(120, 130, 138, 0.18) 34%, transparent 46%);
  background-size: 46px 52px;
  opacity: 0.8;
}

.no-gl .patch {
  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, 44px) 0;
}

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

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

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

.nav__link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  font-variation-settings: 'wdth' 100;
  text-decoration: none;
  transition: color 0.3s, background-color 0.3s, font-variation-settings 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav__link--pill {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (hover: hover) {
  .nav__link:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.4);
    font-variation-settings: 'wdth' 112;
  }
}

.hero {
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(16px, 5vw, 48px);
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 clamp(8px, 2vh, 16px);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 12.5px;
  font-variation-settings: 'wdth' 104;
  letter-spacing: 0.01em;
}

.title {
  margin: 0;
  font-family: 'Newsreader Variable', Georgia, serif;
  font-weight: 380;
  font-variation-settings: 'opsz' 72;
  font-size: clamp(40px, min(12vw, 15vh), 124px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35), -3px 6px 18px rgba(60, 70, 78, 0.12);
}

.title__line {
  display: inline-block;
  opacity: 0;
}

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

.lede {
  margin: clamp(10px, 2.4vh, 20px) 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(14px, min(3.8vw, 2.4vh), 16.5px);
  line-height: 1.45;
}

.actions {
  margin-top: clamp(14px, 3.4vh, 28px);
}

.btn {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

.btn__face {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: clamp(42px, 7vh, 50px);
  padding: 0 20px 0 24px;
  overflow: hidden;
  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%);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 2px rgba(20, 35, 44, 0.25),
    0 8px 22px -8px rgba(20, 45, 58, 0.55);
  transition: box-shadow 0.4s;
}

.btn__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-110%);
  pointer-events: none;
}

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

.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;
}

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

  .btn:hover .btn__face {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.26),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18),
      0 1px 2px rgba(20, 35, 44, 0.25),
      0 14px 30px -10px rgba(20, 45, 58, 0.6);
  }
}

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

.note {
  margin: clamp(10px, 2vh, 16px) 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-variation-settings: 'wdth' 96;
}

.hint {
  margin: 0;
  padding: 0 0 clamp(10px, 2.6vh, 20px);
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

[data-in] {
  opacity: 0;
}

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

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

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