/* pawshift.app — the app's own palettes (Café, Latte, Midnight) as colour chapters. */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/nunito-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  /* The app's colours (src/theme/tokens.ts). */
  --coffee: #3a2719;
  --cream: #f3e9da;
  --cream-soft: #d8c6ae;
  --oat: #f3ece0;
  --oat-deep: #e2d6c2;
  --bean: #2b1e16;
  --bean-soft: #5a4433;
  --beige: #eadfcb;
  --beige-deep: #d9c7a9;
  --latte: #c9a77f;
  --latte-ink-soft: #46331f;
  --terracotta: #da7752;
  --terracotta-deep: #c4623e;
  --rust: #8b4025;
  --navy: #18213a;
  --ice: #eef1f8;
  --marigold: #f4b740;
  --marigold-deep: #e4a52c;
  --sky: #9db9f2;

  --accent: var(--terracotta);
  --accent-ink: var(--bean);

  --font: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, sans-serif;

  /* Five sizes, no more. */
  --t-display: clamp(2.875rem, 8.6vw, 8.25rem);
  --t-head: clamp(2.125rem, 4.2vw, 3.75rem);
  --t-statement: clamp(1.375rem, 2.4vw, 2.25rem);
  --t-body: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  --t-small: 0.9375rem;

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(0.75rem, 1.4vw, 1.5rem);
  --radius: 12px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--oat);
  color: var(--bean);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}
ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
img,
video {
  height: auto;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-weight: 800;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
::selection {
  background: var(--marigold);
  color: var(--bean);
}
:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: var(--margin);
  top: -4rem;
  z-index: 30;
  padding: 0.75rem 1.25rem;
  background: var(--marigold);
  color: var(--bean);
  border-radius: 999px;
  text-decoration: none;
}
.skip:focus {
  top: var(--margin);
}

/* ---------- controls ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 140ms var(--ease-out),
    background-color 180ms ease;
}
.button:hover {
  background: var(--marigold);
}
.button:active {
  transform: scale(0.96);
}
.link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
  transition: text-decoration-color 180ms ease;
}

/* ---------- the bar that follows the chapters ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding-inline: var(--margin);
  background: var(--bar-bg, var(--oat));
  color: var(--bar-ink, var(--bean));
  transform: translateY(-100%);
  transition:
    transform 320ms var(--ease-out),
    background-color 300ms ease,
    color 300ms ease;
}
.bar.is-shown {
  transform: none;
}
.bar a {
  text-decoration: none;
  font-weight: 800;
}
.bar .bar-links {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
}
.bar .bar-links a:not(.bar-get) {
  font-weight: 400;
}
.bar-get {
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: var(--bar-ink, var(--bean));
  color: var(--bar-bg, var(--oat));
  transition: transform 140ms var(--ease-out);
}
.bar-get:active {
  transform: scale(0.96);
}

/* ---------- hero: the welcome screen beside the colours of the page ---------- */
.hero {
  background: var(--oat);
  padding: 10px;
  height: 100svh;
  min-height: 40rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 10fr) minmax(0, 2fr);
  gap: 10px;
  height: 100%;
}
.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--coffee);
  color: var(--cream);
}
.wordmark {
  position: absolute;
  top: 28px;
  left: 28px;
  font-weight: 800;
  font-size: var(--t-body);
  letter-spacing: -0.01em;
  text-decoration: none;
  z-index: 2;
}
.hero-title {
  position: absolute;
  top: clamp(4.5rem, 10vh, 7rem);
  left: 28px;
  right: 28px;
  margin: 0 auto;
  max-width: 13ch;
  text-align: center;
  font-size: var(--t-display);
  line-height: 0.94;
  letter-spacing: -0.035em;
  z-index: 2;
}
.hero-video {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 60%;
  width: auto;
  aspect-ratio: 1080 / 1072;
  object-fit: cover;
  background: var(--coffee);
}
.hero-foot {
  position: absolute;
  left: 28px;
  bottom: 36px;
  width: min(34%, 30rem);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  z-index: 2;
}
.hero-foot p {
  color: var(--cream);
  max-width: 32ch;
}
.swatches {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  border-radius: var(--radius);
  overflow: hidden;
}
.swatches a {
  padding: 20px;
  text-decoration: none;
  font-weight: 800;
  background: var(--sw-bg);
  color: var(--sw-ink);
  transition: padding-top 220ms var(--ease-out);
}
.swatches a:hover {
  padding-top: 28px;
}
.sw-oat {
  --sw-bg: var(--beige);
  --sw-ink: var(--bean);
}
.sw-beige {
  --sw-bg: var(--marigold);
  --sw-ink: var(--bean);
}
.sw-latte {
  --sw-bg: var(--latte);
  --sw-ink: var(--bean);
}
.sw-coffee {
  --sw-bg: var(--coffee);
  --sw-ink: var(--cream);
}
.sw-navy {
  --sw-bg: var(--navy);
  --sw-ink: var(--ice);
}

