/* Fresh Sheets launch site. Tokens follow docs/site/BRIEF.md and the app's docs/DESIGN.md. */

:root {
  --bg: #f7f2ea;
  --bg-glow: #fbeee2;
  --surface: #fffcf7;
  --inset: #f6efe5;
  --ink: #2b2620;
  --ink-muted: #6b6155;
  --rule: #e5dccf;
  --rule-strong: #cbbfae;
  --accent: #8a4b2a;
  --accent-hover: #74391c;
  --accent-ink: #fffcf7;
  --accent-soft: #f3e3d6;
  --focus: #1f5f8b;

  --occupied-bg: #f3e8f1;
  --occupied-fg: #5e2750;
  --occupied-border: #c9a2bf;
  --checkout-bg: #fbefd9;
  --checkout-fg: #714405;
  --checkout-border: #e2b866;
  --cleaning-bg: #e3f1fa;
  --cleaning-fg: #1b5574;
  --cleaning-border: #95c6e3;
  --ready-bg: #e6f0e4;
  --ready-fg: #2f5a31;
  --ready-border: #a3c49f;

  /* The welcome sheet stays light paper in both themes, as in the app. */
  --sheet-paper: #fffdf9;
  --sheet-ink: #2b2620;
  --sheet-muted: #6b6155;
  --sheet-rule: #e5dccf;
  --sheet-accent: #8a4b2a;

  --shadow-sm: 0 1px 2px rgb(74 52 30 / 0.06), 0 1px 3px rgb(74 52 30 / 0.08);
  --shadow-md: 0 4px 10px rgb(74 52 30 / 0.08), 0 2px 4px rgb(74 52 30 / 0.06);
  --shadow-lg:
    0 24px 48px -12px rgb(74 52 30 / 0.22), 0 8px 16px rgb(74 52 30 / 0.08);

  --font-display:
    "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter,
    Georgia, serif;
  --font-body:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;

  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --section-gap: clamp(5rem, 12vw, 9rem);
  --max: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --tilt: 2deg;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1915;
    --bg-glow: #2a211a;
    --surface: #25211c;
    --inset: #1f1c18;
    --ink: #f1ebe2;
    --ink-muted: #b8ad9e;
    --rule: #3a342c;
    --rule-strong: #564d42;
    --accent: #e3a47e;
    --accent-hover: #ecb795;
    --accent-ink: #1c1915;
    --accent-soft: #3e2c21;
    --focus: #8cc8f0;
    --occupied-bg: #3a2034;
    --occupied-fg: #f1cfe8;
    --occupied-border: #7a4a6d;
    --checkout-bg: #3d2c10;
    --checkout-fg: #f7d79b;
    --checkout-border: #8a6526;
    --cleaning-bg: #15303f;
    --cleaning-fg: #b9e0f5;
    --cleaning-border: #3c6f8c;
    --ready-bg: #1e3221;
    --ready-fg: #c3e2bf;
    --ready-border: #4b7a4f;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 24px 48px -12px rgb(0 0 0 / 0.6);
  }
}

/* Each status sets the colours its pill, rail and circle use. */
[data-status="occupied"] {
  --s-bg: var(--occupied-bg);
  --s-fg: var(--occupied-fg);
  --s-border: var(--occupied-border);
}
[data-status="checkout"] {
  --s-bg: var(--checkout-bg);
  --s-fg: var(--checkout-fg);
  --s-border: var(--checkout-border);
}
[data-status="cleaning"] {
  --s-bg: var(--cleaning-bg);
  --s-fg: var(--cleaning-fg);
  --s-border: var(--cleaning-border);
}
[data-status="ready"] {
  --s-bg: var(--ready-bg);
  --s-fg: var(--ready-fg);
  --s-border: var(--ready-border);
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm {
  width: 18px;
  height: 18px;
}
.icon--lg {
  width: 24px;
  height: 24px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-200%);
  transition: transform 200ms var(--ease-standard);
}
.skip-link:focus-visible {
  transform: translateY(0);
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0 1.5rem;
  border-radius: 10px;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 200ms var(--ease-spring),
    box-shadow 200ms var(--ease-standard),
    background-color 150ms var(--ease-standard);
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.btn--primary:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
  transition-duration: 120ms;
}
.btn--small {
  min-height: 44px;
  padding: 0 1rem;
  font-size: 0.9375rem;
}
.btn--large {
  min-height: 56px;
  padding: 0 2rem;
  font-size: 1.0625rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 150ms var(--ease-standard);
}
.text-link:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}
.text-link:active {
  opacity: 0.7;
}
.text-link .icon {
  transition: transform 200ms var(--ease-standard);
}
.text-link:hover .icon {
  transform: translateY(2px);
}

