:root {
  --ink: #0b0b0c;
  --bone: #ede6da;
  --bone-dim: rgba(237, 230, 218, 0.56);
  --bone-faint: rgba(237, 230, 218, 0.12);
  --surface: rgba(237, 230, 218, 0.035);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Soft warm light falling from above */
.glow {
  position: fixed;
  inset: -20vh -20vw auto;
  height: 90vh;
  background: radial-gradient(50% 50% at 50% 30%, rgba(237, 230, 218, 0.11), rgba(237, 230, 218, 0) 70%);
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite alternate;
}

/* Film grain over everything */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  /* Equal top/bottom room so the group sits centered; bottom leaves space for the footer */
  padding:
    max(72px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(72px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: clamp(36px, 6vh, 64px);
  text-align: center;
}

.wordmark {
  margin: 0;
  width: min(100%, 340px);
  color: var(--bone);
  line-height: 0;
  animation: rise 1.2s var(--ease-out) both;
}


.wordmark-svg {
  display: block;
  width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Vine linework from the business card, climbing both edges */
.vine {
  position: fixed;
  top: 0;
  bottom: 0;
  --vine-w: calc(100svh * 1000 / 3120);
  /* Show at least ~84px of vine on phones; on wide screens show it all, clear of the content column */
  --vine-offset: min(0px, calc(max(84px, (100vw - 440px) / 2 + 24px) - var(--vine-w)));
  width: var(--vine-w);
  background: rgba(237, 230, 218, 0.15);
  -webkit-mask: url("/assets/vine-side.svg") no-repeat center / 100% 100%;
  mask: url("/assets/vine-side.svg") no-repeat center / 100% 100%;
  pointer-events: none;
  animation: fade 2.4s ease 0.2s both;
}

.vine-left { left: var(--vine-offset); }
.vine-right { right: var(--vine-offset); transform: scaleX(-1); }

.tagline {
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  padding-left: 0.5em; /* balance trailing tracking */
  color: rgba(237, 230, 218, 0.72);
  animation: rise 1.2s var(--ease-out) 0.12s both;
}

@media (min-width: 768px) {
  .wordmark { width: 420px; }
  .tagline { margin-top: 28px; font-size: 1.3rem; letter-spacing: 0.6em; padding-left: 0.6em; }
}

.links {
  width: 100%;
  display: grid;
  gap: 12px;
}

.link {
  display: grid;
  grid-template-columns: 22px 1fr auto 16px;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 20px;
  border-radius: 18px;
  border: 1px solid var(--bone-faint);
  background: var(--surface);
  color: var(--bone);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
  animation: rise 1s var(--ease-out) both;
}

.link:nth-child(1) { animation-delay: 0.28s; }
.link:nth-child(2) { animation-delay: 0.38s; }

.icon { width: 22px; height: 22px; }

.label {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.handle {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--bone-dim);
}

.arrow {
  width: 16px;
  height: 16px;
  color: var(--bone-dim);
  transition: transform 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

@media (hover: hover) {
  .link:hover {
    background: rgba(237, 230, 218, 0.075);
    border-color: rgba(237, 230, 218, 0.3);
  }
  .link:hover .arrow {
    color: var(--bone);
    transform: translate(2px, -2px);
  }
}

.link:active { transform: scale(0.985); }

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

.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  text-align: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: rgba(237, 230, 218, 0.32);
  animation: fade 1.4s ease 0.6s both;
}

@media (max-width: 360px) {
  .handle { display: none; }
  .link { grid-template-columns: 22px 1fr 16px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes breathe {
  from { opacity: 0.75; transform: translateY(0); }
  to { opacity: 1; transform: translateY(2vh); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
