/* ==========================================================================
   purringapp.com — design system
   --------------------------------------------------------------------------
   Every colour, radius, shadow and motion curve here is lifted from the app's
   own design tokens so the site and the product read as one thing:

     Purring/Design/Theme.swift      Palette, Typo, Metrics, Motion
     Purring/Design/Components.swift CozyCard, SoftButton, PillChip, ...

   Type is SF Rounded (via the system `ui-rounded` stack) on Apple devices —
   the exact face the app uses — and Nunito everywhere else, which is the
   closest widely-available rounded companion.
   ========================================================================== */

/* --- Typeface -----------------------------------------------------------
   Apple platforms get SF Rounded (via `ui-rounded`), which is literally the
   face the app uses. Everywhere else falls back to Nunito, self-hosted here
   so the site makes no third-party requests at all. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/nunito-latin-var.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 900;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext-var.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Surfaces */
  --cream: #fff9f2;
  --parchment: #fdf2e6;
  --card: #ffffff;

  /* Accents */
  --blush: #ffd9e0;
  --rose: #f2a6b8;
  --rose-deep: #b8506c;
  --lavender: #e4dcf6;
  --lilac: #b9a6e8;
  --mint: #d5f0e4;
  --sage: #8fcbb0;
  --sky: #d8e9f8;
  --periwinkle: #9dbee8;
  --butter: #ffefc9;
  --honey: #f0c878;
  --peach: #ffdcc2;
  --apricot: #f2a97a;

  /* Ink */
  --ink: #4a4358;
  --ink-soft: #8b8399;
  --ink-faint: #bdb6c9;

  /* Category tints, mirroring Palette.tint(for:) */
  --tint-reflection: var(--lilac);
  --wash-reflection: var(--lavender);
  --tint-relaxation: var(--periwinkle);
  --wash-relaxation: var(--sky);
  --tint-selfcare: var(--sage);
  --wash-selfcare: var(--mint);

  /* Time-of-day background. Default is the app's "day" gradient; site.js
     swaps in the visitor's actual time of day. */
  --sky-1: #e8f2fb;
  --sky-2: #f3eefa;
  --sky-3: #fff6ec;

  /* Metrics, from Metrics.swift */
  --screen-padding: 20px;
  --radius-card: 26px;
  --radius-chip: 14px;
  --radius-pill: 999px;

  /* Shadows, from View.cozyShadow() / softShadowSmall() */
  --shadow-cozy: 0 6px 14px rgba(74, 67, 88, 0.07);
  --shadow-small: 0 3px 6px rgba(74, 67, 88, 0.06);
  --shadow-lift: 0 22px 48px -18px rgba(74, 67, 88, 0.24);

  /* Motion, from Motion.swift — slow, soft, never snappy */
  --ease-gentle: cubic-bezier(0.37, 0, 0.63, 1);
  --ease-settle: cubic-bezier(0.22, 0.9, 0.3, 1);

  --font: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Nunito", "Segoe UI Variable Display", "Segoe UI",
    system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(58px, 7.5vw, 108px);
  --measure: 62ch;
  --max: 1160px;
}

html[data-tod="morning"] {
  --sky-1: #fff3e2;
  --sky-2: #ffe6ec;
  --sky-3: #e9e4f8;
}
html[data-tod="day"] {
  --sky-1: #e8f2fb;
  --sky-2: #f3eefa;
  --sky-3: #fff6ec;
}
html[data-tod="evening"] {
  --sky-1: #ffe9d9;
  --sky-2: #f6dfea;
  --sky-3: #e2dcf4;
}
html[data-tod="night"] {
  --sky-1: #d9d8ee;
  --sky-2: #e4ddf0;
  --sky-3: #efe6ef;
}

/* --- Reset -------------------------------------------------------------- */

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

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

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font);
  font-size: clamp(16px, 1.05vw + 13px, 17.5px);
  line-height: 1.65;
  font-weight: 450;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--rose-deep);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--blush);
  color: var(--ink);
}

/* --- Layout ------------------------------------------------------------- */

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

