/* ARO Seven
   A quiet studio page (cool paper, evergreen ink) that hands the colour
   to whichever app is on stage. */

:root {
  --paper: #f2f5f0;
  --white: #ffffff;
  --ink: #0b2a1c;
  --ink-soft: #476053;
  --green: #2ac769;
  --rule: rgba(11, 42, 28, 0.14);

  --goat: #f0b41c;
  --goat-ink: #1e1708;
  --hitch: #f5b8c0;
  --hitch-ink: #1e2440;
  --agent: #4a41e0;
  --agent-ink: #ffffff;

  --display: "Funnel Display", "Avenir Next", system-ui, sans-serif;
  --body: "Funnel Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --tile: 22.5%;
  --panel: clamp(1.5rem, 3vw, 2.5rem);
  --spring: cubic-bezier(0.3, 1.45, 0.5, 1);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --cycle: 5s;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 0.5rem;
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

/* ---------- Top bar ---------- */

.top { padding-block: 1.25rem; }

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: inline-flex; }
.brand-logo { width: auto; height: clamp(2.25rem, 3.2vw, 2.75rem); }

.top nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.top nav a { font-weight: 500; text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1.5px; }
.top nav .nav-mail {
  padding: 0.55rem 1.15rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
}
.top nav .nav-mail:hover { text-decoration: none; background: #000; }

/* ---------- Hero ---------- */

.hero {
  --stage: var(--goat);
  --stage-ink: var(--goat-ink);
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 7vw, 6rem);
}
.hero[data-app="hitch"] { --stage: var(--hitch); --stage-ink: var(--hitch-ink); }
.hero[data-app="agent"] { --stage: var(--agent); --stage-ink: var(--agent-ink); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: stretch;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(1rem, 3vw, 3rem);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.h1-fixed { display: block; color: var(--ink-soft); font-weight: 400; }

/* All three lines share one grid cell, so the block is always as tall as
   the longest line and nothing below it jumps when the line changes. */
.swap { display: grid; margin-top: 0.06em; }
.swap-line {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.18s var(--ease), transform 0.3s var(--ease);
}
/* The old line clears out before the new one arrives, so they never overlap. */
.swap-line.is-on { opacity: 1; transform: none; transition: opacity 0.4s var(--ease) 0.18s, transform 0.5s var(--ease) 0.18s; }
.swap-line.is-out { transform: translateY(-0.4em); }

.hero-sub {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  max-width: 30rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
}

.picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(2rem, 4vw, 3.25rem);
}

.pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem 0.4rem 0.4rem;
  background: transparent;
  border: 1.5px solid var(--rule);
  border-radius: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.25s, border-color 0.25s;
}
.pick img { width: 2.25rem; height: 2.25rem; border-radius: var(--tile); }
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed="true"] { background: var(--white); border-color: var(--white); box-shadow: 0 1px 2px rgba(11, 42, 28, 0.08), 0 8px 24px -12px rgba(11, 42, 28, 0.25); }

/* Timer bar: fills while an app is on stage, then the page moves on. */
.pick::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(0);
}
.pick[aria-pressed="true"]::after { animation: pick-timer var(--cycle) linear forwards; }
.picks:hover .pick::after,
.picks:focus-within .pick::after,
.hero-grid:has(.stage:hover) .pick::after { animation-play-state: paused; }
.hero.is-manual .pick::after { animation: none; }
.hero.is-manual .pick[aria-pressed="true"]::after { transform: none; }

@keyframes pick-timer { to { transform: none; } }

/* ---------- Stage ---------- */

.stage {
  position: relative;
  display: grid;
  min-height: clamp(24rem, 46vw, 38rem);
  background: var(--stage);
  color: var(--stage-ink);
  border-radius: var(--panel);
  overflow: hidden;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}

.slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.18s var(--ease), visibility 0s 0.18s;
}
.slide.is-on { visibility: visible; opacity: 1; transition: opacity 0.4s var(--ease) 0.18s; }

