/* ididit — the empty studio and one button.
   Colour comes only from the buddies; the page itself is studio white, floor shade and true black. */

:root {
  --studio: #F2F0EC;      /* the cyclorama */
  --floor: #E6E3DD;       /* floor shade, contact shadows */
  --line: #D9D5CE;        /* the only rule colour */
  --ink: #000000;         /* the plus icon */
  --ink-soft: #55524D;    /* secondary text */
  --white: #FFFFFF;       /* the button */

  --font: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* type scale: perfect fourth, 18px body */
  --t-body: 1.125rem;
  --t-small: 0.95rem;
  --t-badge: 0.8rem;
  --t-h3: 1.5rem;
  --t-h2: clamp(2.25rem, 1.2rem + 4.2vw, 4.75rem);
  --t-h1: clamp(2.5rem, 1.2rem + 4.4vw, 5.25rem);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(3.5rem, 6vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--studio);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  font-variation-settings: "opsz" 14, "wdth" 100;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; }
h1, h2 { font-variation-settings: "opsz" 96, "wdth" 82; text-wrap: balance; }
h3 { font-size: var(--t-h3); font-variation-settings: "opsz" 32, "wdth" 90; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: 999px; z-index: 20; }
.skip:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 2rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) var(--gutter) 1rem;
  background: color-mix(in srgb, var(--studio) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.wordmark {
  font-weight: 650; font-size: 1.6rem; letter-spacing: -0.035em; text-decoration: none;
  font-variation-settings: "opsz" 48, "wdth" 92;
}
.wordmark.small { font-size: 1.25rem; }
.nav nav { display: flex; gap: 1.75rem; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--ink-soft); font-size: var(--t-small); }
.nav nav a:hover { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1.25rem; border-radius: 999px;
  border: 1.5px solid var(--ink); text-decoration: none; font-weight: 600; font-size: var(--t-small);
  background: transparent; transition: background .2s, color .2s;
}
.pill.dark { background: var(--ink); color: var(--white); }

