:root {
  --paper: #f1efe9;
  --paper-bright: #faf8f2;
  --paper-glass: rgba(241, 239, 233, 0.86);
  --ink: #121512;
  --ink-soft: #5a605b;
  --gold: #a58b4f;
  --gold-deep: #725d2f;
  --line: rgba(18, 21, 18, 0.18);
  --hairline: rgba(18, 21, 18, 0.1);
  --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --node-x: 50vw;
  --node-y: 68vh;
  --notes-x: 86vw;
  --notes-y: 58vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 35%, rgba(250, 248, 242, 0.92), transparent 42%),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 14px;
  padding: 10px 15px;
  color: var(--paper-bright);
  background: var(--ink);
  font-size: 12px;
  letter-spacing: 0.07em;
  transform: translateY(-170%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.landing {
  position: relative;
  min-height: max(100svh, 560px);
  overflow: hidden;
  isolation: isolate;
}

.fold-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 420ms ease, filter 520ms ease;
}

.scene-veil {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 68% 54% at 25% 25%,
      rgba(241, 239, 233, 0.99) 0 21%,
      rgba(241, 239, 233, 0.84) 42%,
      rgba(241, 239, 233, 0.25) 67%,
      transparent 82%
    ),
    linear-gradient(180deg, rgba(241, 239, 233, 0.22), transparent 62%);
}

.identity {
  position: absolute;
  z-index: 2;
  top: clamp(62px, 11svh, 128px);
  left: clamp(28px, 6.2vw, 108px);
  width: min(82vw, 1080px);
  animation: identity-enter 950ms 90ms both var(--ease-out);
}

.identity h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(76px, 12.4vw, 180px);
  font-weight: 400;
  letter-spacing: -0.068em;
  line-height: 0.82;
  text-wrap: balance;
}

.identity p {
  max-width: 690px;
  margin: clamp(27px, 4.2vh, 44px) 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.55vw, 23px);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.5;
  text-wrap: balance;
}

.line-actions {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.line-node {
  position: absolute;
  top: var(--node-y);
  left: var(--node-x);
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  padding-block: 12px;
  pointer-events: auto;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: node-enter 800ms 540ms both var(--ease-out);
}

.line-node--start {
  transform: translate(-6px, -50%);
}

.line-node--end {
  flex-direction: row-reverse;
  transform: translate(calc(-100% + 6px), -50%);
}

.line-node__dot {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background: var(--gold);
  border: 3px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(114, 93, 47, 0.72);
}

.line-node__dot::after {
  position: absolute;
  inset: -9px;
  content: "";
  border: 1px solid rgba(165, 139, 79, 0.36);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.68);
  transition: opacity 300ms ease, transform 500ms var(--ease-out);
}

.line-node__label {
  display: block;
  padding: 8px 13px 7px;
  background: var(--paper-glass);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  transition:
    color 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    transform 420ms var(--ease-out);
}

.line-node:hover .line-node__label,
.line-node:focus-visible .line-node__label {
  color: var(--gold-deep);
  background: rgba(250, 248, 242, 0.96);
  border-color: rgba(165, 139, 79, 0.52);
}

.line-node--start:hover .line-node__label,
.line-node--start:focus-visible .line-node__label {
  transform: translateX(4px);
}

.line-node--end:hover .line-node__label,
.line-node--end:focus-visible .line-node__label {
  transform: translateX(-4px);
}

.line-node:hover .line-node__dot::after,
.line-node:focus-visible .line-node__dot::after {
  opacity: 1;
  transform: scale(1);
}

.line-node:focus-visible {
  outline: none;
}

.line-node:focus-visible .line-node__label {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.transition-wash {
  position: fixed;
  z-index: 90;
  inset: 0;
  pointer-events: none;
  background: var(--ink);
  clip-path: circle(0 at var(--notes-x) var(--notes-y));
}

.home-page.is-leaving .identity,
.home-page.is-leaving .line-node {
  opacity: 0;
  transition: opacity 320ms ease;
}

.home-page.is-leaving .fold-canvas {
  opacity: 0.26;
  filter: blur(4px);
}

.home-page.is-leaving .transition-wash {
  clip-path: circle(155vmax at var(--notes-x) var(--notes-y));
  transition: clip-path 620ms var(--ease-out);
}

@keyframes identity-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes node-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@view-transition {
  navigation: auto;
}

@media (max-width: 760px) {
  .landing {
    min-height: max(100svh, 620px);
  }

  .scene-veil {
    background:
      radial-gradient(
        ellipse 105% 46% at 34% 17%,
        rgba(241, 239, 233, 1) 0 27%,
        rgba(241, 239, 233, 0.86) 52%,
        rgba(241, 239, 233, 0.18) 78%,
        transparent 92%
      ),
      linear-gradient(180deg, rgba(241, 239, 233, 0.18), transparent 65%);
  }

  .identity {
    top: clamp(50px, 8.5svh, 76px);
    left: 20px;
    width: calc(100% - 40px);
  }

  .identity h1 {
    font-size: clamp(68px, 21vw, 104px);
    line-height: 0.85;
  }

  .identity p {
    max-width: 390px;
    margin-top: 23px;
    font-size: clamp(16px, 4.5vw, 19px);
    line-height: 1.52;
  }

  .line-node {
    gap: 9px;
    font-size: 11px;
  }

  .line-node__label {
    padding: 7px 11px 6px;
  }
}

@media (max-height: 650px) and (min-width: 761px) {
  .identity {
    top: 42px;
  }

  .identity h1 {
    font-size: clamp(68px, 16vh, 108px);
  }

  .identity p {
    max-width: 610px;
    margin-top: 20px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .identity {
    opacity: 1;
    transform: none;
  }
}

@media (forced-colors: active) {
  .fold-canvas,
  .scene-veil {
    display: none;
  }

  .line-node__dot {
    background: ButtonText;
    border-color: Canvas;
    box-shadow: 0 0 0 1px ButtonText;
  }

  .line-node__label {
    background: Canvas;
    border-color: ButtonText;
    backdrop-filter: none;
  }
}