.wrap--narrow {
  max-width: 820px;
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.section__head {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section__head p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.06em;
}

/* --- Type --------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rose-deep);
  background: var(--blush);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
}

.h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.15rem);
  letter-spacing: -0.035em;
}

.h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.7rem);
}

.h3 {
  font-size: clamp(1.12rem, 1.6vw, 1.3rem);
  font-weight: 750;
}

.lede {
  font-size: clamp(1.06rem, 1.5vw, 1.24rem);
  color: var(--ink-soft);
  line-height: 1.6;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.9rem;
}

strong,
b {
  font-weight: 750;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.22s var(--ease-settle), box-shadow 0.22s var(--ease-settle),
    background-color 0.22s var(--ease-gentle), color 0.22s var(--ease-gentle);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.975);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #bf5a75, var(--rose-deep));
  box-shadow: 0 10px 22px -8px rgba(184, 80, 108, 0.62);
}

.btn--primary:hover {
  box-shadow: 0 14px 28px -8px rgba(184, 80, 108, 0.72);
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-small);
}

.btn--ghost:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn--small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.94rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* --- Surfaces ----------------------------------------------------------- */

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-cozy);
  padding: clamp(20px, 2.6vw, 30px);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 12px 18px;
  border-radius: 0 0 14px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 244, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(74, 67, 88, 0.07);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
  margin-right: auto;
}

.brand__icon {
  width: 38px;
  height: 38px;
  border-radius: 22.37%;
  box-shadow: 0 4px 10px rgba(74, 67, 88, 0.18);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s var(--ease-gentle);
}

.nav a:hover {
  background: rgba(74, 67, 88, 0.06);
}

.nav a[aria-current="page"] {
  background: rgba(74, 67, 88, 0.07);
}

/* Parked with the header's "Get notified" button — see README.md › "Parked: the
   launch list form". Kept so bringing the button back is a paste, not a rewrite. */
.header-cta {
  display: inline-flex;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: rgba(74, 67, 88, 0.07);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav {
    position: absolute;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: rgba(255, 250, 244, 0.98);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 30px -18px rgba(74, 67, 88, 0.3);
    display: none;
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: 14px 12px;
  }
  .nav-toggle {
    display: inline-flex;
    order: 3;
  }
  .header-cta {
    order: 2;
  }
  .header-cta .btn {
    min-height: 42px;
    padding: 0 18px;
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  .header-cta {
    display: none;
  }
}

/* --- The cat ------------------------------------------------------------
   Geometry ported from Purring/Cat/CatAnatomy.swift, colour from the six
   CatCoat definitions. Coat colours are custom properties, so a coat swap
   is a one-line change. */

.cat {
  width: 100%;
  height: auto;
  overflow: visible;
}

.coat-ginger {
  --coat-base: #f2a96b;
  --coat-shade: #de8746;
  --coat-belly: #ffe7d2;
  --coat-outline: #c9783c;
  --coat-nose: #ee9dae;
  --coat-blush: #f6a6a6;
}
.coat-grey {
  --coat-base: #aeb7c8;
  --coat-shade: #8993a8;
  --coat-belly: #edf0f6;
  --coat-outline: #76809a;
  --coat-nose: #e9a3b4;
  --coat-blush: #e3a8bc;
}
.coat-cream {
  --coat-base: #f7e3c9;
  --coat-shade: #e3c9a4;
  --coat-belly: #fff8ee;
  --coat-outline: #d3b48c;
  --coat-nose: #efa8b6;
  --coat-blush: #f3b3b0;
}
.coat-charcoal {
  --coat-base: #6e667c;
  --coat-shade: #574f66;
  --coat-belly: #9e97ae;
  --coat-outline: #4a4358;
  --coat-nose: #e39bae;
  --coat-blush: #d18ca6;
}
.coat-snow {
  --coat-base: #fcfbfe;
  --coat-shade: #e6e3f0;
  --coat-belly: #ffffff;
  --coat-outline: #b6b0cc;
  --coat-nose: #f0a2b4;
  --coat-blush: #f6bfc6;
}
.coat-cocoa {
  --coat-base: #bc8d6d;
  --coat-shade: #9d7053;
  --coat-belly: #efdcca;
  --coat-outline: #8a6146;
  --coat-nose: #e69bac;
  --coat-blush: #de9e93;
}

.cat .c-base {
  fill: var(--coat-base);
}
.cat .c-belly {
  fill: var(--coat-belly);
}
.cat .c-outline {
  stroke: var(--coat-outline);
}
.cat .c-fill-outline {
  fill: var(--coat-outline);
}
.cat .c-shade {
  stroke: var(--coat-shade);
}
.cat .c-nose {
  fill: var(--coat-nose);
}
.cat .c-blush {
  fill: var(--coat-blush);
}
.cat .c-inner-ear {
  fill: var(--coat-nose);
}

/* Motion: the app derives breathing, head bob and tail swish from a clock.
   Here they are three slow CSS loops, all derived from the same 4.6s breath. */
.cat__body-group {
  transform-origin: 500px 985px;
  animation: cat-breathe 5.2s var(--ease-gentle) infinite;
}

.cat__head {
  animation: cat-bob 5.2s var(--ease-gentle) infinite;
}

.cat__tail {
  transform-box: view-box;
  transform-origin: 745px 895px;
  animation: cat-tail 6.4s var(--ease-gentle) infinite;
}

.cat__shadow {
  transform-origin: 500px 915px;
  animation: cat-shadow 5.2s var(--ease-gentle) infinite;
}

.cat__whiskers {
  animation: cat-whisker 7.3s var(--ease-gentle) infinite;
}

@keyframes cat-breathe {
  0%,
  100% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1.012, 1.022);
  }
}

