:root {
  --sage: #29443A;
  --text: #202622;
  --muted: #7C817E;
  --gold: #B49352;
  --background: #FFFFFF;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--background);
}

body {
  overflow-x: hidden;
  color: var(--text);
  font-family: "Avenir Next LT Pro", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(28px, 4vw, 56px) clamp(14px, 3vw, 44px) 22px;
}

.brand-block {
  justify-self: center;
  text-align: center;
  opacity: 0;
  transform: translateY(-8px);
}

body.ready .brand-block {
  animation: brand-in 1.35s cubic-bezier(.22,1,.36,1) .2s forwards;
}

.brand {
  color: var(--sage);
  font-size: clamp(.82rem, 1.4vw, 1.15rem);
  font-weight: 600;
  letter-spacing: .30em;
  padding-left: .30em;
  white-space: nowrap;
}

.brand-mark {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.line {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--sage);
  opacity: .75;
}

.sage-mark {
  width: 28px;
  height: 34px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.welcome {
  align-self: center;
  justify-self: center;
  width: 100%;
  text-align: center;
}

h1 {
  margin: 0 auto;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1rem, 5.2vw, 5.1rem);
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: -0.045em;
  padding: .12em .06em .18em;
  overflow: visible;
}

.word {
  display: inline-block;
  color: var(--text);
  opacity: 0;
  transform: translateY(13px);
  filter: blur(5px);
  will-change: opacity, transform, filter;
}

.word + .word { margin-left: .15em; }

body.ready .word {
  animation: word-in 0.9s cubic-bezier(.16,1,.3,1) forwards;
}

body.ready .word:nth-child(1) { animation-delay: 1.20s; }
body.ready .word:nth-child(2) { animation-delay: 1.68s; }
body.ready .word:nth-child(3) { animation-delay: 2.16s; }
body.ready .word:nth-child(4) { animation-delay: 2.64s; }
body.ready .word:nth-child(5) { animation-delay: 3.12s; }

footer {
  justify-self: center;
  color: var(--sage);
  font-size: clamp(.68rem, 1vw, .82rem);
  white-space: nowrap;
  opacity: 0;
}

body.ready footer {
  animation: footer-in .9s ease 4.15s forwards;
}

@keyframes brand-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes word-in {
  0% { opacity: 0; transform: translateY(13px); filter: blur(5px); }
  55% { opacity: .72; filter: blur(1.5px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes footer-in {
  to { opacity: 1; }
}

/* Keep the complete greeting on one line at every viewport width.
   On smaller screens the font scales down rather than wrapping. */
@media (max-width: 700px) {
  .page { padding-left: 8px; padding-right: 8px; }
  h1 {
    font-size: clamp(.82rem, 5.0vw, 2.2rem);
    letter-spacing: -0.055em;
  }
  .word + .word { margin-left: .10em; }
  .brand-mark { margin-top: 16px; }
  .line { width: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-block, .word, footer {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
}
