/* Kaji marketing site.
   Colours are the app's own (kaji/src/theme/index.ts): brand blue
   #355fb2, the yellow of its priority stars, the green of a ticked
   chore. Lora for headings and Red Hat Display for everything else,
   as in the app. Light only, like the app. */

:root {
  color-scheme: light;

  --blue: #355fb2;
  --blue-deep: #2c367c;
  --blue-soft: #7da0e8;
  --tint: #f3f6fc;
  --warm: #fbf7f2;

  --ink: #1f2233;
  --text: #4a4e62;
  --muted: #656a7e;
  --line: #e3e6ef;

  --green: #5ec18e;
  --yellow: #f5bf4c;
  --pink: #ea5b94;
  --peach: #f8a98d;

  /* The app's own greys, for the phone and the chores */
  --app-text: #444;
  --app-ring: #bbb;
  --app-date: #888;

  --serif: "Lora", Georgia, serif;
  --sans: "Red Hat Display", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-card: 0 1px 2px rgb(31 34 51 / 0.05), 0 12px 32px -12px rgb(31 34 51 / 0.14);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--blue-soft);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.apple-glyph {
  width: 1.05em;
  height: 1.05em;
  margin-top: -0.2em;
}

/* ---------- reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.reviews__row .reveal:nth-child(2),
.plans .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reviews__row .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgb(31 34 51 / 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
}

.brand--small {
  font-size: 1.1rem;
  margin-right: 0;
}

.brand--small img {
  border-radius: 7px;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  font-weight: 500;
}

.nav__links a {
  color: var(--text);
  text-decoration: none;
}

.nav__links a:hover {
  color: var(--blue);
}

.nav__cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.nav__cta:hover {
  background: var(--blue-deep);
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
}

/* ---------- shared bits ---------- */

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgb(17 17 17 / 0.6);
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.store:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px rgb(17 17 17 / 0.6);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section--tint {
  background: var(--tint);
}

.section--rest {
  background: var(--warm);
}

.section h2 {
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}

.section p + p {
  margin-top: 14px;
}

.section__head {
  max-width: 640px;
}