.slide > img {
  width: min(64%, 19rem);
  margin: auto;
  border-radius: var(--tile);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 2px 4px rgba(0, 0, 0, 0.12),
    0 28px 48px -18px rgba(0, 0, 0, 0.45);
  transform: scale(0.72) rotate(-14deg);
  transition: transform 0.35s var(--ease);
}
.slide.is-on > img { transform: rotate(-5deg); transition: transform 0.75s var(--spring) 0.08s; }
.slide[data-app="hitch"].is-on > img { transform: rotate(4deg); }
.slide[data-app="agent"].is-on > img { transform: rotate(-3deg); }

.slide-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.slide-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.slide-link { font-weight: 600; text-underline-offset: 0.3em; text-decoration-thickness: 1.5px; }
.slide-link:hover { text-decoration-thickness: 2.5px; }

/* ---------- App panels ---------- */

.apps {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(1.75rem, 5vw, 4.5rem);
  background: var(--bg);
  color: var(--fg);
  border-radius: var(--panel);
  scroll-margin-top: 1rem;
}

.app-goat  { --bg: var(--goat);  --fg: var(--goat-ink);  --line: rgba(30, 23, 8, 0.22); }
.app-hitch { --bg: var(--hitch); --fg: var(--hitch-ink); --line: rgba(30, 36, 64, 0.2); }
.app-agent { --bg: var(--agent); --fg: var(--agent-ink); --line: rgba(255, 255, 255, 0.28); }

/* The middle panel mirrors, so the page reads as a zigzag. */
.app-hitch .app-text { order: 2; }

.app-head { display: flex; align-items: center; gap: clamp(0.75rem, 1.5vw, 1.25rem); }
.app-head img {
  flex: none;
  width: clamp(3.25rem, 6vw, 5rem);
  border-radius: var(--tile);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 10px 20px -10px rgba(0, 0, 0, 0.4);
}
.app-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.app-lede {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  max-width: 26em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.facts { margin-top: clamp(1.5rem, 3vw, 2.25rem); max-width: 34rem; }
.facts li { padding-block: 0.8rem; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.75rem;
  font-weight: 600;
}
.status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.3rem var(--line);
}

/* ---------- Product illustrations ---------- */

.demo { display: grid; place-items: center; }