/* ---------- chapters ---------- */
.chapter {
  position: relative;
  scroll-margin-top: 3.5rem;
}

/* Feed Pip: the live demo, on oat (the morning). */
.feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 88svh;
  background: var(--beige);
  color: var(--bean);
}
.feed-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.feed-plate figure {
  position: relative;
  width: 100%;
  max-width: 44rem;
  aspect-ratio: 1;
  background: #ead9bd;
}
.feed-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feed-plate .pip-fed {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 260ms ease;
}
.feed[data-state='fed'] .pip-fed {
  opacity: 1;
}
.feed-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 40px var(--margin) 40px 0;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  align-items: baseline;
}
.tabs-label {
  color: var(--bean-soft);
}
.tabs button {
  color: var(--bean-soft);
  padding: 0.5rem 0;
  font-weight: 400;
  transition: color 160ms ease;
}
.tabs button[aria-pressed='true'] {
  color: var(--bean);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 0.12em;
}
.tabs button:hover {
  color: var(--bean);
}
.feed-copy {
  display: grid;
  gap: 1.25rem;
  max-width: 34ch;
}
.feed-copy h2 {
  font-size: var(--t-statement);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.feed-status {
  font-weight: 800;
  min-height: 3em;
}
.cells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cell {
  min-height: 72px;
  border-radius: var(--radius);
  font-weight: 800;
  text-align: left;
  padding: 0 1.5rem;
  transition:
    transform 140ms var(--ease-out),
    background-color 180ms ease;
}
.cell:active {
  transform: scale(0.97);
}
.cell-ink {
  background: var(--bean);
  color: var(--oat);
}
.cell-ink:hover {
  background: var(--coffee);
}
.cell-tone {
  background: var(--beige-deep);
  color: var(--bean);
}
.cell-tone:hover {
  background: var(--latte);
}

/* The app's own alert, as iOS draws it. */
[data-ui].alert {
  width: min(100%, 18rem);
  border-radius: 14px;
  background: rgba(242, 242, 247, 0.98);
  color: #000;
  text-align: center;
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.9375rem;
  box-shadow: 0 18px 40px rgba(43, 30, 22, 0.28);
  overflow: hidden;
}
[data-ui].alert[hidden] {
  display: none;
}
[data-ui] .alert-body {
  padding: 1.1rem 1rem 1rem;
  display: grid;
  gap: 0.25rem;
}
[data-ui] .alert-title {
  font-weight: 600;
  font-size: 1.0625rem;
}
[data-ui] .alert-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(60, 60, 67, 0.29);
}
[data-ui] .alert-actions button {
  min-height: 2.9rem;
  color: #007aff;
  font-size: 1.0625rem;
}
[data-ui] .alert-actions button + button {
  border-left: 1px solid rgba(60, 60, 67, 0.29);
  font-weight: 600;
}
[data-ui] .alert-actions button:active {
  background: rgba(0, 0, 0, 0.06);
}

