/* Rosfield root site. Light only: paper, ink, a little coral. */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/spacegrotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Pixel";
  src: url("../fonts/geistpixel-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallbacks, so nothing moves when the real fonts arrive */
@font-face {
  font-family: "Grotesk Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
  size-adjust: 110%;
  ascent-override: 89.5%;
  descent-override: 26.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Pixel Fallback";
  src: local("Arial"), local("Helvetica"), local("Roboto");
  size-adjust: 100%;
  ascent-override: 93%;
  descent-override: 27%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --paper: #f8f3f7;
  --ink: #0b0b0c;
  --ink-2: #2a272b;
  --muted: #5f585e;
  --faint: #7a7279;
  --line: rgba(11, 11, 12, 0.1);
  --line-2: rgba(11, 11, 12, 0.16);
  --hair: rgba(11, 11, 12, 0.5);
  --tint: rgba(11, 11, 12, 0.055);
  --stage: #f0e8ee;
  --coral: #ff5a5f;
  --mark: #ffd3d5;
  --bezel: #141316;

  --sans: "Space Grotesk", "Grotesk Fallback", ui-sans-serif, system-ui, sans-serif;
  --pixel: "Geist Pixel", "Pixel Fallback", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --gx: max(20px, env(safe-area-inset-left));
  --gx-r: max(20px, env(safe-area-inset-right));
  --max: 1240px;
}
@media (min-width: 640px) {
  :root {
    --gx: max(32px, env(safe-area-inset-left));
    --gx-r: max(32px, env(safe-area-inset-right));
  }
}
@media (min-width: 1100px) {
  :root {
    --gx: max(48px, env(safe-area-inset-left));
    --gx-r: max(48px, env(safe-area-inset-right));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection {
  background: var(--mark);
  color: var(--ink);
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: var(--gx);
  top: 8px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}
main:focus {
  outline: none;
}

/* One centred measure for every block */
.mast,
main,
.foot {
  width: 100%;
  max-width: calc(var(--max) + var(--gx) + var(--gx-r));
  margin-inline: auto;
  padding-inline: var(--gx) var(--gx-r);
}

/* Mono labels, as in the deck */
.label,
.mast nav,
.foot {
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Masthead: the lockup at the left, two quiet links at the right */
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 18px;
}
.lockup {
  display: inline-flex;
  padding: 10px 0;
  margin: -10px 0;
  color: var(--ink);
}
.lockup svg {
  display: block;
  height: 22px;
  width: auto;
}
.mast ul {
  display: flex;
  gap: 4px;
  margin: 0 -10px 0 0;
  padding: 0;
  list-style: none;
}
.mast nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.mast nav a:hover,
.mast nav a[aria-current="page"] {
  color: var(--ink);
}
@media (min-width: 640px) {
  .mast {
    padding-top: 26px;
    padding-bottom: 26px;
  }
  .lockup svg {
    height: 24px;
  }
}

main {
  flex: 1 0 auto;
  display: block;
}

/* The statement */
.intro {
  padding-top: 28px;
}
@media (min-width: 640px) {
  .intro {
    padding-top: clamp(32px, 7vh, 96px);
  }
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink-2);
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.16);
  margin-left: 3px;
}
.intro h1 {
  margin: 20px 0 0;
  max-width: 13.5em;
  font-size: clamp(40px, 4.6vw + 16px, 96px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.lede {
  margin: 18px 0 0;
  max-width: 36em;
  font-size: clamp(18px, 0.55vw + 15px, 23px);
  line-height: 1.42;
  color: var(--ink-2);
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .intro h1 {
    margin-top: 24px;
  }
  .lede {
    margin-top: 26px;
  }
}

/* Three facts */
.facts {
  list-style: none;
  margin: clamp(32px, 6vh, 64px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 44px);
}
.facts li {
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
}
.facts .label {
  display: flex;
  gap: 12px;
  margin: 0;
  color: var(--ink);
}
.facts .label span {
  color: var(--faint);
}
.facts p:not(.label) {
  margin: 10px 0 0;
  max-width: 24em;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
@media (max-width: 759px) {
  .facts {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .facts li {
    padding: 12px 0 13px;
  }
  .facts p:not(.label) {
    margin-top: 6px;
    font-size: 15.5px;
  }
}

/* The demo: a stage right under the statement */
.demo {
  margin-top: 40px;
  scroll-margin-top: 12px;
}
.stage {
  /* screen width: sized to the viewport so the whole phone fits, and the bubbles read at 15 to 17 px */
  --sw: min(calc(100vw - 44px), 372px);
  --bz: 6px;
  --pad: 16px;
  margin: 0 calc(var(--gx-r) * -1) 0 calc(var(--gx) * -1);
  padding: 22px var(--pad) 20px;
  background: var(--stage);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  row-gap: 18px;
}
.stage-head,
.stage-foot {
  justify-self: stretch;
  padding-inline: 4px;
}
.stage-head .label {
  margin: 0;
  color: var(--muted);
}
.stage-head .cap {
  margin: 8px 0 0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.stage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  color: var(--muted);
}
.stage-foot .label {
  margin: 0;
}
.steps {
  display: none;
}
@media (min-width: 640px) {
  .demo {
    margin-top: clamp(40px, 8vh, 88px);
  }
}
@media (min-width: 640px) {
  .stage {
    --sw: clamp(300px, calc((100vh - 128px) / 2.164), 392px);
    --sw: clamp(300px, calc((100svh - 128px) / 2.164), 392px);
    --bz: calc(var(--sw) * 0.024);
    --pad: clamp(24px, 2.8vw, 40px);
    margin: 0;
    padding: var(--pad);
    border-radius: 28px;
  }
}
@media (min-width: 960px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    align-items: start;
    column-gap: clamp(24px, 3vw, 48px);
    row-gap: 0;
  }
  .stage-head {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
  }
  .stage-head .cap {
    margin-top: 12px;
    max-width: 10em;
    font-size: clamp(24px, 1.2vw + 10px, 30px);
    line-height: 1.12;
    letter-spacing: -0.022em;
  }
  .phone {
    grid-column: 2;
    grid-row: 1 / 4;
  }
  .steps {
    grid-column: 3;
    grid-row: 1;
    justify-self: stretch;
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 21em;
  }
  .steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--line-2);
    color: var(--ink-2);
    transition: color 0.3s;
  }
  .steps li:last-child {
    border-bottom: 1px solid var(--line-2);
  }
  .steps .n {
    color: var(--faint);
    transition: color 0.3s;
  }
  .steps li::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--coral);
    opacity: 0;
    transform: scale(0.4);
    transition:
      opacity 0.3s,
      transform 0.3s var(--ease);
  }
  .js .steps li {
    color: var(--faint);
  }
  .js .steps li.on {
    color: var(--ink);
  }
  .js .steps li.on .n {
    color: var(--ink);
  }
  .js .steps li.on::after {
    opacity: 1;
    transform: none;
  }
  .stage-foot {
    grid-column: 1 / 4;
    grid-row: 3;
    display: contents;
  }
  .stage-foot .label {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    justify-self: start;
    padding-bottom: 14px;
  }
  .stage-foot .toggle {
    grid-column: 3;
    grid-row: 3;
    align-self: end;
    justify-self: end;
  }
}