.section__head p {
  font-size: 1.125rem;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.split--flip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.split__copy p {
  font-size: 1.125rem;
  max-width: 32em;
}

@media (max-width: 900px) {
  .split,
  .split--flip {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The app's outlined "30m limit" pill */
.limit {
  flex-shrink: 0;
  padding: 0.38em 0.85em;
  border: 1px solid var(--app-ring);
  border-radius: 999px;
  color: #555;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: nowrap;
}

.limit b {
  font-weight: 500;
}

/* ---------- the dictionary entry ---------- */

.define {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 26px;
  color: var(--ink);
}

.define__word {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
}

.define__dot {
  color: #777;
  padding-inline: 0.06em;
}

.define__pos {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.define__meaning {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
}

.define__meaning::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 12px;
  vertical-align: 0.3em;
  background: #c7c9d3;
}

.define--stack {
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  text-align: center;
}

.define--stack .define__word {
  font-size: clamp(2.8rem, 2rem + 3vw, 4rem);
  line-height: 1.05;
}

.define--stack .define__pos {
  font-size: 1.05rem;
}

.define--stack .define__meaning {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid #d5d7df;
  font-size: 1.4rem;
}

.define--stack .define__meaning::before {
  display: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  /* The soft shapes behind the phone run past the edge of the screen */
  overflow-x: clip;
  padding-block: clamp(36px, 6vw, 80px) clamp(64px, 8vw, 112px);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__copy {
  container-type: inline-size;
}

/* Sized from the column, so each sentence keeps to one line */
.hero h1 {
  font-size: clamp(2.3rem, 12.4cqi, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.lede {
  margin-top: 26px;
  max-width: 30em;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.55;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 34px;
}

.hero__note {
  color: var(--muted);
  font-weight: 500;
}

.hero__demo {
  position: relative;
  display: grid;
  grid-template-columns: 196px 320px;
  gap: 22px;
  align-items: center;
}

/* The two soft shapes behind the phone, after the App Store artwork */
.hero__demo::before,
.hero__demo::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hero__demo::before {
  width: 560px;
  aspect-ratio: 1;
  right: -150px;
  top: 50%;
  translate: 0 -46%;
  background: radial-gradient(closest-side, #dfe7f8 0%, #e9eefa 60%, rgb(233 238 250 / 0) 100%);
}

.hero__demo::after {
  width: 260px;
  aspect-ratio: 1;
  right: -60px;
  bottom: -30px;
  background: radial-gradient(closest-side, rgb(248 169 141 / 0.38), rgb(245 191 76 / 0.16) 60%, rgb(245 191 76 / 0) 100%);
}

.picker {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(255 255 255 / 0.92);
  box-shadow: var(--shadow-card);
}

.picker__q {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.3;
}

.picker__opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.picker__opts button {
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.picker__opts button:hover {
  border-color: var(--blue-soft);
}

.picker__opts button[aria-checked="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.picker__out {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.4;
}

.picker__out b {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 1060px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__demo {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .hero__demo {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: 100%;
  }

  .hero__demo::before {
    width: 520px;
    right: 50%;
    translate: 50% -40%;
  }

  .picker {
    width: 100%;
    padding: 16px;
  }

  .picker__opts {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .picker__opts button {
    flex: 1 1 auto;
    padding: 9px 12px;
    text-align: center;
    font-size: 0.95rem;
  }

  .phone {
    width: min(300px, 86vw);
  }
}

/* ---------- the phone ---------- */

.phone {
  width: 320px;
  padding: 3.6%;
  border-radius: 52px;
  background: linear-gradient(160deg, #f6f6f8, #e9e9ed);
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 0.04),
    0 2px 4px rgb(31 34 51 / 0.06),
    0 40px 70px -28px rgb(31 34 51 / 0.35);
  container-type: inline-size;
}

/* Sized in the app's own points: --u is one point of a 390pt screen */
.screen {
  --u: calc(100cqw / 390);
  position: relative;
  height: calc(var(--u) * 640);
  padding-inline: calc(var(--u) * 22);
  border-radius: calc(var(--u) * 46);
  background: #fff;
  overflow: hidden;
  color: #181818;
  font-size: calc(var(--u) * 17);
  line-height: 1.3;
}

.screen__status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--u) * 56);
  padding-inline: calc(var(--u) * 14);
  font-weight: 700;
  font-size: calc(var(--u) * 16);
}

.screen__island {
  position: absolute;
  left: 50%;
  top: calc(var(--u) * 12);
  width: calc(var(--u) * 118);
  height: calc(var(--u) * 34);
  translate: -50% 0;
  border-radius: 999px;
  background: #111;
}

.screen__bars {
  display: flex;
  align-items: flex-end;
  gap: calc(var(--u) * 2);
  height: calc(var(--u) * 12);
}

.screen__bars i {
  width: calc(var(--u) * 3.5);
  border-radius: 1px;
  background: #181818;
}

.screen__bars i:nth-child(1) { height: 35%; }
.screen__bars i:nth-child(2) { height: 55%; }
.screen__bars i:nth-child(3) { height: 78%; }
.screen__bars i:nth-child(4) { height: 100%; }

.screen__more {
  text-align: right;
  color: #333;
  font-size: calc(var(--u) * 14);
  letter-spacing: calc(var(--u) * 2);
  line-height: 1;
  margin-top: calc(var(--u) * 4);
}

.day {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(var(--u) * 10);
  margin-top: calc(var(--u) * 14);
  margin-bottom: calc(var(--u) * 10);
}

.day__name {
  color: #222;
  font-family: var(--serif);
  font-weight: 700;
  font-size: calc(var(--u) * 27);
  line-height: 1.1;
}

.day__date {
  color: var(--app-date);
  font-weight: 700;
  font-size: calc(var(--u) * 16);
}

.screen .limit {
  font-size: calc(var(--u) * 14);
  padding: calc(var(--u) * 6) calc(var(--u) * 13);
  margin-bottom: calc(var(--u) * 4);
}

.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task {
  display: flex;
  align-items: center;
  padding-block: calc(var(--u) * 5);
}

.task__check {
  position: relative;
  flex-shrink: 0;
  width: calc(var(--u) * 28);
  height: calc(var(--u) * 28);
  margin-right: calc(var(--u) * 13);
  padding: 0;
  border: calc(var(--u) * 1.5) solid var(--app-ring);
  border-radius: 50%;
  background: #fff;
  color: #fff;
  cursor: pointer;
  transition:
    background 0.22s ease,
    border-color 0.22s ease;
}

.task__check svg {
  position: absolute;
  inset: 18%;
  width: 64%;
  height: 64%;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.2s ease,
    transform 0.25s var(--ease);
}

.task__title {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--app-text);
  font-size: calc(var(--u) * 18);
  line-height: calc(var(--u) * 24);
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease;
}

/* The strike that draws across a finished chore */
.task__title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  height: calc(var(--u) * 1);
  background: #1a1a1a;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s ease-in-out;
}

.task.is-done .task__check {
  border-color: var(--green);
  background: var(--green);
}

.task.is-done .task__check svg {
  opacity: 1;
  transform: none;
}

.task.is-done .task__title {
  opacity: 0.4;
}

.task.is-done .task__title::after {
  transform: scaleX(1);
}

.screen__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: calc(var(--u) * 30);
  text-align: center;
}

.screen__empty[hidden] {
  display: none;
}

.screen__empty img {
  width: calc(var(--u) * 210);
  height: auto;
}

.screen__empty p {
  margin-top: calc(var(--u) * 14);
  color: #aaa;
  font-family: var(--serif);
  font-weight: 700;
  font-size: calc(var(--u) * 17);
  line-height: 1.35;
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  height: calc(var(--u) * 92);
  padding-top: calc(var(--u) * 8);
  border-top: 1px solid #eee;
  background: #fff;
}

.tabbar__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 3);
  height: fit-content;
  padding: calc(var(--u) * 8) calc(var(--u) * 16);
  border-radius: calc(var(--u) * 12);
  color: #9a9a9a;
  font-weight: 500;
  font-size: calc(var(--u) * 12.5);
}

.tabbar__tab svg {
  width: calc(var(--u) * 25);
  height: calc(var(--u) * 25);
}

.tabbar__tab.is-on {
  background: #f1f1f1;
  color: #222;
}

/* ---------- no more deciding: the pile that sorts itself ---------- */

.sorter {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.sorter[data-state="pile"] .sorter__sorted,
.sorter[data-state="sorted"] .sorter__pile {
  display: none;
}

.sorter__pile {
  display: flex;
  flex-direction: column;
}

.sorter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sorter__title {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
}

.sorter__count {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.sorter__heap {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 10px 6px;
  padding: 10px 0 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 10px;
  border: 1px solid #e2e4ec;
  border-radius: 999px;
  background: #fff;
  color: var(--app-text);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow:
    0 1px 2px rgb(31 34 51 / 0.06),
    0 6px 14px -8px rgb(31 34 51 / 0.18);
}

.chip::before {
  content: "";
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--app-ring);
  border-radius: 50%;
}

.chip__mins {
  color: #9a9db0;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Jitter with offsets rather than a translate, so the only transform
   is the tilt and the FLIP in main.js can carry it exactly */
.sorter__heap .chip {
  position: relative;
  left: var(--x, 0);
  top: var(--y, 0);
  transform: rotate(var(--r, 0deg));
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

/* The chores that don't make today, on their way out */
.sorter__heap .chip.is-leaving {
  opacity: 0;
  transform: rotate(var(--r, 0deg)) scale(0.85);
}

/* Today's list stays under its heading; "the other 12" sits at the foot
   of whatever room the pile left */
.sorter__sorted {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sorter__list {
  display: grid;
  gap: 14px;
  margin: 6px 0 26px;
  padding: 0;
  list-style: none;
  counter-reset: pick;
}

.sorter__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  counter-increment: pick;
}

.sorter__list li::before {
  content: counter(pick);
  width: 20px;
  color: var(--blue);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
}

.sorter__list .chip {
  border-color: #d3dcf1;
}

.sorter__rest {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 500;
}

.sorter[data-state="sorted"] .sorter__rest {
  animation: rise 0.5s 0.7s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.sorter__replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-end;
  margin-top: auto;
  padding: 8px 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    color 0.2s,
    opacity 0.3s;
}

.sorter__replay svg {
  width: 16px;
  height: 16px;
}

.sorter__replay:hover {
  color: var(--blue);
}

.sorter[data-state="pile"] .sorter__replay {
  visibility: hidden;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sorter[data-state="sorted"] .sorter__rest {
    animation: none;
  }
}

/* A tighter heap on phones, so the pile isn't much taller than the list */
@media (max-width: 640px) {
  .chip {
    gap: 7px;
    font-size: 0.84rem;
    padding: 6px 10px 6px 8px;
  }

  .chip::before {
    width: 13px;
    height: 13px;
  }

  .sorter__heap {
    gap: 4px 2px;
  }

  .sorter__list {
    gap: 12px;
  }
}

/* ---------- no judgement: the week ---------- */

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 48px;
}

.wday {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 330px;
  padding: 14px 10px;
  border-radius: 18px;
  background: var(--tint);
  transition: background 0.3s;
}

.wday.is-off {
  background: var(--warm);
}

.wday__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding-inline: 2px;
}

.wday__name {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
}

.wday__date {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.wday .limit {
  align-self: flex-start;
  background: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.wday .limit:hover {
  border-color: var(--blue);
}

.wday.is-off .limit {
  border-style: dashed;
}

.wday__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wchip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 10px;
  background: #fff;
  color: var(--app-text);
  font-weight: 500;
  font-size: 0.84rem;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgb(31 34 51 / 0.07);
}

.wchip__mins {
  flex-shrink: 0;
  color: #9a9db0;
  font-size: 0.75rem;
  font-weight: 600;
}

.wday__off {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
}

.week__hint {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 960px) {
  .week {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .wday {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 6px 12px;
    min-height: 0;
    padding: 12px;
  }

  .wday__top {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
  }

  .wday .limit {
    align-self: start;
  }

  .wday .limit {
    grid-column: 1;
    grid-row: 2;
  }

  .wday__list,
  .wday__off {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .wday__list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .wday__off {
    margin: 0;
    text-align: left;
  }
}

/* ---------- rest ---------- */

.rest__art {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  justify-self: center;
}

.rest__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.rest__art img.is-on {
  opacity: 1;
}

.section .rest__line {
  margin-top: 30px;
  color: #858585;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.35;
}

/* ---------- setup: rooms ---------- */

.rooms {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.room {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 14px;
  border: 2px solid transparent;
  border-radius: 20px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(31 34 51 / 0.05);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s var(--ease);
}

.room:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.room img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  transition:
    opacity 0.25s,
    filter 0.25s;
}

.room__name {
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}

.room__count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.room__tick {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  padding: 4px;
  border: 1.5px solid var(--app-ring);
  border-radius: 50%;
  background: #fff;
  color: #fff;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.room__tick svg {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s;
}

.room[aria-pressed="true"] {
  border-color: #cfdaf2;
}

.room[aria-pressed="true"] .room__tick {
  border-color: var(--green);
  background: var(--green);
}

.room[aria-pressed="true"] .room__tick svg {
  opacity: 1;
}

.room[aria-pressed="false"] img {
  opacity: 0.45;
  filter: saturate(0.3);
}

.rooms__total {
  margin-top: 22px;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
}

@media (max-width: 1100px) {
  .rooms {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ---------- reviews ---------- */

.reviews__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.reviews__num {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3.5rem, 2.5rem + 3vw, 5rem);
  line-height: 1;
}

.reviews__stars {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  color: var(--yellow);
}

.reviews__stars svg {
  width: 26px;
  height: 26px;
}

.reviews__sub {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 500;
}

.reviews__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 28px;
  border-radius: 22px;
  background: var(--tint);
}

.quote p {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.55;
}

.quote cite {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
  font-size: 0.88rem;
}

@media (max-width: 900px) {
  .reviews__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 820px;
  margin: 48px auto 0;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

.plan--pro {
  border: 2px solid var(--blue);
  box-shadow: var(--shadow-card);
}

.plan h3 {
  font-size: 1.6rem;
}

.plan__price {
  margin-top: 4px;
  color: var(--blue);
  font-weight: 700;
}

.plan ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.plan li {
  position: relative;
  padding-left: 32px;
  color: var(--text);
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--green)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.8 3.8L17.5 9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% no-repeat;
}

/* The trial, at the foot of the free plan */
.plan__trial {
  margin-top: auto;
  padding: 14px 16px;
  border: 1px solid #cfe9db;
  border-radius: 14px;
  background: #eef8f2;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.plan ul:has(+ .plan__trial) {
  margin-bottom: 24px;
}

.plan__trial b {
  display: block;
  color: #2f7a55;
  font-weight: 700;
}

@media (max-width: 700px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- closing ---------- */

.cta {
  padding-block: clamp(72px, 10vw, 128px) clamp(64px, 8vw, 104px);
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta__art {
  width: min(380px, 84%);
  height: auto;
  margin-block: 8px 4px;
}

.cta h2 {
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 30px;
}

.cta__note {
  margin-top: 16px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- footer ---------- */

.footer {
  padding-block: 28px;
  border-top: 1px solid var(--line);
  background: var(--tint);
  font-size: 0.92rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}

.footer__links {
  display: flex;
  gap: 22px;
  margin-right: auto;
  font-weight: 600;
}

.footer__links a {
  color: var(--text);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--blue);
}

.footer__fine {
  color: var(--muted);
}
