:root {
  color-scheme: light;
  --paper: #faf7ee;
  --ink: #263d35;
  --muted: #677267;
  --teal: #0f6d72;
  --line: #dddccd;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
::selection { background: #e6c98e; color: var(--ink); }

.page {
  max-width: 1320px;
  min-height: 100svh;
  margin-inline: auto;
  padding: 25px 24px 22px;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -1.8px;
}

.wordmark span { color: var(--teal); }
.masthead-note { font-size: 11px; letter-spacing: .06em; color: var(--muted); }

main {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 8px;
  padding-block: 20px 36px;
}

.portrait {
  position: relative;
  isolation: isolate;
  width: min(100%, 310px);
  --portrait-height: 285px;
  height: var(--portrait-height);
  margin: 0 auto;
}

.sun {
  position: absolute;
  z-index: -1;
  width: 240px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #eee4c8;
  inset: 26px 0 auto;
  margin-inline: auto;
}

.cato {
  display: block;
  height: 100%;
  width: auto;
  margin-inline: auto;
  transform: scaleX(-1);
}

.hello {
  margin: 0;
  padding: 12px 19px;
  border: 1px solid #d4d9c9;
  border-radius: 50% 50% 50% 6px;
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 19px;
  transform: rotate(8deg);
}

.copy { text-align: center; }
.eyebrow {
  margin: 0 0 15px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .19em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 12vw, 67px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1.03;
}

h1 em { color: var(--teal); font-weight: 400; }
.intro {
  max-width: 290px;
  margin: 21px auto 26px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 58px;
  padding: 16px 27px;
  border-radius: 8px;
  background: var(--teal);
  color: #fffdf6;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.cta svg { width: 20px; height: 20px; transition: transform .2s; }
.cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.cta:active { transform: translateY(1px); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

footer p { margin: 0; }
.footer-note { font-family: Georgia, "Times New Roman", serif; font-style: italic; }

@media (hover: hover) {
  .cta:hover { background: #0a575b; transform: translateY(-2px); }
  .cta:hover svg { transform: translateX(3px); }
}

/* Keep interaction layers separate from the artwork's mirrored pose. */
.portrait {
  --pointer-x: 0;
  --pointer-y: 0;
}

.cato-trigger {
  display: block;
  width: calc(var(--portrait-height) * 2 / 3);
  height: 100%;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 45%;
  background: transparent;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.cato-trigger:enabled { cursor: pointer; }
.cato-trigger:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
.cato-layer { display: block; height: 100%; pointer-events: none; }
.cato { overflow: visible; }

.hello-position {
  position: absolute;
  top: 5px;
  right: 2px;
  pointer-events: none;
}

.hello { white-space: nowrap; }
.greeting-hint {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  margin: 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-style: italic;
  text-align: center;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@keyframes cato-wave {
  0%, 12%, 38%, 100% { transform: rotate(0deg); }
  18%, 30% { transform: rotate(-14deg); }
  24%, 34% { transform: rotate(9deg); }
}

@keyframes cato-blink {
  0%, 73%, 79%, 100% { transform: scaleY(1); }
  76% { transform: scaleY(.08); }
}

@keyframes greeting-pop {
  0%, 100% { transform: rotate(8deg) scale(1); }
  35% { transform: rotate(5deg) scale(1.035); }
}

.cato-wing-far-inner { transform-origin: 0 0; }
.cato-eye { transform-origin: 238px 99px; }
.is-greeting .cato-wing-far-inner { animation: cato-wave 2.8s ease-in-out; }
.is-greeting .cato-eye { animation: cato-blink 2.8s ease-in-out; }
.is-greeting .hello { animation: greeting-pop .65s ease-in-out; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sun, .cato-layer, .hello-position { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
  .sun { transform: translate(calc(var(--pointer-x) * 2px), calc(var(--pointer-y) * 2px)); }
  .cato-layer { transform: translate(calc(var(--pointer-x) * 6px), calc(var(--pointer-y) * 4px)); }
  .hello-position { transform: translate(calc(var(--pointer-x) * 8px), calc(var(--pointer-y) * 6px)); }
}

@media (prefers-reduced-motion: reduce) {
  .sun, .cato-layer, .hello-position { transform: none; }
}

@media (min-width: 760px) {
  .page { padding: 36px 56px 28px; }
  .masthead-note { font-size: 12px; }
  main { grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding-block: 60px; }
  .copy { grid-column: 1; grid-row: 1; text-align: left; }
  .portrait { grid-column: 2; grid-row: 1; width: 100%; max-width: 450px; --portrait-height: 465px; }
  .sun { width: min(100%, 370px); top: 73px; }
  .hello-position { top: 10px; right: -6px; }
  .hello { font-size: 24px; padding: 17px 28px; }
  .eyebrow { margin-bottom: 23px; font-size: 11px; }
  h1 { font-size: clamp(58px, 6.5vw, 88px); }
  .intro { margin: 26px 0 31px; max-width: 330px; font-size: 18px; }
  footer { font-size: 12px; padding-top: 20px; }
}

@media (min-width: 1100px) {
  main { padding-inline: 46px 0; gap: 65px; }
  .portrait { --portrait-height: 520px; }
  .sun { width: 400px; top: 90px; }
  .hello-position { right: 0; }
}

@media (max-width: 759px) and (max-height: 740px) {
  .portrait { --portrait-height: 205px; width: 250px; }
  .sun { width: 180px; top: 16px; }
  .hello-position { top: 0; right: 0; }
  .hello { padding: 9px 15px; font-size: 17px; }
  main { padding-block: 16px 26px; }
  .eyebrow { margin-bottom: 12px; }
  .intro { margin-block: 17px 20px; }
}

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