/* How it works: one chore across four fields, morning to night. */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.field {
  position: relative;
  min-height: 84svh;
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.field h2,
.field .clause {
  font-size: var(--t-statement);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.field h2 {
  font-weight: 800;
  max-width: 10ch;
}
.field .clause {
  margin-top: auto;
  max-width: 14ch;
  font-weight: 400;
}
.field .card {
  position: absolute;
  top: 40%;
  left: 50%;
  width: min(340px, calc(100% - 56px));
  transform: translate(-50%, -50%);
  border-radius: 14px;
  transition: transform 150ms var(--ease-out);
}
.field .card-tall {
  top: 42%;
  width: min(230px, calc(100% - 96px));
}
.field:hover .card {
  transform: translate(-50%, calc(-50% - 6px));
}
.f-oat {
  background: var(--oat);
  color: var(--bean);
}
.f-marigold {
  background: var(--marigold);
  color: var(--bean);
}
.f-terracotta {
  background: var(--terracotta);
  color: var(--bean);
}
.f-navy {
  background: var(--navy);
  color: var(--ice);
}

/* What it does: sentences with switches. */
.bands {
  background: var(--latte);
}
.band {
  display: grid;
  grid-template-columns: minmax(0, 10fr) minmax(0, 2fr);
  align-items: center;
  min-height: 20vh;
  padding: 1.5rem var(--margin);
  background: var(--latte);
  color: var(--latte-ink-soft);
  transition:
    background-color 260ms ease,
    color 260ms ease;
}
.band[data-on='true'] {
  background: var(--band-on);
  color: var(--bean);
}
.band-text {
  display: grid;
  gap: 0.5rem;
}
.band-line {
  font-size: var(--t-statement);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.band-more {
  max-width: 60ch;
}
.js .band[data-on='false'] .band-more {
  display: none;
}
.band-oat {
  --band-on: var(--oat);
}
.band-marigold {
  --band-on: var(--marigold);
}
.band-sky {
  --band-on: var(--sky);
}
.band-terracotta {
  --band-on: var(--terracotta);
}
.band-beige {
  --band-on: var(--beige);
}

/* The app's switch. */
[data-ui].switch {
  justify-self: end;
  position: relative;
  width: 3.4em;
  height: 2em;
  border-radius: 999px;
  background: rgba(43, 30, 22, 0.28);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  transition: background-color 200ms ease;
}
[data-ui].switch::after {
  content: '';
  position: absolute;
  top: 0.12em;
  left: 0.12em;
  width: 1.76em;
  height: 1.76em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition: transform 220ms var(--ease-out);
}
[data-ui].switch[aria-checked='true'] {
  background: #2f7a4f;
}
[data-ui].switch[aria-checked='true']::after {
  transform: translateX(1.4em);
}

/* Questions: a band per question. */
.faq-head {
  min-height: 40svh;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--margin) 2rem;
  background: var(--coffee);
  color: var(--cream);
}
.faq-head h2 {
  font-size: var(--t-display);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.qa {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding: 56px var(--margin);
}
.qa:nth-child(odd) {
  background: var(--oat);
}
.qa:nth-child(even) {
  background: var(--beige);
}
.qa h3 {
  grid-column: 1 / span 5;
  font-size: var(--t-statement);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.qa > p {
  grid-column: 7 / span 6;
}
.qa p {
  max-width: 54ch;
}
.qa-answer {
  grid-column: 7 / span 6;
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}
.qa .shot {
  width: min(100%, 23rem);
  border-radius: 14px;
}

/* Plans: four tiles that step up with the household. */
.plans {
  background: var(--navy);
  color: var(--ice);
  padding: clamp(4rem, 9vw, 8rem) var(--margin) clamp(3rem, 6vw, 5rem);
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.plans h2 {
  grid-column: 1 / span 2;
  grid-row: 1;
  align-self: start;
  font-size: var(--t-head);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 9ch;
}
.tile {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--bean);
}
.tile-body {
  padding: 28px;
  display: grid;
  gap: 0.25rem;
  align-content: start;
  flex: 1;
}
.tile h3 {
  font-size: var(--t-head);
  line-height: 1;
  letter-spacing: -0.03em;
}
.tile .price {
  font-size: var(--t-statement);
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.75rem;
}
.tile ul {
  display: grid;
  gap: 0.2rem;
  padding: 0;
  list-style: none;
}
.tile-get {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 28px;
  font-weight: 800;
  text-decoration: none;
  background: var(--tile-deep);
  transition: padding-left 200ms var(--ease-out);
}
.tile-get:hover {
  padding-left: 36px;
}
.tile-free {
  grid-column: 1;
  min-height: 360px;
  background: var(--oat);
  --tile-deep: var(--oat-deep);
  grid-row: 1;
  align-self: end;
}
.tile-duo {
  grid-column: 2;
  min-height: 440px;
  background: var(--beige);
  --tile-deep: var(--beige-deep);
}
.tile-family {
  grid-column: 3;
  min-height: 520px;
  background: var(--marigold);
  --tile-deep: var(--marigold-deep);
}
.tile-plus {
  grid-column: 4;
  min-height: 600px;
  background: var(--terracotta);
  --tile-deep: var(--terracotta-deep);
}
.plans-note {
  margin-top: 2rem;
  max-width: 64ch;
  color: var(--ice);
}

/* Start: the app's first screen, already open. */
.start {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  min-height: 90svh;
  padding: 40px var(--margin);
  background: var(--terracotta);
  color: var(--bean);
}
.start-close {
  grid-column: 1 / span 7;
  align-self: end;
  display: grid;
  gap: 1rem;
}
.start-close h2 {
  font-size: var(--t-display);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.start-close p {
  max-width: 36ch;
}
.start-ui {
  grid-column: 8 / span 5;
  align-self: center;
  justify-self: start;
}

[data-ui].dialog {
  width: min(100%, 440px);
  border-radius: 28px;
  background: var(--coffee);
  color: var(--cream);
  padding: 28px 24px 24px;
  box-shadow: 0 30px 60px rgba(43, 30, 22, 0.35);
  display: grid;
  gap: 18px;
}
[data-ui] .dialog-title {
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}
[data-ui] .dialog-sub {
  color: var(--cream-soft);
  font-size: 1rem;
}
[data-ui] .species {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
[data-ui] .species button {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 8px 12px;
  border-radius: 18px;
  background: var(--beige);
  color: var(--bean);
  font-weight: 800;
  border: 3px solid transparent;
  transition:
    transform 140ms var(--ease-out),
    border-color 160ms ease;
}
[data-ui] .species button img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
}
[data-ui] .species button[aria-checked='true'] {
  border-color: var(--terracotta);
}
[data-ui] .species button:active {
  transform: scale(0.97);
}
[data-ui] .name-field {
  display: grid;
  gap: 6px;
}
[data-ui] .name-field label {
  font-size: 0.9375rem;
  color: var(--cream-soft);
}
[data-ui] .name-field input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--beige);
  color: var(--bean);
  font-size: 1.0625rem;
}
[data-ui] .name-field input:focus {
  outline: none;
  border-color: var(--marigold);
}
[data-ui] .dialog-go {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--bean);
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 140ms var(--ease-out),
    background-color 180ms ease;
}
[data-ui] .dialog-go:hover {
  background: var(--marigold);
}
[data-ui] .dialog-go:active {
  transform: scale(0.97);
}
[data-ui] .dialog-note {
  font-size: 0.9375rem;
  color: var(--cream-soft);
  text-align: center;
}

/* ---------- footer: the last two rows of the board ---------- */
.foot {
  background: var(--oat);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
}
.tile-f {
  border-radius: var(--radius);
  padding: 24px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}
.tf-statement {
  grid-column: 1 / span 4;
  background: var(--beige);
}
.tf-statement p:first-child {
  font-size: var(--t-statement);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.tf-legal {
  font-size: var(--t-small);
}
.tf-nav {
  grid-column: 5 / span 3;
  background: var(--marigold);
  justify-content: flex-start;
}
.tf-nav ul {
  display: grid;
  gap: 0.15rem;
  padding: 0;
  list-style: none;
}
.tf-nav a {
  text-decoration: none;
}
.tf-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.tf-time {
  grid-column: 8 / span 2;
  background: var(--navy);
  color: var(--ice);
}
.tf-time strong {
  display: block;
  font-weight: 800;
}
.tf-mail {
  grid-column: 10 / span 3;
  background: var(--latte);
}
.tf-mail a {
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.tf-mail a:hover {
  text-decoration: underline;
}
.tf-word {
  grid-column: 1 / span 8;
  min-height: 320px;
  background: var(--coffee);
  color: var(--cream);
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.tf-word span {
  font-size: var(--t-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tf-go {
  grid-column: 9 / span 4;
  min-height: 320px;
  background: var(--terracotta);
  text-decoration: none;
  transition: background-color 200ms ease;
}
.tf-go:hover {
  background: var(--marigold);
}
.tf-go span {
  font-size: var(--t-statement);
  font-weight: 800;
  line-height: 1.1;
}
.tf-go svg {
  align-self: flex-end;
  width: 56px;
  height: 56px;
  transition: transform 200ms var(--ease-out);
}
.tf-go:hover svg {
  transform: translate(4px, -4px);
}

/* ---------- inner pages: the same oat frame, a coloured panel and a pet ---------- */
.page-frame {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 10px;
  padding: 10px;
}
.page-head {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(4rem, 14vh, 10rem);
  min-height: min(74svh, 46rem);
  padding: 28px;
  border-radius: var(--radius);
  background: var(--page-ground, var(--coffee));
  color: var(--page-ink, var(--cream));
}
.page-night {
  --page-ground: var(--navy);
  --page-ink: var(--ice);
}
.page-terracotta {
  --page-ground: var(--terracotta);
  --page-ink: var(--bean);
}
.page-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.page-word {
  font-weight: 800;
  text-decoration: none;
}
.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem clamp(1rem, 2vw, 2rem);
}
.page-nav a {
  text-decoration: none;
}
.page-nav a:hover,
.page-nav a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 0.1em;
}
.page-nav .page-get {
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: var(--page-ink, var(--cream));
  color: var(--page-ground, var(--coffee));
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms var(--ease-out);
}
.page-nav .page-get:active {
  transform: scale(0.96);
}
.page-title {
  font-size: var(--t-display);
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.page-title span {
  display: block;
}
.page-sub {
  margin-top: 1.25rem;
  max-width: 30ch;
  font-size: var(--t-statement);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.button-light {
  background: var(--cream);
}
.page-head .button-light:hover {
  background: var(--marigold);
}
.button-dark {
  background: var(--bean);
  color: var(--cream);
}
.page-head .button-dark:hover {
  background: var(--marigold);
  color: var(--bean);
}
.page-pet {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--pet-ground, #eadbbc);
}
.page-pet figcaption {
  padding: 24px 24px 0;
  font-size: var(--t-statement);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bean);
}
.page-pet img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.pet-mochi {
  --pet-ground: #dad3c8;
}

/* A long document: the sections as swatches beside the text. */
.doc {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
  padding: clamp(3rem, 6vw, 6rem) var(--margin) clamp(4rem, 8vw, 8rem);
}
.doc-index {
  grid-column: 1 / span 3;
  position: sticky;
  top: 1.5rem;
}
.doc-index ol {
  display: grid;
  padding: 0;
  list-style: none;
  border-radius: var(--radius);
  overflow: hidden;
}
.doc-index a {
  display: block;
  padding: 14px 18px;
  background: var(--sw-bg, var(--beige));
  color: var(--sw-ink, var(--bean));
  font-size: var(--t-small);
  font-weight: 800;
  text-decoration: none;
}
.doc-index a span {
  display: inline-block;
  transition: transform 220ms var(--ease-out);
}
.doc-index a:hover span {
  transform: translateX(8px);
}
.doc-index li:nth-child(6n + 1) a {
  --sw-bg: var(--beige);
}
.doc-index li:nth-child(6n + 2) a {
  --sw-bg: var(--marigold);
}
.doc-index li:nth-child(6n + 3) a {
  --sw-bg: var(--latte);
}
.doc-index li:nth-child(6n + 4) a {
  --sw-bg: var(--terracotta);
}
.doc-index li:nth-child(6n + 5) a {
  --sw-bg: var(--coffee);
  --sw-ink: var(--cream);
}
.doc-index li:nth-child(6n + 6) a {
  --sw-bg: var(--navy);
  --sw-ink: var(--ice);
}
.doc-text {
  grid-column: 5 / span 7;
  max-width: 44rem;
}
.doc-updated {
  margin-top: 1rem;
  font-size: var(--t-small);
  font-weight: 800;
}
.doc-text section {
  padding-top: 2.75rem;
  scroll-margin-top: 0.5rem;
}
.doc-text h2 {
  margin-bottom: 0.75rem;
  font-size: var(--t-statement);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.doc-text p + p,
.doc-text p + ul,
.doc-text ul + p {
  margin-top: 0.9em;
}
.doc-text ul {
  padding-left: 1.2em;
}
.doc-text .shot {
  margin-top: 1.5rem;
  width: min(100%, 23rem);
  border-radius: 14px;
}
.doc-text li + li {
  margin-top: 0.4em;
}
.doc-text a,
.qa a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

/* Support: the address as big as a headline, then a band per question. */
.help-mail {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 1.5rem;
  align-items: end;
  padding: clamp(4rem, 9vw, 8rem) var(--margin);
  background: var(--marigold);
  color: var(--bean);
}
.help-mail h2 {
  grid-column: 1 / span 7;
  font-size: var(--t-head);
  line-height: 1;
  letter-spacing: -0.03em;
}
.help-mail h2 a {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 0.06em;
}
.help-mail h2 a:hover {
  text-decoration-thickness: 0.1em;
}
.help-mail p {
  grid-column: 9 / span 4;
}
.help-head {
  min-height: 0;
  padding-top: clamp(4rem, 9vw, 8rem);
}

/* One screen: the invite and the lost page. */
.single {
  min-height: 100svh;
}
.single .page-head {
  min-height: calc(100svh - 20px);
}
.join-code {
  margin-top: 1.5rem;
  max-width: 40ch;
}

/* ---------- motion (content stays visible without script) ---------- */
/* Stagger order, as attributes so the security policy can refuse inline styles. */
[data-i='1'] {
  --i: 1;
}
[data-i='2'] {
  --i: 2;
}
[data-i='3'] {
  --i: 3;
}
[data-i='4'] {
  --i: 4;
}
[data-i='5'] {
  --i: 5;
}
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 700ms var(--ease-out),
      transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
  .js .field [data-reveal].card {
    transform: translate(-50%, calc(-50% + 24px));
  }
  .js .field [data-reveal].card.is-in {
    transform: translate(-50%, -50%);
  }
  .js .field:hover [data-reveal].card.is-in {
    transform: translate(-50%, calc(-50% - 6px));
  }
  .js .hero-title [data-line] {
    display: block;
    opacity: 0;
    transform: translateY(0.35em);
    animation: rise 900ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 120ms + 120ms);
  }
  .js .hero-foot,
  .js .swatches a {
    opacity: 0;
    transform: translateY(16px);
    animation: rise 800ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 70ms + 420ms);
  }
  .feed[data-state='fed'] .pip-fed {
    animation: pop 520ms var(--ease-out);
  }
  .page-pet img {
    transform-origin: 50% 100%;
    animation: breathe 5.5s var(--ease-soft) infinite;
  }
}
@keyframes breathe {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(-5px) scale(1.012);
  }
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* ---------- tablet ---------- */
@media (max-width: 64rem) {
  .strip {
    grid-template-columns: 1fr 1fr;
  }
  .field {
    min-height: 70svh;
  }
  .plans-grid {
    grid-template-columns: 1fr 1fr;
  }
  .plans h2 {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
  }
  .tile {
    grid-row: auto;
  }
  .tile-free,
  .tile-duo,
  .tile-family,
  .tile-plus {
    grid-column: auto;
    min-height: 0;
  }
}

/* Inner pages on a tablet. */
@media (max-width: 64rem) {
  .doc-index {
    grid-column: 1 / span 4;
  }
  .doc-text {
    grid-column: 6 / span 7;
  }
  .help-mail h2 {
    grid-column: 1 / -1;
  }
  .help-mail p {
    grid-column: 1 / span 8;
  }
}

/* Inner pages on a phone: the panel, then the pet beside its line, then the text. */
@media (max-width: 48rem) {
  .page-frame {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }
  .page-head {
    min-height: 0;
    gap: 4.5rem;
    padding: 20px 20px 28px;
  }
  .page-nav a:not(.page-get) {
    display: none;
  }
  .page-pet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46%;
    align-items: start;
  }
  .page-pet figcaption {
    padding: 20px;
    font-size: var(--t-body);
  }
  .single .page-head {
    min-height: 62svh;
  }
  .doc {
    grid-template-columns: minmax(0, 1fr);
    padding: 32px 20px 64px;
  }
  .doc-index,
  .doc-text {
    grid-column: 1;
  }
  .doc-index {
    position: static;
  }
  .doc-text section {
    padding-top: 2.25rem;
  }
  .help-mail {
    padding: 56px 20px;
  }
  .help-mail p {
    grid-column: 1 / -1;
  }
}

/* ---------- phone: its own composition ---------- */
@media (max-width: 48rem) {
  .hero {
    height: auto;
    min-height: 0;
    padding: 8px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .panel {
    display: flex;
    flex-direction: column;
    padding: 20px 20px 24px;
    min-height: 64svh;
  }
  .wordmark,
  .hero-title,
  .hero-video,
  .hero-foot {
    position: static;
  }
  .hero-title {
    margin: 2.25rem 0 0;
    max-width: none;
  }
  .hero-video {
    width: calc(100% + 40px);
    height: auto;
    margin: 1rem -20px 0 -20px;
    align-self: stretch;
  }
  .hero-foot {
    width: auto;
    margin-top: 0.5rem;
  }
  .swatches {
    grid-template-rows: none;
  }
  .swatches a {
    min-height: 52px;
    padding: 14px 20px;
    font-size: var(--t-small);
  }
  .bar .bar-links a:not(.bar-get) {
    display: none;
  }
  .feed {
    grid-template-columns: 1fr;
  }
  .feed-plate {
    padding: 16px 16px 0;
  }
  .feed-plate figure {
    max-width: 30rem;
  }
  .feed-side {
    padding: 24px 16px 40px;
    gap: 2rem;
  }
  .cells {
    grid-template-columns: 1fr;
  }
  .cell {
    min-height: 60px;
  }
  .strip {
    grid-template-columns: 1fr;
  }
  .field {
    min-height: 0;
    padding: 28px 20px 40px;
  }
  .field .clause {
    order: 1;
  }
  .field .card {
    order: 2;
  }
  .field h2,
  .field .clause {
    max-width: 18ch;
  }
  .field .clause {
    margin-top: 0.75rem;
  }
  .field .card,
  .field .card-tall {
    position: static;
    transform: none;
    width: min(360px, 100%);
    margin-top: 1.5rem;
  }
  .field .card-tall {
    width: min(280px, 100%);
  }
  .js .field [data-reveal].card,
  .js .field [data-reveal].card.is-in,
  .js .field:hover [data-reveal].card.is-in {
    transform: none;
  }
  .band {
    grid-template-columns: 1fr auto;
    gap: 1rem;
    min-height: 132px;
  }
  .band-more {
    font-size: var(--t-small);
  }
  .faq-head {
    min-height: 30svh;
  }

  .qa {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 32px 20px;
  }
  .qa h3,
  .qa > p,
  .qa-answer {
    grid-column: 1;
  }

  .plans-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .tile-get {
    font-size: var(--t-statement);
  }

  .start {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: 84svh;
    padding: 32px 16px;
  }
  .start-close {
    grid-column: 1;
    align-self: start;
  }

  .start-ui {
    grid-column: 1;
    justify-self: stretch;
    align-self: end;
  }
  [data-ui].dialog {
    width: 100%;
  }
  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
  }
  .tile-f {
    padding: 20px;
    min-height: 160px;
  }
  .tf-word {
    grid-column: 1 / -1;
    order: -2;
    min-height: 160px;
  }
  .tf-go {
    grid-column: 1 / -1;
    order: -1;
    min-height: 160px;
  }
  .tf-nav,
  .tf-mail,
  .tf-time,
  .tf-statement {
    grid-column: auto;
  }
  .page-body > * {
    grid-column: 1 / -1;
  }
}