/* Header */

.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
html:not(.no-js) .site-header:not(.is-scrolled) {
  border-bottom-color: transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover .brand__word {
  color: var(--accent);
}
.brand:active {
  opacity: 0.8;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-nav__link {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 8px;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms var(--ease-standard);
}
.site-nav__link:hover {
  color: var(--ink);
  background: var(--accent-soft);
}
.site-nav__link:active {
  opacity: 0.7;
}
@media (min-width: 640px) {
  .site-nav__link {
    display: inline-flex;
  }
}

/* Shared section type */

main > section {
  padding-block: var(--section-gap);
}
.band {
  background: var(--inset);
  border-block: 1px solid var(--rule);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  max-width: 22ch;
}
.section-title--centred {
  margin-inline: auto;
  text-align: center;
}
.section-intro,
.section-body {
  margin-top: 1rem;
  max-width: 34rem;
  color: var(--ink-muted);
}
.section-intro--centred {
  margin-inline: auto;
  text-align: center;
}

/* Status pill, as in the app */

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--s-border);
  border-radius: 999px;
  background: var(--s-bg);
  color: var(--s-fg);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

/* 1. Hero */

.hero {
  position: relative;
  overflow-x: clip;
  padding-top: clamp(3rem, 8vw, 6rem) !important;
}
.hero__grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}
.hero__descriptor {
  color: var(--ink-muted);
  font-size: 0.95rem;
}
.hero__title {
  margin-top: 1rem;
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero__line {
  display: block;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero__sub {
  margin-top: 1.5rem;
  max-width: 32rem;
  color: var(--ink-muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}
.hero__quiet {
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.hero__scene {
  position: relative;
  min-width: 0;
}
.hero__scene::before {
  content: "";
  position: absolute;
  inset: -20% -15%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--bg-glow), transparent);
  pointer-events: none;
}
.hero__caption {
  margin-top: 1.75rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}
.no-js .hero__caption {
  display: none;
}

.scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 30rem;
  margin-inline: auto;
  padding-top: 1rem;
}
.scene__card {
  width: 100%;
  max-width: 25rem;
}
.scene__card + .scene__card {
  margin-top: -3.25rem;
}
.scene__card--c {
  transform: translateX(6%) rotate(var(--tilt));
}
.scene__card--b {
  transform: translateX(-5%) rotate(calc(var(--tilt) * -1));
}
.scene__card--a {
  z-index: 2;
}

.scene__sheet {
  position: absolute;
  top: -0.5rem;
  right: -2%;
  width: 46%;
  aspect-ratio: 210 / 297;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  background: var(--sheet-paper);
  color: var(--sheet-ink);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  transform: translateX(14%) rotate(-6deg);
}
.scene__sheet-eyebrow {
  font-size: 0.6rem;
  font-variant: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--sheet-muted);
}
.scene__sheet-greeting {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
}
.scene__sheet-line {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--sheet-rule);
}
.scene__sheet-line--short {
  width: 60%;
}

/* Room card, built like the app's */

.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1rem 1rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  text-align: left;
}
.room-card::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 5px;
  border-radius: 10px 0 0 10px;
  background: var(--s-border);
}
.room-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.room-card__name {
  font-size: 1.25rem;
  line-height: 1.2;
}
.room-card__meta {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  margin-top: -0.35rem;
}
.room-card__guest-wrap {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: -0.6rem;
  transition:
    grid-template-rows 320ms var(--ease-standard),
    margin-top 320ms var(--ease-standard);
}
.room-card__guest-wrap[data-open="true"] {
  grid-template-rows: 1fr;
  margin-top: 0;
}
.room-card__guest-inner {
  overflow: hidden;
  min-height: 0;
}
.room-card__guest {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--inset);
  border: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.room-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 1rem/1 var(--font-body);
}
button.room-card__btn {
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform 120ms var(--ease-standard),
    background-color 150ms var(--ease-standard);
}
button.room-card__btn:hover {
  background: var(--accent-hover);
}
button.room-card__btn:active {
  transform: scale(0.97);
}

/* The hero card's status change: rail and pill cross-fade in. */
.room-card.is-changing::before,
.room-card.is-changing .pill {
  animation: fade-in 200ms var(--ease-standard);
}
@keyframes fade-in {
  from {
    opacity: 0.15;
  }
}