/* ---------- the plus ---------- */
.plus { position: relative; width: 34%; aspect-ratio: 1; display: block; }
.plus::before, .plus::after {
  content: ""; position: absolute; background: var(--ink); border-radius: 999px;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.plus::before { width: 100%; height: 18%; }
.plus::after { width: 18%; height: 100%; }
.plus.small { width: 36%; }

/* ---------- hero: the studio ---------- */
.studio {
  /*min-height: 100svh;*/
  align-content: start;
  display: grid; grid-template-rows: auto auto;
  padding: 6rem var(--gutter) clamp(2.5rem, 5vw, 4rem);
  /* the cyc: a lit wall falling into a floor */
  /*background:
    radial-gradient(120% 60% at 50% 100%, var(--floor) 0%, transparent 62%),
    linear-gradient(180deg, #F6F5F2 0%, var(--studio) 55%);*/
  text-align: center;
  overflow: hidden;
  position: relative;
}
/* let the floor dissolve into the page instead of ending on a line */
/*.studio::after { 
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9rem;
  background: linear-gradient(180deg, transparent, var(--studio)); pointer-events: none;
}*/
.studio > * { position: relative; z-index: 1; }
.stage { --size: clamp(8.5rem, 16vw, 11.5rem); position: relative; display: grid; justify-items: center; align-content: start; padding-top: 7rem; padding-bottom: 2rem; }

.big-button {
  position: relative; width: var(--size); height: var(--size); border-radius: 50%;
  border: 0; background: var(--white); cursor: pointer;
  display: grid; place-items: center;
  box-shadow:
    0 1px 0 #fff inset,
    0 -6px 14px rgba(120, 110, 95, .10) inset,
    0 28px 30px -18px rgba(90, 80, 65, .35);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .25s;
  z-index: 2;
}
.big-button::after { /* contact shadow on the floor */
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -1.6rem; height: 1rem;
  background: radial-gradient(closest-side, rgba(80, 70, 55, .22), transparent);
  z-index: -1;
}
.big-button:active { transform: scale(.94); }
.nudge { margin-top: 2.2rem; color: var(--ink-soft); font-size: var(--t-small); min-height: 1.5em; transition: opacity .3s; }
.nudge button { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* the arc of buddies */
.buddy-pick { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.button-wrap { position: relative; display: grid; place-items: center; }
.arc { list-style: none; margin: 0; padding: 0; position: absolute; width: 0; height: 0; left: 50%; top: 50%; z-index: 3; }
.arc li { position: absolute; left: 0; top: 0; transform: translate(var(--x), var(--y)); pointer-events: none; }
.arc button {
  --c: #ddd;
  position: absolute; left: 0; top: 0;
  pointer-events: auto;
  width: 4.4rem; height: 4.4rem; border-radius: 50%; padding: 0; cursor: pointer;
  border: 3px solid var(--white); background: var(--white);
  box-shadow: 0 10px 18px -10px rgba(60, 50, 40, .45);
  overflow: hidden;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .45s cubic-bezier(.3, 1.5, .5, 1);
}
.arc button img { width: 100%; height: 100%; object-fit: cover; }
.arc.open button { transform: translate(-50%, -50%) scale(1); }
.arc.opening button { transition-delay: calc(var(--i) * 28ms); }   /* stagger only while popping in, never on hover */
.arc:not(.open) button { transition: transform .26s cubic-bezier(.5, 0, .75, 0) calc(var(--i) * 12ms); }   /* exit: all gone within ~0.4s */

.hero-copy { max-width: 64rem; margin: clamp(.5rem, 2vh, 1.5rem) auto 0; display: grid; gap: 1.1rem; justify-items: center; }
.hero-copy h1 { font-size: var(--t-h1); }
.hero-copy p { max-width: 38rem; color: var(--ink-soft); font-size: 1.2rem; }


/* the picked buddy takes the button's place */
.big-button .profile {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
.stage[data-state="picked"] .big-button .plus { opacity: 0; transform: scale(.6); }
.big-button.swap .profile { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.big-button .plus { transition: opacity .25s ease .08s, transform .4s cubic-bezier(.3, 1.6, .5, 1) .08s; }   /* grows back in as the buddy leaves */
.big-button .profile.leaving { animation: profile-out .3s cubic-bezier(.5, 0, .75, 0) forwards; }            /* exact reverse of the pop-in */
@keyframes profile-out { from { transform: scale(1); opacity: 1; } to { transform: scale(.55); opacity: 0; } }

.buddy-info { margin-top: 2.2rem; display: grid; justify-items: center; align-items: start; }
.buddy-info > * { grid-area: 1 / 1; }            /* nudge and picked block share one slot */
.buddy-info > [hidden] { display: grid !important; visibility: hidden; }   /* hidden, but still holds its space */
.buddy-info .nudge { margin: 0; }
.buddy-info > * { opacity: 1; visibility: visible; transition: opacity .35s ease; }              /* texts fade in... */
.buddy-info > .off { opacity: 0; visibility: hidden; transition: none; }                          /* ...and vanish instantly */
.button-wrap > .again { position: absolute; left: 50%; translate: -50% 0; margin: 0; white-space: nowrap;   /* above the picked buddy */
  opacity: 1; visibility: visible; transition: opacity .35s ease; }
.button-wrap > .again.off { opacity: 0; visibility: hidden; transition: none; }
.picked { display: grid; justify-items: center; gap: .35rem; }
.picked-name { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; font-variation-settings: "opsz" 48, "wdth" 88; }
.picked-line { color: var(--ink-soft); }
.again { margin-top: .5rem; font: inherit; font-size: var(--t-small); color: var(--ink); background: none; border: 0; padding: .25rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* chores: cards as they look in the app */
.chore-cards { list-style: none; margin: clamp(3rem, 6vw, 4.5rem) auto 0; padding: 0; max-width: 54rem; display: grid; gap: 1rem; text-align: left; }
.chore-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1rem, 3vw, 1.75rem);
  background: var(--card); border-radius: clamp(1.5rem, 4vw, 2.25rem); padding: clamp(.9rem, 2.4vw, 1.4rem);
}
.thumb {
  width: clamp(4rem, 9vw, 5.5rem); aspect-ratio: 1; border-radius: 28%; overflow: hidden; background: var(--edge);
  display: block;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1.38)) translateY(2%); }
.chore-text { font-size: clamp(1.15rem, .8rem + 1.6vw, 1.75rem); font-weight: 650; letter-spacing: -0.015em; line-height: 1.15; font-variation-settings: "opsz" 32, "wdth" 92; }
.when {
  justify-self: end; white-space: nowrap; background: var(--ink); color: var(--white);
  border-radius: 999px; padding: .65rem 1.15rem; font-weight: 600; font-size: clamp(.82rem, .7rem + .4vw, 1rem);
}
.when.overdue { background: #E5484D; }

/* ---------- sections, shared rhythm ---------- */
main > section:not(.studio) { padding: var(--section) var(--gutter); }
main h2 { font-size: var(--t-h2); }

/* chores */
.chores { text-align: center; }
.chores .lede { max-width: var(--measure); margin: 1.4rem auto 0; color: var(--ink-soft); }
.chores .aside { margin-top: 2.2rem; color: var(--ink-soft); }
.chore-text {font-weight: 700; letter-spacing: -0.02em; font-variation-settings: "wdth" 82; }
.chore-card {font-weight: 700; letter-spacing: -0.02em; font-variation-settings: "wdth" 82; }

/* film */
.film { padding-top: 0 !important; }
.screen {
  max-width: 76rem; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: clamp(14px, 2vw, 28px);
  overflow: hidden; background: #E9E6E0; position: relative;
  box-shadow: 0 40px 60px -40px rgba(70, 60, 45, .45);
}
.film-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #E9E6E0; }
.play-button {                                    /* just the black play icon, no disc */
  --size: clamp(2.75rem, 4.6vw, 4.25rem);
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: var(--size); height: var(--size); border: 0; padding: 0; cursor: pointer;
  background: none; display: grid; place-items: center; border-radius: 50%;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), opacity .25s;
}
.play-button svg { width: 100%; height: 100%; margin-left: 6%; fill: var(--ink); overflow: visible; }   /* nudged right: optical centre of a triangle */
.play-button:active { transform: scale(.92); }
.screen.playing .play-button { opacity: 0; pointer-events: none; transform: scale(.85); }
.film-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .75rem; text-align: center;
  background: radial-gradient(90% 70% at 50% 100%, var(--floor), transparent 70%), #EFEDE8;
}
.film-placeholder .plus.small { width: 3.2rem; margin-bottom: .75rem; }
.film-placeholder p { font-size: 1.35rem; font-weight: 600; }
.film-placeholder .hint { font-size: var(--t-small); font-weight: 400; color: var(--ink-soft); }
.film-placeholder code { font-size: .9em; }

/* how it works */
.how { text-align: center; }
.steps { list-style: none; counter-reset: step; margin: clamp(3rem, 6vw, 5rem) auto 0; padding: 0; max-width: 72rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.steps li { counter-increment: step; display: grid; justify-items: center; gap: 1rem; align-content: start; }
.steps li::before {
  content: counter(step); font-size: var(--t-small); font-weight: 600; color: var(--ink-soft);
  width: 2rem; height: 2rem; border: 1.5px solid var(--line); border-radius: 50%; display: grid; place-items: center;
}
.step-visual { height: 7.5rem; display: flex; align-items: center; justify-content: center; }
.steps p { max-width: 21rem; color: var(--ink-soft); }
.mini-button {
  width: 5.5rem; height: 5.5rem; border-radius: 50%; background: var(--white); display: grid; place-items: center;
  box-shadow: 0 -4px 10px rgba(120, 110, 95, .1) inset, 0 18px 20px -14px rgba(90, 80, 65, .35);
}
.head-window { --d: 5.5rem; --overlap: 1.1rem; width: calc(var(--d) * 3 - var(--overlap) * 2); overflow: hidden; padding: 4px 0; }
.head-track { display: flex; width: max-content; }
.head-track img {
  position: relative; z-index: 1;                 /* later pictures overlap earlier ones */
  width: var(--d); height: var(--d); border-radius: 50%; margin-left: calc(var(--overlap) * -1); flex: none;
  border: 3px solid var(--studio); background: var(--studio);
}
.head-track img:first-child { margin-left: 0; }
.head-track.sliding { transform: translateX(calc((var(--d) - var(--overlap)) * -1)); transition: transform .55s .3s cubic-bezier(.65, 0, .35, 1); }
.head-track img.waiting { transform: scale(0); }
.head-track img.leaving { z-index: 0; animation: head-out .4s cubic-bezier(.55, 0, 1, .45) forwards; }        /* shrinks in place, under its neighbour */
.head-track img.entering { animation: head-in .4s .75s cubic-bezier(0, .55, .45, 1) both; }                  /* exact mirror, once the row has settled */
@keyframes head-out { from { transform: scale(1); } to { transform: scale(0); } }
@keyframes head-in { from { transform: scale(0); } to { transform: scale(1); } }
.head-track.snap, .head-track.snap img { transition: none !important; animation: none !important; }
.angry-one img { width: 7.5rem; height: 7.5rem; }
.reminders { max-width: 38rem; margin: clamp(3rem, 6vw, 4.5rem) auto 0; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--ink-soft); }

/* no AI */
.no-ai { text-align: center; display: grid; justify-items: center; gap: 1.6rem; }
.no-ai h2 { max-width: 52rem; font-size: clamp(2rem, 1rem + 3.3vw, 3.9rem); }
.no-ai > p { color: var(--ink-soft); max-width: var(--measure); }
.mini-button.link { margin-top: 1.5rem; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.no-ai .caption { font-weight: 600; margin-top: -0.4rem; }

/* end */
.end {
  min-height: 100svh;                             /* the finale gets the whole screen */
  display: grid; justify-items: center; align-content: center; gap: 2rem; text-align: center;
  background: radial-gradient(110% 60% at 50% 100%, var(--floor), transparent 65%);
}
.stores { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; }
.stores .pill { min-height: 3.25rem; padding: 0 1.6rem; font-size: 1rem; }
.pill[aria-disabled="true"] {                    /* visible, but clearly not available yet */
  background: #DAD6CF; border-color: #DAD6CF; color: #8F8B84;
  cursor: not-allowed; user-select: none;
}
.fine { color: var(--ink-soft); font-size: var(--t-small); }

.foot { display: flex; justify-content: space-between; align-items: center; padding: 1.75rem var(--gutter); color: var(--ink-soft); font-size: var(--t-badge); border-top: 1px solid var(--line); }
.foot .wordmark { color: var(--ink); }
.foot-links { display: flex; gap: 1.5rem; align-items: center; }
.foot-links a { color: var(--ink-soft); text-underline-offset: 3px; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--ink); }
.foot-copyright { font-weight: 700; letter-spacing: -0.02em; font-variation-settings: "wdth" 82; color: var(--ink-soft); font-size: var(--t-badge); }

/* ---------- privacy policy ---------- */
.legal { max-width: 40rem; margin: 0 auto; padding: calc(7rem + env(safe-area-inset-top, 0px)) var(--gutter) var(--section); }
.legal h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 3.75rem); }
.legal .updated { margin-top: 1rem; color: var(--ink-soft); font-size: var(--t-small); }
main.legal > section { margin-top: 2.75rem; padding: 0; }   /* not the home page's big section padding */
.legal h2 { font-size: 1.6rem; font-variation-settings: "opsz" 32, "wdth" 92; letter-spacing: -0.015em; line-height: 1.15; }
.legal h3 { font-size: 1.1rem; margin-top: 1.5rem; font-variation-settings: "opsz" 20, "wdth" 96; }
.legal p, .legal ul { margin-top: .9rem; line-height: 1.6; }
.legal ul { padding-left: 1.2rem; }
.legal li + li { margin-top: .45rem; }
main.legal > .short { background: var(--white); border-radius: 1.5rem; padding: 1.5rem 1.75rem 1.75rem; }
.legal .short h2 { font-size: 1.3rem; }
.legal .short ul { padding-left: 1.1rem; }
mark.fill { background: #FFF1A8; color: inherit; border-radius: .25rem; padding: 0 .2rem; }   /* placeholders to replace */

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .pill { margin-left: auto; }
  .steps { grid-template-columns: 1fr; max-width: 26rem; }
  /* stacked steps read: number, title, visual, description */
  .steps li::before { order: 0; }
  .steps li h3 { order: 1; }
  .steps li .step-visual { order: 2; }
  .steps li p { order: 3; }
}
@media (max-width: 560px) {
  .stage[data-state="picking"] .nudge { visibility: hidden; }   /* the ring sits where this line is; its space stays reserved */
  .picked-line { min-height: 3em; max-width: 17rem; }       /* room for two lines, so buddies with longer lines don't shift the page */
  .chore-card { grid-template-columns: auto 1fr; row-gap: .5rem; }
  .chore-card .thumb { grid-row: span 2; }
  .chore-text { align-self: end; }
  .when { grid-column: 2; justify-self: start; align-self: start; padding: .45rem .9rem; }
  .arc button { width: 3.4rem; height: 3.4rem; border-width: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* hover effects only where there is a real pointer: on touch screens :hover sticks after a tap */
@media (hover: hover) and (pointer: fine) {
  .big-button:hover { transform: translateY(-3px); }
  .arc.open button:hover { transform: translate(-50%, -50%) scale(1.12); transition-delay: 0s; }
  .play-button:hover { transform: scale(1.08); }
  .mini-button.link:hover { transform: translateY(-3px); }
  .pill:hover { background: var(--ink); color: var(--white); }
  .pill.dark:hover { background: transparent; color: var(--ink); }
  .pill[aria-disabled="true"]:hover { background: #DAD6CF; color: #8F8B84; }
}

/* footer: on narrow screens stack wordmark, privacy link, copyright (desktop stays a single row) */
@media (max-width: 640px) {
  .foot { flex-direction: column; align-items: center; gap: .9rem; text-align: center; padding-top: 2rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); }
  .foot > .foot-links { flex-direction: column; gap: .5rem; }
}