@keyframes cat-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes cat-tail {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(7deg);
  }
}

@keyframes cat-shadow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.045);
    opacity: 0.13;
  }
}

@keyframes cat-whisker {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat__body-group,
  .cat__head,
  .cat__tail,
  .cat__shadow,
  .cat__whiskers {
    animation: none !important;
  }
}

/* --- Lists -------------------------------------------------------------- */

.task-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.task-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.93rem;
  color: var(--ink);
  font-weight: 550;
}
.task-list li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--tint);
}

/* --- FAQ ---------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 10px;
  max-width: 780px;
  margin-inline: auto;
}

.faq details {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-cozy);
  padding: 4px 4px;
  overflow: hidden;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  font-weight: 750;
  font-size: 1.01rem;
  cursor: pointer;
  list-style: none;
  letter-spacing: -0.01em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2.5px solid var(--ink-faint);
  border-bottom: 2.5px solid var(--ink-faint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.28s var(--ease-settle);
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq .faq__answer {
  padding: 0 20px 20px;
  color: var(--ink-soft);
  max-width: 66ch;
}

.faq .faq__answer a {
  font-weight: 700;
}

/* --- Waitlist (parked) --------------------------------------------------
   The launch list form is off the home page for now, so none of this applies to
   anything. It is left in place — along with the handler in site.js — because
   the only copy of the form's markup lives in README.md › "Parked: the launch
   list form", and a paste is cheaper than a rewrite. */

.waitlist {
  margin: 30px auto 0;
  max-width: 520px;
}

.waitlist__row {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-cozy);
}

.waitlist input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  border-radius: var(--radius-pill);
}

.waitlist input[type="email"]::placeholder {
  color: var(--ink-faint);
  font-weight: 550;
}

.waitlist input[type="email"]:focus {
  outline: none;
}

.waitlist__row:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lilac) 55%, transparent),
    var(--shadow-cozy);
}

.waitlist .btn {
  min-height: 46px;
  padding: 0 24px;
}

.waitlist__note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.waitlist__status {
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  min-height: 1.4em;
}

.waitlist__status[data-state="ok"] {
  color: #2f7d5c;
}

.waitlist__status[data-state="error"] {
  color: var(--rose-deep);
}

@media (max-width: 520px) {
  .waitlist__row {
    flex-direction: column;
    border-radius: 26px;
    padding: 10px;
  }
  .waitlist input[type="email"] {
    padding: 14px 14px;
    background: rgba(74, 67, 88, 0.05);
    border-radius: 20px;
    text-align: center;
  }
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  margin-top: auto;
  background: var(--parchment);
  border-top: 1px solid rgba(74, 67, 88, 0.07);
  padding-block: clamp(40px, 5vw, 64px) 32px;
}

/* Short pages (404, mostly) still push the footer to the bottom. */
main {
  flex: 1 0 auto;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__brand {
  max-width: 26rem;
}

.footer__brand p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer__col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 800;
  margin-bottom: 14px;
}

.footer__col li + li {
  margin-top: 9px;
}