.demo-card {
  --d-ink: #171a22;
  --d-soft: #6b7180;
  --d-rule: #e7e9ee;
  width: min(100%, 23rem);
  padding: 1.25rem;
  background: var(--white);
  color: var(--d-ink);
  border-radius: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 36px 60px -28px rgba(0, 0, 0, 0.45);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.demo-path .demo-card { transform: rotate(2deg); }
.demo-gift .demo-card { transform: rotate(-2deg); }
.demo-mail .demo-card { transform: rotate(1.5deg); }

/* Card GOAT: daily challenge and the skill path */
.daily {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.85rem 0.85rem 1.1rem;
  background: var(--goat-ink);
  color: var(--white);
  border-radius: 1rem;
  font-weight: 600;
}
.daily-go { padding: 0.35rem 0.95rem; background: var(--goat); color: var(--goat-ink); border-radius: 999px; }

.path { margin-top: 1.25rem; padding-inline: 0.5rem; }
.path li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.7rem;
  color: var(--d-soft);
  font-weight: 500;
}
.path li + li::before {
  content: "";
  position: absolute;
  left: calc(0.8rem - 1.5px);
  top: -0.7rem;
  height: 1.4rem;
  border-left: 3px dotted var(--d-rule);
}
.path li.is-done + li::before { border-left: 3px solid var(--goat); }
.node {
  flex: none;
  position: relative;
  z-index: 1;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--d-rule);
}
.path .is-done { color: var(--d-ink); }
.path .is-done .node {
  border-color: var(--goat);
  background: var(--goat) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.7 2.7L12 5.5' fill='none' stroke='%231e1708' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.path .is-now { color: var(--d-ink); font-weight: 700; }
.path .is-now .node { border-color: var(--goat-ink); box-shadow: 0 0 0 0.3rem rgba(240, 180, 28, 0.35); }

/* HitchPay: a guest's gift page */
.demo-gift .demo-card { --d-ink: var(--hitch-ink); text-align: center; padding-top: 1.75rem; }
.gift-for { color: var(--d-soft); }
.gift-names { font-family: var(--display); font-weight: 700; font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1.15; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1.25rem; }
.amounts span { padding-block: 0.7rem; border: 1.5px solid var(--d-rule); border-radius: 0.85rem; font-weight: 600; }
.amounts .is-picked { background: var(--hitch-ink); border-color: var(--hitch-ink); color: var(--white); }
.note {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  background: #fdf1f2;
  border-radius: 0.85rem;
  text-align: left;
}
.note-from { margin-top: 0.4rem; color: var(--d-soft); }
.chip-in { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-top: 1rem; color: var(--d-soft); font-size: 0.875rem; }
.faces { display: inline-flex; }
.faces i { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--white); background: var(--hitch); }
.faces i + i { margin-left: -0.5rem; background: #b9c4f0; }
.faces i:last-child { background: var(--hitch-ink); }

/* Connection Agent: a note becomes a draft that waits for approval */
.mail-note {
  padding: 0.8rem 1rem;
  background: #efeefe;
  color: #2a2580;
  border-radius: 0.85rem;
  font-size: 0.875rem;
}
.mail-note b { display: block; }
.mail { margin-top: 0.75rem; padding: 1rem; border: 1.5px solid var(--d-rule); border-radius: 0.85rem; }
.mail-to { color: var(--d-soft); font-size: 0.875rem; }
.mail-subject { margin-top: 0.15rem; font-weight: 700; }
.mail-body { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--d-rule); }
.mail-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.9rem; font-weight: 600; }
.mail-approve { padding: 0.5rem 1.1rem; background: var(--agent); color: var(--white); border-radius: 999px; }
.mail-edit { padding: 0.5rem 1.1rem; border: 1.5px solid var(--d-rule); border-radius: 999px; }
.mail-state { margin-left: auto; color: var(--d-soft); font-weight: 500; font-size: 0.875rem; }

/* ---------- About ---------- */

.about { padding-block: clamp(5rem, 11vw, 10rem); }

.about h2 {
  max-width: 11em;
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.about-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 30rem));
  gap: clamp(1.25rem, 4vw, 4rem);
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule);
  font-size: 1.1875rem;
}
.about-copy p:last-child { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; }

/* ---------- Footer ---------- */

.foot {
  background: var(--ink);
  color: var(--white);
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
}

.foot-ask { font-size: 1.1875rem; opacity: 0.8; }

.foot-mail {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 6.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--green);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.foot-mail:hover { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }

.foot-legal { margin-top: clamp(3rem, 6vw, 5rem); font-size: 0.9375rem; opacity: 0.65; }

/* ---------- Page-load sequence (the one orchestrated moment) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .stage { animation: rise 0.8s var(--ease) both; }
  .hero-copy > h1 { animation-delay: 0.05s; }
  .hero-copy > .hero-sub { animation-delay: 0.15s; }
  .hero-copy > .picks { animation-delay: 0.25s; }
  .stage { animation-name: stage-in; animation-delay: 0.1s; }
}

@keyframes rise { from { opacity: 0; transform: translateY(1.25rem); } }
@keyframes stage-in { from { opacity: 0; transform: scale(0.96); } }

/* ---------- Small screens ---------- */

@media (max-width: 56rem) {
  .hero-grid, .app { grid-template-columns: 1fr; }
  .stage { min-height: 22rem; }
  .slide > img { width: min(52%, 14rem); }
  .app-hitch .app-text { order: 0; }
  .demo { justify-items: start; }
  .about-copy { grid-template-columns: 1fr; }
}

@media (max-width: 30rem) {
  .top nav a:not(.nav-mail) { display: none; }
  .pick span { display: none; }
  .pick { padding: 0.4rem; }
  .demo-card { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .swap-line, .slide, .slide > img, .stage { transition: none; }
  /* No auto-rotation: the timer never runs, so the picks are the only way to switch. */
  .pick[aria-pressed="true"]::after { animation: none; transform: none; }
}