/* The phone */
.phone {
  position: relative;
  width: calc(var(--sw) + 2 * var(--bz));
  padding: var(--bz);
  border-radius: calc(var(--sw) * 0.142 + var(--bz));
  background: var(--bezel);
  box-shadow:
    inset 0 0 0 1px #3a373b,
    inset 0 0 0 1.5px var(--bezel),
    inset 0 0 0 2.5px rgba(255, 255, 255, 0.07),
    0 1px 2px rgba(40, 18, 30, 0.1),
    0 34px 64px -34px rgba(40, 18, 30, 0.5);
}
.screen {
  position: relative;
  width: var(--sw);
  aspect-ratio: 390 / 844;
  border-radius: calc(var(--sw) * 0.142);
  overflow: hidden;
  background: #fff;
  isolation: isolate;
}
.screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}
.island {
  position: absolute;
  z-index: 2;
  top: calc(var(--sw) * 0.028);
  left: 50%;
  width: calc(var(--sw) * 0.322);
  height: calc(var(--sw) * 0.094);
  margin-left: calc(var(--sw) * -0.161);
  border-radius: 999px;
  background: #000;
}
/* The play button sits in the empty space beside the calendar card, clear of every line of text */
.play {
  position: absolute;
  z-index: 3;
  right: calc(var(--sw) * 0.06);
  bottom: calc(var(--sw) * 0.5);
  width: calc(var(--sw) * 0.15);
  height: calc(var(--sw) * 0.15);
  display: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 11, 12, 0.86);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(11, 11, 12, 0.5);
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s;
}
.js .play {
  display: grid;
}
.js .play[hidden] {
  display: none;
}
.play:hover {
  transform: scale(1.05);
  background: var(--ink);
}
.play svg {
  width: 38%;
  height: 38%;
  margin-left: 6%;
}
.play:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 4px var(--ink);
}
.toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 -2px 0 0;
  padding: 0 16px;
  appearance: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font: 400 12px/1 var(--pixel);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.js .toggle {
  display: inline-flex;
}
.toggle:hover {
  border-color: var(--hair);
  background: rgba(255, 255, 255, 0.5);
}
.toggle svg {
  width: 9px;
  height: 9px;
}
.toggle .i-play,
[data-state="off"] .toggle .i-pause {
  display: none;
}
[data-state="off"] .toggle .i-play {
  display: block;
}

