/* cabbit.online: the app's world on the web (DESIGN.md). Cream ground, coral
   for the one action, plum for depth, Fraunces headlines, DM Sans body. */
:root {
  --cream: #fbf3e7;
  --surface: #fffdf9;
  --sand: #f2e6d6;
  --line: #eadfcb;
  --ink: #241f21;
  --muted: #5e5458;
  --coral: #c4412f;
  --coral-deep: #a63626;
  --plum: #4a2545;
  --plum-soft: #efe4ee;
  --on-plum: #f6ecf3;
  --on-plum-muted: #d9c6d5;
  --moss: #3f6b43;
  --amber: #e9a23b;
  --radius: 24px;
  --radius-sm: 14px;
  --wrap: 1120px;
  --narrow: 720px;
  --gutter: clamp(20px, 5vw, 40px);
  --display: "Fraunces", ui-serif, Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--plum); color: var(--on-plum); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.75rem, 1.6rem + 5vw, 5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--plum); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { color: var(--coral-deep); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--plum);
  color: var(--on-plum);
  padding: 10px 16px;
  border-radius: 10px;
}
.skip:focus { top: 12px; }
.skip:hover { color: #fff; }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 600 1.35rem/1 var(--display);
  letter-spacing: -0.02em;
}
.brand .mark { width: 34px; height: 34px; }
.brand-small { font-size: 1.15rem; }
.brand-small .mark { width: 28px; height: 28px; }
.site-header nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.site-header nav a:hover { color: var(--coral-deep); }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--coral); }
.site-header nav .nav-cta {
  border: 1.5px solid var(--plum);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--plum);
}
.site-header nav .nav-cta:hover { background: var(--plum); color: var(--on-plum); }
@media (max-width: 420px) { .site-header nav a:not(.nav-cta) { display: none; } }

/* ------------------------------------------------------------ buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font: 600 1.1rem/1 var(--body);
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgb(164 54 38 / 0.7), 0 2px 4px rgb(36 31 33 / 0.08);
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.button:hover { background: var(--coral-deep); color: #fff; transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.quiet-link { font-weight: 600; color: var(--plum); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

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

.hero { padding-bottom: clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; gap: 28px; }
.hero-scene {
  margin-inline: calc(-1 * var(--gutter));
  aspect-ratio: 800 / 420;
  max-height: 54svh;
  min-height: 220px;
  overflow: hidden;
  background: linear-gradient(#e3eef5, #fbebcb);
}
.scene { display: block; width: 100%; height: 100%; }
.hero-copy { display: grid; gap: 20px; align-content: start; }
.lede { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem); line-height: 1.5; color: var(--muted); max-width: 34ch; }
.facts { font-size: 0.95rem; color: var(--muted); font-weight: 600; }

@media (min-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; }
  .hero-copy { order: -1; gap: 24px; }
  .hero-scene {
    margin-inline: 0;
    aspect-ratio: 800 / 560;
    max-height: none;
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -36px rgb(74 37 69 / 0.55);
  }
}

/* ------------------------------------------------------------ film */

/* The launch video: a poster with a play button until pressed. Vertical on
   phones, landscape on wider screens. */
