/* Sunflowers that follow the pointer: one screen of a sunflower field drawn in SVG, with the farm's words on top.
   The pointer is the sun: on a computer the real cursor is hidden over the field and a drawn sun takes its place. */
:root {
  --sky-top: #8fc3df;
  --sky-low: #f6e7c4;
  --dusk: #e9875a;          /* the sky near the ground when the sun goes down */
  --sun: #ffc93c;
  --cloud: #fffaf0;
  --petal: #f7b51e;
  --petal-deep: #e08a12;
  --disk: #5a3418;
  --seed: #2e1a0c;
  --stem: #5f7f2c;
  --leaf: #6f9434;
  --ground: #4f6a28;
  --ink: #2b2010;
  --paper: #fff6e2;
  --shade: #34405e;         /* the colour of a cloud's shadow on the field */
  --edge: clamp(16px, 4.4vw, 64px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--sky-low);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.farm {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* a finger on the field moves the sun; pinching still zooms */
.field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

/* the drawn sun is the pointer: the real one is hidden only where there is a mouse */
@media (hover: hover) and (pointer: fine) {
  .farm,
  .farm a {
    cursor: none;
  }
}

.bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(var(--edge) * 0.6) var(--edge);
  pointer-events: none;
}

.bar a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
}

.brand {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 620;
  letter-spacing: -0.01em;
}

.bar__nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 34px);
  font-size: 14px;
  font-weight: 520;
}

/* the links lean the way the flowers do: a small tilt toward where the pointer came from */
.bar__nav a {
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.34, 1.7, 0.5, 1), font-stretch 0.4s ease;
  transform-origin: 50% 100%;
}

@media (hover: hover) {
  .bar__nav a:hover {
    transform: rotate(-5deg) translateY(-2px);
    font-stretch: 115%;
  }
}

.words {
  position: absolute;
  left: var(--edge);
  top: clamp(84px, 16vh, 170px);
  max-width: min(860px, calc(100vw - var(--edge) * 2));
  pointer-events: none;
}

.words__kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.words__title {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(36px, 5.6vw, 84px);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.words__title em {
  font-weight: 460;
}

.words__line {
  display: block;
}

.words__button {
  position: relative;
  display: inline-grid;
  place-items: center;
  margin-top: clamp(18px, 3vh, 30px);
  height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  pointer-events: auto;
  isolation: isolate;
}

/* the fill swells with a bounce, the word widens on the width axis */
.words__fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--ink);
  transition: transform 0.6s cubic-bezier(0.34, 1.8, 0.5, 1), background-color 0.3s ease;
}

.words__label {
  transition: font-stretch 0.45s cubic-bezier(0.34, 1.6, 0.5, 1), letter-spacing 0.45s ease;
}

@media (hover: hover) {
  .words__button:hover .words__fill {
    transform: scale(1.08, 1.14);
    background: var(--disk);
  }

  .words__button:hover .words__label {
    font-stretch: 125%;
    letter-spacing: 0.01em;
  }
}

.words__button:active .words__fill {
  transform: scale(0.95);
}

.words__button:focus-visible,
.bar a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.foot {
  position: absolute;
  left: var(--edge);
  bottom: calc(var(--edge) * 0.5);
  pointer-events: none;
}

.foot p {
  margin: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 540;
}

@media (max-width: 640px) {
  .bar__nav {
    gap: 12px;
    font-size: 12px;
  }

  .bar__nav a:nth-child(3) {
    display: none;
  }

  .words {
    top: 88px;
  }

  .words__kicker {
    font-size: 11px;
  }
}