.footer__col a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.footer__col a:hover {
  color: var(--rose-deep);
}

.footer__bottom {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(74, 67, 88, 0.09);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer__disclaimer {
  margin-top: 18px;
  font-size: 0.83rem;
  color: var(--ink-soft);
  max-width: 72ch;
}

/* --- Legal / long-form pages ------------------------------------------- */

.page-head {
  padding-block: clamp(48px, 6vw, 80px) clamp(20px, 3vw, 34px);
}

.page-head .h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  margin-top: 16px;
}

.prose {
  max-width: 74ch;
  padding-bottom: clamp(48px, 6vw, 90px);
}

.prose h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  margin-top: 2.4em;
  margin-bottom: 0.5em;
}

.prose h3 {
  font-size: 1.08rem;
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}

.prose p,
.prose ul {
  margin-top: 0.85em;
  color: color-mix(in srgb, var(--ink-soft) 62%, var(--ink));
}

.prose ul {
  list-style: none;
  display: grid;
  gap: 0.6em;
}

.prose ul li {
  position: relative;
  padding-left: 22px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
}

.prose .callout {
  margin-top: 1.6em;
  padding: 18px 22px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--butter) 45%, #fff);
  box-shadow: var(--shadow-cozy);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
}

.prose .updated {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
}

/* --- Reveal on scroll --------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s var(--ease-settle), transform 0.75s var(--ease-settle);
}

.js .reveal[data-delay="1"].is-in {
  transition-delay: 0.08s;
}
.js .reveal[data-delay="2"].is-in {
  transition-delay: 0.16s;
}
.js .reveal[data-delay="3"].is-in {
  transition-delay: 0.24s;
}

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

/* --- Utilities ---------------------------------------------------------- */

.stack > * + * {
  margin-top: var(--stack, 16px);
}

.center {
  text-align: center;
}

.mt-24 {
  margin-top: 24px;
}
.mt-32 {
  margin-top: 32px;
}

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

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

.notfound {
  text-align: center;
  padding-block: clamp(40px, 8vw, 90px);
}

.notfound .cat {
  width: min(260px, 60vw);
  margin: 0 auto 10px;
}

/* ==========================================================================
   Single-screen landing (index.html)
   --------------------------------------------------------------------------
   The home page is one fixed-height screen: nothing to scroll, nothing to
   skim, and no footer. Type and spacing are clamped against the viewport
   height as well as its width, so the same screen fits a laptop, a phone and a
   phone on its side without ever pushing content out of view.
   ========================================================================== */

body.screen {
  /* Notches, rounded corners and the home indicator. `viewport-fit=cover` in
     index.html is what makes these non-zero on a phone. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(
      58% 60% at 18% 12%,
      color-mix(in srgb, var(--blush) 78%, transparent) 0%,
      transparent 70%
    ),
    radial-gradient(
      50% 58% at 86% 26%,
      color-mix(in srgb, var(--lavender) 80%, transparent) 0%,
      transparent 72%
    ),
    linear-gradient(168deg, var(--sky-1), var(--sky-2) 46%, var(--sky-3));
}

.screen__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding-top: calc(clamp(12px, 2.4vh, 22px) + var(--safe-top));
  padding-inline: calc(var(--gutter) + var(--safe-left))
    calc(var(--gutter) + var(--safe-right));
}

.screen__links {
  display: flex;
  gap: 2px;
}

/* A comfortable 44px touch target, as the app's own controls use. The colour is
   darker than --ink-soft so the links clear 4.5:1 on the gradient behind them. */
.screen__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  color: color-mix(in srgb, var(--ink) 72%, var(--ink-soft));
  font-size: 0.86rem;
  font-weight: 650;
  transition: background-color 0.2s var(--ease-gentle), color 0.2s var(--ease-gentle);
}

.screen__links a:hover {
  color: var(--ink);
  background: rgba(74, 67, 88, 0.06);
}

.screen__main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding-top: clamp(12px, 3vh, 34px);
  padding-inline: calc(var(--gutter) + var(--safe-right))
    calc(var(--gutter) + var(--safe-left));
  padding-bottom: calc(clamp(20px, 5vh, 54px) + var(--safe-bottom));
}