/* Sparkle burst: three CSS-drawn four-point sparkles. */
.sparkles {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 0;
  height: 0;
  pointer-events: none;
}
.sparkles i {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: var(--ready-fg);
  clip-path: polygon(
    50% 0,
    62% 38%,
    100% 50%,
    62% 62%,
    50% 100%,
    38% 62%,
    0 50%,
    38% 38%
  );
  opacity: 0;
}
.burst .sparkles i {
  animation: sparkle 500ms var(--ease-out);
}
.sparkles i:nth-child(1) {
  --to: translate(-18px, -16px);
}
.sparkles i:nth-child(2) {
  --to: translate(10px, -22px);
  animation-delay: 40ms;
}
.sparkles i:nth-child(3) {
  --to: translate(20px, 4px);
  animation-delay: 80ms;
}
@keyframes sparkle {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.2) rotate(0deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: var(--to) scale(1) rotate(45deg);
  }
}

/* 2. How it works */

.track {
  position: relative;
  margin-top: 3rem;
}
.track__steps {
  position: relative;
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 1.25rem;
  align-items: start;
}
/* The last step covers the vertical line's run past its circle. */
.step:last-child {
  background: var(--inset);
}
.step__circle {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--s-bg);
  border: 1px solid var(--s-border);
  color: var(--s-fg);
  box-shadow: 0 0 0 6px var(--inset);
}
.step__name {
  font-size: 1.3rem;
  padding-top: 0.75rem;
}
.step p {
  color: var(--ink-muted);
  max-width: 24rem;
}

.track__line {
  position: absolute;
  overflow: visible;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}
.track__line--h {
  display: none;
}
.track__line--v {
  left: 27px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  height: calc(100% - 56px);
}

@media (min-width: 960px) {
  .track__steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
  .step {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }
  .step__circle {
    grid-row: auto;
    margin-bottom: 0.75rem;
  }
  .step__name {
    padding-top: 0;
  }
  .track__line--v {
    display: none;
  }
  .track__line--h {
    display: block;
    top: 27px;
    left: 28px;
    width: calc(75% + 1.5rem);
    height: 2px;
  }
}

.how__note {
  margin-top: 3rem;
  max-width: 40rem;
  color: var(--ink-muted);
}

/* 3. The welcome sheet */

.welcome__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.ticks {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}
.ticks li {
  display: flex;
  gap: 0.7rem;
  max-width: 32rem;
}
.ticks .icon {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  color: var(--accent);
  stroke-width: 2.2;
}

.sheet-holder {
  container-type: inline-size;
  padding: 1rem;
}
.sheet {
  position: relative;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  padding: 9% 10%;
  background: var(--sheet-paper);
  color: var(--sheet-ink);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  font-size: clamp(9px, 2.6cqi, 16px);
  line-height: 1.45;
  transform: rotate(-1.5deg);
  transition: transform 400ms var(--ease-standard);
}
.sheet::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid var(--sheet-rule);
  border-radius: 2px;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .sheet:hover {
    transform: translateY(-4px) rotate(0deg);
  }
}
.sheet__eyebrow {
  font-size: 0.8em;
  font-variant: all-small-caps;
  letter-spacing: 0.16em;
  color: var(--sheet-muted);
  font-weight: 600;
}
.sheet__greeting {
  margin-top: 0.3em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.6em;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.sheet__stay {
  margin-top: 0.5em;
  color: var(--sheet-muted);
  font-size: 0.95em;
}
.sheet__rule {
  width: 3em;
  margin: 1.2em 0;
  border: 0;
  border-top: 2px solid var(--sheet-accent);
}
.sheet__note {
  font-family: var(--font-display);
  font-size: 1.1em;
}
.sheet__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em 1.5em;
  margin: 1.5em 0 0;
  padding-top: 1.2em;
  border-top: 1px solid var(--sheet-rule);
}
.sheet dt,
.sheet__heading {
  font-size: 0.8em;
  font-variant: all-small-caps;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--sheet-accent);
}
.sheet dd {
  margin: 0.1em 0 0;
}
.sheet__muted {
  color: var(--sheet-muted);
}
.sheet__heading {
  margin-top: 1.5em;
  padding-top: 1.2em;
  border-top: 1px solid var(--sheet-rule);
  font-size: 0.85em;
}
.sheet__picks {
  display: grid;
  gap: 0.45em;
  margin: 0.5em 0 0;
}
.sheet__picks div {
  display: grid;
  grid-template-columns: 4em 1fr;
}
.sheet__picks dt {
  color: var(--sheet-muted);
  padding-top: 0.15em;
}
.sheet__footer {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 7%;
  padding-top: 0.8em;
  border-top: 1px solid var(--sheet-rule);
  color: var(--sheet-muted);
  font-size: 0.9em;
}

