:root {
  color-scheme: light;

  --cream: #FBF3E6;
  --paper: #F5E7D1;
  --ink: #33231A;
  --ink-soft: #6E5847;
  --line: #E6D3B8;

  --terracotta: #E0663F;
  --terracotta-deep: #C24E2A;
  --marigold: #F2B640;
  --marigold-deep: #B57D0E;
  --sage: #9DB58E;
  --sage-deep: #557A47;
  --rose: #F0A391;
  --rose-deep: #C9543F;
  --sky: #A8CBDA;

  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------- Hand color sets ---------- */
.h-skin-1 { --skin: #F2B98E; --cuff: var(--terracotta); }
.h-skin-2 { --skin: #C98A5E; --cuff: var(--marigold); }
.h-skin-3 { --skin: #8C5A3C; --cuff: var(--sage); }
.h-skin-4 { --skin: #F6D2AE; --cuff: var(--sky); }
.h-skin-5 { --skin: #A86B45; --cuff: var(--rose); }
.r-metal-1 { --metal: var(--sky); --accent: var(--terracotta); --face: var(--ink); }
.r-metal-2 { --metal: #BFD0AE; --accent: var(--marigold); --face: var(--ink); }
.r-metal-3 { --metal: #E8D3B4; --accent: var(--rose); --face: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 600;
  font-size: 22px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-mark { display: inline-flex; align-items: flex-end; height: 32px; }
.brand-mark svg { width: 20px; height: 34px; }
.brand-mark svg + svg { margin-left: -4px; transform: rotate(8deg); transform-origin: bottom; }
.nav-link {
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--ink); color: var(--cream); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px var(--gutter) clamp(170px, 24vw, 260px);
  overflow: hidden;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.title {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-weight: 700;
  font-size: clamp(4.25rem, 16vw, 12.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.title em {
  font-style: italic;
  font-weight: 600;
  color: var(--terracotta);
}

.rotator {
  margin: clamp(10px, 2vw, 22px) 0 0;
  height: 1.35em;
  overflow: hidden;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 72;
  font-weight: 500;
  font-size: clamp(1.9rem, 5.6vw, 4.25rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.phrase {
  display: inline-block;
  text-decoration: underline wavy;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s;
}
.phrase.out { transform: translateY(-110%); opacity: 0; }
.phrase.pre { transform: translateY(110%); opacity: 0; transition: none; }

.c-terracotta { color: var(--terracotta-deep); text-decoration-color: var(--terracotta); }
.c-sage { color: var(--sage-deep); text-decoration-color: var(--sage); }
.c-marigold { color: var(--marigold-deep); text-decoration-color: var(--marigold); }
.c-rose { color: var(--rose-deep); text-decoration-color: var(--rose); }

/* The crowd of raised hands */
.crowd {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: max(100%, 760px);
  pointer-events: none;
}
.crowd .hand {
  width: clamp(58px, 8.2vw, 104px);
  height: auto;
  aspect-ratio: 100 / 170;
  margin: 0 -2px;
  flex-shrink: 0;
  transform-origin: 50% 100%;
  animation: rise .9s cubic-bezier(.2,.9,.25,1.2) both, wave 2.8s ease-in-out infinite;
}
.crowd .hand:nth-child(1)  { --lift: 40px; --tilt: -9deg;  animation-delay: .05s, 1.0s; }
.crowd .hand:nth-child(2)  { --lift: 8px;  --tilt: 6deg;   animation-delay: .15s, 1.4s; }
.crowd .hand:nth-child(3)  { --lift: 26px; --tilt: -4deg;  animation-delay: .1s,  1.2s; }
.crowd .hand:nth-child(4)  { --lift: 0px;  --tilt: 3deg;   animation-delay: .25s, 1.7s; }
.crowd .hand:nth-child(5)  { --lift: 34px; --tilt: -7deg;  animation-delay: .2s,  1.1s; }
.crowd .hand:nth-child(6)  { --lift: 12px; --tilt: 5deg;   animation-delay: .3s,  1.9s; }
.crowd .hand:nth-child(7)  { --lift: 30px; --tilt: -3deg;  animation-delay: .35s, 1.3s; }
.crowd .hand:nth-child(8)  { --lift: 4px;  --tilt: 8deg;   animation-delay: .4s,  1.6s; }
.crowd .hand:nth-child(9)  { --lift: 22px; --tilt: -6deg;  animation-delay: .3s,  2.0s; }
.crowd .hand:nth-child(10) { --lift: 38px; --tilt: 4deg;   animation-delay: .45s, 1.25s; }
.crowd .hand:nth-child(11) { --lift: 10px; --tilt: -5deg;  animation-delay: .5s,  1.8s; }
.crowd .hand:nth-child(12) { --lift: 28px; --tilt: 7deg;   animation-delay: .55s, 1.5s; }

@keyframes rise {
  from { translate: 0 120%; }
  to   { translate: 0 calc(var(--lift) * -1); }
}
@keyframes wave {
  0%, 100% { rotate: var(--tilt); }
  50%      { rotate: calc(var(--tilt) * -1); }
}

/* ---------- Intro ---------- */
.intro {
  background: var(--paper);
  padding: clamp(64px, 10vw, 128px) var(--gutter);
}
.lede {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "opsz" 48;
  font-weight: 400;
  font-size: clamp(1.45rem, 3.2vw, 2.4rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.hl {
  background: linear-gradient(transparent 58%, rgba(242, 182, 64, .55) 58%);
  font-style: italic;
}

/* ---------- Pillars ---------- */
.pillars {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  border-radius: 28px;
  padding: 28px 28px 32px;
  overflow: hidden;
}
.card h2 {
  margin: 18px 0 10px;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72;
  font-weight: 600;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.card p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.card-terracotta { background: #F9D9C9; }
.card-sage { background: #DCE7D2; }
.card-marigold { background: #FBE3AE; }
.card-hand { width: 46px; height: 78px; display: block; }
.card-pair { display: flex; align-items: flex-end; height: 78px; }
.card-pair svg { width: 46px; height: 78px; }
.card-pair svg + svg { margin-left: -8px; transform: rotate(10deg); transform-origin: bottom; }
.card:hover .card-hand,
.card:hover .card-pair svg:first-child { animation: wiggle .7s ease-in-out; transform-origin: bottom; }

@keyframes wiggle {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -10deg; }
  75% { rotate: 10deg; }
}

/* ---------- Loop ---------- */
.loop {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(72px, 10vw, 128px);
}
.section-title {
  margin: 0 0 32px;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.025em;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 26px;
  right: 26px;
  border-top: 2px dashed var(--line);
  z-index: 0;
}
.steps li { position: relative; z-index: 1; }
.num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  box-shadow: 0 0 0 8px var(--cream);
}
.c-bg-terracotta { background: var(--terracotta); color: #fff; }
.c-bg-marigold { background: var(--marigold); }
.c-bg-sage { background: var(--sage); }
.steps h3 {
  margin: 20px 0 6px;
  font-size: 20px;
  font-weight: 700;
}
.steps p { margin: 0; color: var(--ink-soft); }
.loop-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 40px 0 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--paper);
  font-weight: 500;
}
.loop-note svg { width: 20px; height: 20px; color: var(--terracotta); flex-shrink: 0; }

/* ---------- Hello ---------- */
.hello {
  background: var(--terracotta);
  color: var(--cream);
  text-align: center;
  padding: clamp(72px, 11vw, 140px) var(--gutter);
}
.hello h2 {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.hello p { margin: 16px 0 32px; font-size: clamp(17px, 2vw, 20px); opacity: .92; }
.button {
  display: inline-block;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s;
  overflow-wrap: anywhere;
}
.button:hover { transform: translateY(-2px) rotate(-1deg); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .pillars, .steps { grid-template-columns: 1fr; }
  .steps::before {
    top: 26px; bottom: 26px; left: 26px; right: auto;
    border-top: 0; border-left: 2px dashed var(--line);
  }
  .steps li { padding-left: 76px; }
  .num { position: absolute; left: 0; top: 0; }
  .steps h3 { margin-top: 12px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .crowd .hand:nth-child(n+9) { display: none; }
  .crowd { width: 120%; }
  .nav-link { padding: 6px 12px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .crowd .hand { animation: none; translate: 0 calc(var(--lift) * -1); rotate: var(--tilt); }
  .phrase { transition: opacity .3s; }
  .phrase.out, .phrase.pre { transform: none; }
}