.screen__inner {
  width: 100%;
  min-width: 0;
  max-width: var(--max);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* Not `stretch`: the copy is capped at 34rem, and a stretched grid item that
     hits its max-width is pinned to the inline start rather than centred, which
     leaves the text sitting left of the centred icon on tablet-width screens. */
  justify-items: center;
  gap: clamp(16px, 4.5vh, 46px);
  text-align: center;
}

.screen__copy {
  width: 100%;
  min-width: 0;
  max-width: 34rem;
}

.screen .h1 {
  margin-top: clamp(10px, 2vh, 20px);
  font-size: clamp(1.85rem, min(6.4vw, 8.4vh), 3.5rem);
}

.screen .lede {
  margin-top: clamp(10px, 2vh, 20px);
  font-size: clamp(1rem, min(2.2vw, 2.5vh), 1.2rem);
}

.screen .waitlist {
  min-width: 0;
  margin-top: clamp(18px, 4vh, 32px);
}

.screen .waitlist__note {
  margin-top: clamp(10px, 2vh, 16px);
  color: color-mix(in srgb, var(--ink) 70%, var(--ink-soft));
}

.screen .waitlist input[type="email"]::placeholder {
  color: var(--ink-soft);
}

/* The app icon is the main visual. It is a squircle in the same shape as the
   icon on a home screen, and it is sized against the viewport height so it can
   never push the copy off the bottom. */
.screen__icon {
  display: none;
  justify-self: center;
  width: min(34vw, 180px, 18vh);
  height: auto;
  border-radius: 22.37%;
  box-shadow: var(--shadow-lift);
}

/* On a tall phone or tablet it sits above the copy, small. */
@media (max-width: 939px) {
  .screen__inner {
    gap: clamp(14px, 3.2vh, 32px);
  }
}

@media (max-width: 939px) and (min-height: 600px) {
  .screen__icon {
    display: block;
    order: -1;
  }
}

/* On a wide screen with height to spare it moves beside the copy, bigger. */
@media (min-width: 940px) and (min-height: 620px) {
  .screen__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    justify-items: stretch;
    text-align: left;
  }
  .screen__icon {
    display: block;
    order: 0;
    width: min(100%, 320px, 44vh);
  }
}

/* Narrow screens keep the form on one line: on a short window, a stacked input
   and button is the thing most likely to tip the screen into scrolling. */
@media (max-width: 520px) {
  .screen .waitlist {
    max-width: 27rem;
  }
  .screen .waitlist__row {
    flex-direction: row;
    min-width: 0;
    padding: 6px;
  }
  .screen .waitlist input[type="email"] {
    padding: 12px 14px;
    background: transparent;
    border-radius: var(--radius-pill);
    text-align: left;
  }
  .screen .waitlist .btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 0.94rem;
  }
}

/* Very narrow phones: the three links shrink, and wrap under the brand if they
   still do not fit. The form tightens so the placeholder stays readable. */
@media (max-width: 420px) {
  .screen__links {
    margin-left: auto;
  }
  .screen__links a {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
  .screen .waitlist__row {
    gap: 6px;
  }
  .screen .waitlist input[type="email"] {
    padding: 12px 10px;
  }
  .screen .waitlist .btn {
    padding: 0 13px;
    font-size: 0.9rem;
  }
}

/* Landscape phones and other short windows: compress rather than clip. */
@media (max-height: 560px) {
  .screen__bar {
    padding-top: calc(10px + var(--safe-top));
  }
  .screen__main {
    padding-top: 8px;
    padding-bottom: calc(14px + var(--safe-bottom));
  }
  .screen__inner {
    gap: 10px;
  }
  .screen .eyebrow {
    padding: 5px 12px;
    font-size: 11px;
  }
  .screen .h1 {
    margin-top: 8px;
    font-size: clamp(1.5rem, min(4.6vw, 6.6vh), 2.2rem);
  }
  .screen .lede {
    margin-top: 8px;
    font-size: 0.95rem;
  }
  .screen .waitlist {
    margin-top: 12px;
  }
  .screen .waitlist__note {
    margin-top: 8px;
    font-size: 0.8rem;
  }
  .screen .waitlist__status {
    margin-top: 6px;
  }
}

/* Last resort: if even the compressed screen cannot fit, let the page scroll
   rather than hide part of the message from the visitor. */
@media (max-height: 360px) {
  body.screen {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
}