@media (min-width: 960px) {
  .welcome__grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .welcome__sheet-col {
    grid-column: 1 / span 7;
    grid-row: 1;
  }
  .welcome__copy {
    grid-column: 8 / span 5;
    grid-row: 1;
  }
}

/* 4. Features */

.feature-grid {
  display: grid;
  gap: 1.25rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 200ms var(--ease-standard),
    box-shadow 200ms var(--ease-standard);
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.feature__title {
  margin-top: 1.1rem;
  font-size: 1.25rem;
  line-height: 1.25;
}
.feature p {
  margin-top: 0.5rem;
  color: var(--ink-muted);
}

/* 5. See it for real */

.live__grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
  align-items: start;
}
.live__frame-col {
  min-width: 0;
}
.device {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  overflow: hidden;
  border: 10px solid var(--ink);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.device__chrome {
  display: none;
}
.device__screen {
  display: block;
  width: 100%;
  height: 680px;
  border: 0;
  background: var(--bg);
}
.live__full {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  width: fit-content;
  margin-inline: auto;
}
.hints {
  counter-reset: hint;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
  font-size: 0.9375rem;
}
.hints li {
  counter-increment: hint;
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: baseline;
  color: var(--ink);
}
.hints li::before {
  content: counter(hint);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}

@media (min-width: 960px) {
  .live__grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
  }
  .live__frame-col {
    grid-column: span 8;
  }
  .hints {
    grid-column: span 4;
    align-self: center;
    padding-top: 0;
    gap: 2rem;
    font-size: 1.0625rem;
  }
  .hints li {
    grid-template-columns: 2.75rem 1fr;
  }
  .hints li::before {
    font-size: 2.25rem;
  }
  .device {
    max-width: none;
    border: 1px solid var(--rule);
    border-radius: 16px;
  }
  .device__chrome {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
  }
  .device__dots {
    position: absolute;
    left: 14px;
    display: flex;
    gap: 6px;
  }
  .device__dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rule-strong);
  }
  .device__address {
    padding: 0.15rem 1.25rem;
    border-radius: 999px;
    background: var(--inset);
    color: var(--ink-muted);
    font-size: 0.75rem;
  }
  .device__screen {
    height: 560px;
  }
  .live__full {
    margin-inline: 0;
  }
}

/* 6. Closing call to action */

.closing {
  position: relative;
  isolation: isolate;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 60% 55% at 50% 50%,
    var(--bg-glow),
    transparent
  );
}
.closing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pill-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.75rem 1rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}
.pill-row::before {
  content: "";
  position: absolute;
  left: -1rem;
  right: -1rem;
  top: 50%;
  border-top: 1.5px dashed var(--accent);
  opacity: 0.6;
  z-index: -1;
}
@media (min-width: 640px) {
  .pill-row {
    grid-template-columns: repeat(4, auto);
    gap: 1rem;
  }
}
.pill-row .pill {
  justify-content: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
}
.pill-row .sparkles {
  top: 0;
  right: 0.2rem;
}
.closing__title {
  font-size: clamp(2.1rem, 5.5vw, 3.75rem);
  line-height: 1.08;
  max-width: 22ch;
}
.closing__line {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: var(--ink-muted);
}
.closing .btn {
  margin-top: 2rem;
}
.closing__small {
  margin-top: 1rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* 7. Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.site-footer__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}
.site-footer__brand .brand__word {
  font-size: 1.4rem;
}
.site-footer__desc,
.site-footer__aside {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
@media (min-width: 760px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .site-footer__aside {
    text-align: right;
  }
}

/* Hero layout from 960px: copy 6/12, scene 6/12, a two-line headline. */
@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
  }
  .hero__copy {
    grid-column: 1 / span 6;
  }
  .hero__title {
    font-size: clamp(2.6rem, 4.6vw, 4.25rem);
  }
  .hero__line {
    white-space: nowrap;
  }
  .hero__scene {
    grid-column: 7 / span 6;
    align-self: center;
    padding-top: 2rem;
  }
  .scene {
    max-width: 34rem;
  }
  .scene__card {
    max-width: 28rem;
  }
}

/* The narrowest phones: keep the logo, wordmark and button on one row. */
@media (max-width: 359px) {
  .site-header .wrap {
    padding-inline: 0.875rem;
  }
  .site-header .brand {
    gap: 0.4rem;
  }
  .site-header .brand__word {
    font-size: 1.05rem;
  }
  .btn--small {
    padding: 0 0.75rem;
    font-size: 0.875rem;
  }
}