.film { padding-block: clamp(8px, 2vw, 24px) clamp(48px, 7vw, 88px); }
.film-inner { display: grid; gap: clamp(20px, 3vw, 32px); justify-items: center; }
.film h2 { text-align: center; }
.film-frame {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 34px 60px -36px rgb(74 37 69 / 0.6), 0 2px 6px rgb(36 31 33 / 0.1);
}
.film-frame img, .film-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-frame video { background: var(--ink); object-fit: contain; }
.film-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  background: rgb(36 31 33 / 0.12);
}
.film-play svg {
  width: 84px;
  height: 84px;
  padding: 22px 20px 22px 26px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgb(164 54 38 / 0.8);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.film-play > span {
  padding: 8px 16px 9px;
  border-radius: 999px;
  background: rgb(36 31 33 / 0.78);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-align: center;
}
.film-length { display: block; font-weight: 400; font-size: 0.85rem; color: #e9e1e4; }
.film-play:hover svg { background: var(--coral-deep); transform: scale(1.06); }
.film-play:hover { color: #fff; }
.film-play:focus-visible { outline-offset: -6px; outline-color: #fff; }
.film-transcript { width: min(100%, var(--narrow)); }
.film-transcript summary { cursor: pointer; font-weight: 600; color: var(--plum); text-align: center; list-style: none; }
.film-transcript summary::-webkit-details-marker { display: none; }
.film-transcript[open] summary { margin-bottom: 12px; }
.film-transcript p { color: var(--muted); max-width: 62ch; margin-inline: auto; }
.film-transcript p + p { margin-top: 6px; }

@media (min-width: 700px) {
  .film-frame { width: min(100%, 960px); aspect-ratio: 16 / 9; }
  .film-frame.is-vertical { width: min(100%, 340px); aspect-ratio: 9 / 16; }
}

/* ------------------------------------------------------------ journey */

/* The app's own screens, one per stop of the trip. A row that swipes on phones
   (with a peek of the next screen) and lies flat on wide screens. The dashed
   road from the old steps still joins the stops. */
.journey { padding-block: clamp(48px, 8vw, 104px); background: var(--surface); border-block: 1px solid var(--line); }
.journey-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.journey h2 { max-width: 18ch; }

.slide-controls { display: flex; align-items: center; gap: 10px; }
.slide-controls[hidden] { display: none; }
.slide-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1.5px solid var(--plum);
  border-radius: 50%;
  background: transparent;
  color: var(--plum);
  cursor: pointer;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-button svg { width: 22px; height: 22px; }
.slide-button:hover:not(:disabled) { background: var(--plum); color: var(--on-plum); }
.slide-button:disabled { border-color: var(--line); color: color-mix(in srgb, var(--muted) 55%, transparent); cursor: default; }
.slide-status { min-width: 4.5ch; text-align: center; font-weight: 600; font-size: 0.95rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.slides {
  --slide: 248px;
  --slide-gap: 28px;
  --edge: max(var(--gutter), (100% - var(--wrap)) / 2);
  list-style: none;
  margin: 0;
  padding: 6px var(--edge) 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--slide);
  gap: var(--slide-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline-offset: -3px; border-radius: var(--radius-sm); }
.slide { scroll-snap-align: start; }
.slide figure { margin: 0; display: grid; gap: 24px; }

.phone {
  padding: 7px;
  border-radius: 32px;
  background: var(--ink);
  box-shadow: 0 30px 50px -32px rgb(74 37 69 / 0.65), 0 2px 6px rgb(36 31 33 / 0.12);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 25px; background: var(--cream); }

.slide figcaption { position: relative; display: grid; gap: 6px; padding-top: 52px; }
.stop {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plum);
  color: var(--on-plum);
  font: 600 1rem/1 var(--body);
}
.slide:last-child .stop { background: var(--coral); color: #fff; }
/* The road to the next stop. */
.slide figcaption::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 44px;
  right: calc(8px - var(--slide-gap));
  border-top: 2px dashed color-mix(in srgb, var(--plum) 35%, transparent);
}
.slide:last-child figcaption::before { display: none; }
.slide h3 { font-size: 1.25rem; }
.slide p { color: var(--muted); font-size: 1rem; line-height: 1.5; }


/* ------------------------------------------------------------ safety */

.safety { background: var(--plum); color: var(--on-plum); padding-block: clamp(56px, 9vw, 112px); }
.safety h2 { color: #fff; max-width: 14ch; }
.safety-grid { display: grid; gap: 36px; }
.safety-lede { margin-top: 16px; color: var(--on-plum-muted); font-size: 1.15rem; max-width: 36ch; }
.light-link { display: inline-block; margin-top: 20px; color: #fff; font-weight: 600; }
.light-link:hover { color: var(--amber); }
.safety :focus-visible { outline-color: var(--amber); }
.safety-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.safety-list li { padding: 18px 0; border-top: 1px solid rgb(246 236 243 / 0.18); color: var(--on-plum-muted); }
.safety-list li:last-child { border-bottom: 1px solid rgb(246 236 243 / 0.18); }
.safety-list strong { display: block; color: #fff; font-size: 1.1rem; margin-bottom: 2px; }
@media (min-width: 900px) {
  .safety-grid { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
  .safety-list { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .safety-list li:nth-last-child(2) { border-bottom: 1px solid rgb(246 236 243 / 0.18); }
}

/* ------------------------------------------------------------ not / faq / closing */

.not { padding-block: clamp(56px, 9vw, 104px) clamp(24px, 4vw, 40px); }
.not h2 { margin-bottom: 16px; }
.not p { font-size: 1.2rem; line-height: 1.55; color: var(--ink); }

.faq { padding-block: clamp(32px, 5vw, 56px) clamp(56px, 9vw, 104px); }
.faq h2 { margin-bottom: 20px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 1.2rem; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--plum);
  border-bottom: 2px solid var(--plum);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }

.closing { padding-block: clamp(56px, 9vw, 104px); background: var(--sand); }
.closing-inner { display: grid; gap: 24px; justify-items: start; }
.closing h2 { max-width: 16ch; }

/* ------------------------------------------------------------ article */

.article { padding-block: clamp(32px, 6vw, 72px) clamp(56px, 9vw, 104px); }
.crumbs { font-size: 0.95rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.article h1 { font-size: clamp(2.3rem, 1.6rem + 3.2vw, 3.6rem); margin-bottom: 20px; }
.article .lede { max-width: none; margin-bottom: 12px; }
.article h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); margin: clamp(40px, 6vw, 64px) 0 14px; }
.article p, .article li { max-width: 68ch; }
.article p + p { margin-top: 14px; }
.article ul { padding-left: 1.2em; margin: 14px 0 0; display: grid; gap: 12px; }
.article li::marker { color: var(--coral); }
.article-cta { margin-top: clamp(40px, 6vw, 64px); }

/* ------------------------------------------------------------ 404 */

.lost { padding-block: clamp(32px, 6vw, 72px); }
.lost .narrow { display: grid; gap: 18px; }
.lost-scene { border-radius: var(--radius); overflow: hidden; aspect-ratio: 800 / 360; margin-bottom: 12px; }

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

.site-footer { background: var(--ink); color: #d8cfd3; padding-block: 48px; font-size: 0.98rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--amber); }
.site-footer :focus-visible { outline-color: var(--amber); }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; gap: 28px; }
.footer-grid > div p { margin-top: 10px; max-width: 30ch; }
.site-footer nav { display: grid; gap: 10px; align-content: start; }
.footer-note { color: #b9adb2; line-height: 1.7; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; gap: 48px; } }