/* Footer: the brand mono line */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  margin-top: clamp(56px, 10vh, 112px);
  padding-top: 10px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  color: var(--muted);
}
.foot p {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 -10px;
  padding: 0;
  list-style: none;
}
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  text-decoration: none;
  transition: color 0.2s;
}
.foot a:hover,
.foot a[aria-current="page"] {
  color: var(--ink);
}
@media (max-width: 479px) {
  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .foot p {
    min-height: 36px;
  }
}
@media (min-width: 640px) {
  .foot {
    padding-bottom: 18px;
  }
}
.demo + .foot,
main:has(.demo) + .foot {
  margin-top: clamp(40px, 8vh, 88px);
}

/* Not found */
.lost {
  padding-top: clamp(48px, 12vh, 140px);
}
.lost h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(38px, 3.6vw + 16px, 72px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.lost p {
  margin: 20px 0 0;
  max-width: 28em;
  font-size: clamp(17px, 0.5vw + 14px, 20px);
  line-height: 1.45;
  color: var(--ink-2);
}
.lost .back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 32px;
  padding: 0 22px 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}
.lost .back:hover {
  background: #2a272b;
}
.lost .back svg {
  width: 12px;
  height: 12px;
}
.lost .back:focus-visible {
  outline-offset: 3px;
}

/* Legal pages: the same grotesque, set for reading */
.legal {
  padding-top: clamp(32px, 7vh, 88px);
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-2);
  overflow-wrap: break-word;
}
.legal > * {
  max-width: 42rem;
}
@media (min-width: 640px) {
  .legal {
    font-size: 17px;
  }
}
.legal h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 2.6vw + 20px, 60px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.legal h2 {
  margin: 2.3em 0 0.55em;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  scroll-margin-top: 20px;
}
.legal h3 {
  margin: 1.8em 0 0.35em;
  font-size: 1em;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
  scroll-margin-top: 20px;
}
.legal p,
.legal ul,
.legal ol {
  margin: 0 0 0.9em;
}
.legal ul,
.legal ol {
  padding-left: 1.25em;
}
.legal li {
  margin: 0.3em 0;
}
.legal li::marker {
  color: var(--faint);
}
.legal strong {
  font-weight: 600;
  color: var(--ink);
}
.legal a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--hair);
  transition: text-decoration-color 0.2s;
}
.legal a:hover {
  text-decoration-color: var(--ink);
}
.legal code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.84em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.legal .meta {
  color: var(--muted);
  margin-bottom: 1.6em;
}
.legal .placeholder,
.legal-foot .placeholder {
  background: var(--tint);
  border-radius: 4px;
  padding: 0.04em 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.legal .note {
  margin: 1.6em 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--stage);
}
.legal .card {
  margin: 1.6em 0;
  padding: 0.1em 0 0.1em 1em;
  border-left: 2px solid var(--line-2);
}
.legal .note p,
.legal .card p {
  margin: 0;
}
.legal .toc {
  margin: 1.8em 0 0.6em;
  padding: 16px 0;
  border-block: 1px solid var(--line);
  font-size: 15.5px;
}
.legal .toc ol {
  margin: 0;
  padding-left: 1.7em;
}
.legal .toc li {
  margin: 0;
  padding: 0.15em 0;
}
.legal .toc + h2 {
  margin-top: 1.6em;
  padding-top: 0;
  border-top: 0;
}
.legal .toc li::marker {
  font-family: var(--pixel);
  font-size: 12px;
}
@media (min-width: 760px) {
  .legal .toc ol {
    columns: 2;
    column-gap: 40px;
  }
  .legal .toc li {
    break-inside: avoid;
  }
}
.legal blockquote {
  margin: 1em 0 1.2em;
  padding: 0.1em 0 0.1em 1em;
  border-left: 2px solid var(--line-2);
  color: var(--muted);
}
.legal blockquote p {
  margin: 0;
}
.legal-foot {
  margin-top: 3.2em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.legal-foot p {
  margin: 0 0 0.5em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