/* Phones: smaller tilts, no overhang. */
@media (max-width: 639px) {
  :root {
    --tilt: 1deg;
  }
  .scene__sheet {
    right: 0;
    width: 46%;
    transform: translateX(4%) rotate(-6deg);
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }

  /* Compact feature cards: icon beside the title, text under it. */
  .feature-grid {
    gap: 0.875rem;
  }
  .feature {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 1rem;
    padding: 20px;
  }
  .feature__icon {
    grid-row: span 2;
  }
  .feature__title {
    margin-top: 0;
    align-self: center;
  }
  .feature p {
    grid-column: 2;
  }
}

/* Motion. Entrance states apply only once JS has run and motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  html:not(.no-js) .scene__card {
    animation: rise 480ms cubic-bezier(0.2, 0, 0, 1) backwards;
  }
  html:not(.no-js) .scene__card--c {
    animation-delay: 0ms;
  }
  html:not(.no-js) .scene__card--b {
    animation-delay: 60ms;
  }
  html:not(.no-js) .scene__card--a {
    animation-delay: 120ms;
  }
  html:not(.no-js) .scene__sheet {
    animation: sheet-out 480ms var(--ease-out) 300ms backwards;
  }

  /* How it works: the dashed line draws, then each circle pops in. */
  html:not(.no-js) .track:not(.is-in) .track__line {
    clip-path: inset(0 100% 0 0);
  }
  html:not(.no-js) .track:not(.is-in) .track__line--v {
    clip-path: inset(0 0 100% 0);
  }
  html:not(.no-js) .track.is-in .track__line {
    animation: draw-h 900ms var(--ease-standard) backwards;
  }
  html:not(.no-js) .track.is-in .track__line--v {
    animation-name: draw-v;
  }
  html:not(.no-js) .track:not(.is-in) .step__circle {
    transform: scale(0.85);
    opacity: 0;
  }
  html:not(.no-js) .track.is-in .step__circle {
    animation: pop 420ms var(--ease-spring) backwards;
    animation-delay: calc(var(--i) * 280ms);
  }

  /* The sheet comes out of the printer. */
  html:not(.no-js) .sheet-holder:not(.is-in) .sheet {
    clip-path: inset(0 0 100% 0);
  }
  html:not(.no-js) .sheet-holder.is-in .sheet {
    animation: print 1500ms var(--ease-out) backwards;
  }

  /* Feature cards fade up. */
  html:not(.no-js) .feature-grid:not(.is-in) .feature {
    opacity: 0;
  }
  html:not(.no-js) .feature-grid.is-in .feature {
    animation: rise-small 480ms var(--ease-out) backwards;
    animation-delay: calc(var(--i) * 50ms);
  }

  /* The device frame fades in. */
  html:not(.no-js) .device:not(.is-in) {
    opacity: 0;
  }
  html:not(.no-js) .device.is-in {
    animation: fade-in-full 600ms var(--ease-out) backwards;
  }

  /* Closing pills light up left to right. */
  html:not(.no-js) .pill-row .pill::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    opacity: 1;
    transition: opacity 240ms var(--ease-standard);
    transition-delay: calc(var(--i) * 160ms);
    z-index: 0;
  }
  html:not(.no-js) .pill-row .pill > svg,
  html:not(.no-js) .pill-row .pill > span:not(.sparkles) {
    position: relative;
    z-index: 1;
  }
  /* Each label and icon turns with its own overlay, not all at once. */
  html:not(.no-js) .pill-row .pill {
    transition: color 240ms var(--ease-standard);
    transition-delay: calc(var(--i) * 160ms);
  }
  html:not(.no-js) .pill-row:not(.is-in) .pill {
    color: var(--ink-muted);
  }
  html:not(.no-js) .pill-row.is-in .pill::after {
    opacity: 0;
  }
  html:not(.no-js) .pill-row .sparkles {
    z-index: 2;
  }

  .site-header {
    transition: border-color 200ms var(--ease-standard);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}
@keyframes rise-small {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes sheet-out {
  from {
    opacity: 0;
    translate: -24px 0;
  }
}
@keyframes draw-h {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes draw-v {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}
@keyframes print {
  0% {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-24px) rotate(0deg);
  }
  70% {
    clip-path: inset(0 0 0 0);
    transform: translateY(0) rotate(0deg);
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: translateY(0) rotate(-1.5deg);
  }
}
@keyframes fade-in-full {
  from {
    opacity: 0;
  }
}

/* Reduced motion: everything in its final state, nothing animates. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .sheet:hover {
    transform: rotate(-1.5deg);
  }
}
