/* The app's design language, for the web.
 *
 * Every colour is a pair taken from App/Shared/Design/Palette.swift: Linen by day (oat ground,
 * charcoal ink), Ember by night (warm brown-black ground, ivory ink, honey light). Nothing is pure
 * white, pure black or blue. Type follows App/Shared/Design/Typography.swift: a serif for headings
 * and figures with its italic for the one word that carries the feeling, a quiet sans for reading,
 * and a small, widely tracked monospace for labels.
 */

/* Optional rather than swap: the fonts are preloaded, so they are almost always ready for the
 * first paint, and when one is not (a slow first visit) the page keeps the fallback rather than
 * reflowing under the reader when the font lands. Nothing on the page ever moves. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: optional;
  src: url("/fonts/newsreader-roman.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: optional;
  src: url("/fonts/newsreader-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: optional;
  src: url("/fonts/inter.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  /* Each pair is Linen (light) then Ember (dark) from Palette. light-dark() follows the page's
   * color-scheme: the visitor's system setting, or the choice made with the theme switch. */
  --ground-top: light-dark(#e9e6e1, #1e1814);
  --ground-mid: light-dark(#e7e2dc, #130f0d);
  --ground-bottom: light-dark(#efe3d4, #0e0b0a);
  --background: light-dark(#e8e5df, #100d0b);
  --surface: light-dark(#f0ede8, #1b1613);
  --surface-raised: light-dark(#d9d4ce, #2c2521);
  --ink: light-dark(#2a2724, #eee5d9);
  --text-secondary: light-dark(rgb(42 39 36 / 0.82), rgb(238 229 217 / 0.66));
  --text-tertiary: light-dark(rgb(42 39 36 / 0.72), rgb(238 229 217 / 0.54));
  --accent: light-dark(#2a2724, #eee5d9);
  --on-accent: light-dark(#f4f0ea, #1a1512);
  --honey: light-dark(#74563c, #d8a86e);
  --heart: light-dark(#904741, #e08376);
  --hairline: light-dark(rgb(42 39 36 / 0.08), rgb(238 229 217 / 0.08));
  --outline: light-dark(rgb(42 39 36 / 0.22), rgb(238 229 217 / 0.22));

  /* The stone: Ramp.pearl, Ramp.light(1) and resonanceHighlight(1) by day; Ramp.dark(1) and
   * resonanceHighlight(1) at night, the app icon's disc. */
  --pearl: #f6f1ea;
  --stone-tint: light-dark(#b27634, #ffc67d);
  --stone-highlight: light-dark(#d8ba98, #fcd5a3);
  --stone-shadow: light-dark(rgb(110 92 76 / 0.32), rgb(0 0 0 / 0.32));
  --on-stone: #2a2724;

  /* The rooms the app is shown in: a warm band, and the lit stage each screen stands on. */
  --band: light-dark(#eadfd1, #1b1511);
  --stage-light: light-dark(#f4efe8, #33281f);
  --stage-ground: light-dark(#ddd6cd, #141009);
  --device-shadow: light-dark(rgb(74 56 40 / 0.34), rgb(0 0 0 / 0.6));

  --font-serif: "Newsreader", "New York", ui-serif, Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* TypeScale.labelTracking (1.8pt) over TypeScale.label (10.5pt). */
  --label-tracking: 0.17em;

  /* Radius: cards 28, tiles 22, everything pressable a pill. The stage is a room, so larger. */
  --radius-card: 28px;
  --radius-tile: 22px;
  --radius-stage: clamp(28px, 3.4vw, 44px);

  /* One breath at the app's default pace: 5.5 per minute, Gentle ratio (4 in : 6 out). */
  --breath: 10.909s;

  --measure: 36rem;
  --page: 76rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

/* A choice made with the theme switch (theme.js) overrides the system setting. */
:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

/* Ground */

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

html {
  background: var(--background);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(var(--ground-top), var(--ground-mid) 50%, var(--ground-bottom));
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 360;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--outline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.4s ease;
}

a:hover {
  text-decoration-color: currentColor;
}

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

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

/* Type */

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 330;
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

h1 em,
h2 em,
h3 em,
.figure em {
  font-style: italic;
  font-weight: 370;
}

h1 {
  font-size: clamp(2.75rem, 6.6vw, 5.4rem);
}

h2 {
  font-size: clamp(2.2rem, 4.8vw, 3.7rem);
}

h3 {
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  line-height: 1.2;
}

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

.lede {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: var(--measure);
}

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0;
}

.label--honey {
  color: var(--honey);
}

.prose {
  max-width: var(--measure);
  color: var(--text-secondary);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose strong {
  color: var(--ink);
  font-weight: 500;
}

/* Header and footer */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 380;
  text-decoration: none;
}

.wordmark img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 2vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  text-decoration-line: underline;
  text-decoration-color: var(--honey);
}

/* The theme switch: a sun by day, a moon at night. Hidden until theme.js wires it up. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 0.2rem;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--outline);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.theme-toggle[aria-pressed="true"] .sun,
.theme-toggle[aria-pressed="false"] .moon {
  display: none;
}

/* On a phone the header holds the wordmark, two links and the theme switch, so it tightens, and
 * on the narrowest screens the wordmark is the icon alone. */
@media (max-width: 29.99rem) {
  .site-nav .wide-only {
    display: none;
  }

  .site-header .wrap {
    gap: 0.5rem;
  }

  .wordmark {
    gap: 0.55rem;
    font-size: 1.25rem;
  }

  .site-nav a {
    padding-inline: 0.3rem;
  }

  .theme-toggle {
    margin-left: 0;
  }
}

@media (max-width: 23.4rem) {
  .wordmark span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(4rem, 10vw, 8rem);
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem clamp(7rem, 20vw, 15rem);
}

/* The name, set large and faint along the foot of every page. Drawn as generated content so it
 * stays decoration: it is not read aloud and takes no part in the page's text. */
.site-footer::after {
  content: "Herz";
  position: absolute;
  left: 50%;
  bottom: -0.24em;
  translate: -50% 0;
  font-family: var(--font-serif);
  font-size: clamp(5rem, 21vw, 19rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: color-mix(in srgb, var(--ink) 6%, transparent);
  pointer-events: none;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 48rem) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

/* Devices.
 *
 * Drawn in CSS around the real screenshots: an iPhone 17 Pro Max (screen 440 × 956 pt, corner
 * radius about 12.5% of its width, the Dynamic Island 126 × 37 pt, 11 pt from the top) and an
 * Apple Watch. Every size is a fraction of --w, so a device scales as one object. */

.phone {
  --w: 18rem;
  position: relative;
  flex: none;
  width: var(--w);
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.155);
  background: linear-gradient(150deg, #4a423c, #1c1816 22%, #0f0d0c 60%, #3a332e);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.1),
    0 0 0 1px rgb(20 14 10 / 0.5),
    0 calc(var(--w) * 0.12) calc(var(--w) * 0.24) calc(var(--w) * -0.1) var(--device-shadow),
    0 calc(var(--w) * 0.04) calc(var(--w) * 0.08) calc(var(--w) * -0.04) var(--device-shadow);
}

.phone__screen,
.watch__screen {
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  background: var(--background);
}

.phone__screen {
  aspect-ratio: 1320 / 2868;
  border-radius: calc(var(--w) * 0.125);
}

.phone__screen::after {
  content: "";
  position: absolute;
  top: 2.5cqw;
  left: 50%;
  width: 28.6cqw;
  height: 8.4cqw;
  translate: -50% 0;
  border-radius: 999px;
  background: #000;
}

.phone__screen img,
.watch__screen img {
  width: 100%;
  height: 100%;
}

.watch {
  --w: 12rem;
  position: relative;
  flex: none;
  width: var(--w);
  padding: calc(var(--w) * 0.065);
  border-radius: calc(var(--w) * 0.28);
  background: linear-gradient(150deg, #5a514a, #1c1816 26%, #0f0d0c 62%, #403832);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.12),
    0 calc(var(--w) * 0.12) calc(var(--w) * 0.24) calc(var(--w) * -0.08) var(--device-shadow);
}

/* The Digital Crown and the side button. */
.watch::before,
.watch::after {
  content: "";
  position: absolute;
  left: 100%;
  border-radius: 0 calc(var(--w) * 0.025) calc(var(--w) * 0.025) 0;
  background: linear-gradient(90deg, #2a2420, #6b625a 55%, #2f2925);
}

.watch::before {
  top: 24%;
  width: calc(var(--w) * 0.055);
  height: calc(var(--w) * 0.19);
}

.watch::after {
  top: 52%;
  width: calc(var(--w) * 0.025);
  height: calc(var(--w) * 0.24);
}

.watch__screen {
  aspect-ratio: 416 / 496;
  border-radius: calc(var(--w) * 0.2);
  background: #100d0b;
}

/* A stage: the softly lit room a screen stands in. */

.stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  container-type: inline-size;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem);
  border-radius: var(--radius-stage);
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, var(--stage-light), transparent),
    linear-gradient(var(--surface), var(--stage-ground));
}

/* Sections */

.section {
  padding-block: clamp(4.5rem, 11vw, 9rem);
}

.section-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 46rem;
}

/* Hero */

.hero {
  padding-block: clamp(1rem, 4vw, 3rem) clamp(4rem, 9vw, 7rem);
}

.hero .wrap {
  display: grid;
  gap: clamp(3rem, 7vw, 4rem);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1.6rem;
  justify-items: start;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.hero .phone {
  --w: clamp(15.5rem, 66vw, 21.5rem);
}

/* The light the stone throws into the room, breathing with it behind the phone. */
.hero-visual::before {
  content: "";
  position: absolute;
  top: 42%;
  left: 50%;
  width: calc(var(--glow, 34rem));
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    var(--stone-highlight),
    color-mix(in srgb, var(--stone-highlight) 30%, transparent) 55%,
    transparent
  );
  animation: glow var(--breath) infinite;
}

@media (min-width: 56rem) {
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .hero-visual {
    --glow: 44rem;
  }
}

.listing {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.listing img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 6px 18px var(--stone-shadow);
}

.listing p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.listing strong {
  display: block;
  font-weight: 450;
  color: var(--ink);
}

/* An outlined, dashed pill: the app's mark for a choice that is not available yet. */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1px dashed var(--outline);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* The breathing stone. A CSS echo of BreathingOrb: light thrown into the room, a contact
 * shadow, the pearl body lit from the upper left, and a specular highlight. It never shrinks
 * below 62% (minimumScale), and with reduced motion it rests part-filled. Only transform and
 * opacity move, so it runs on the compositor.
 *
 * In the hero it is laid over the session screenshot, exactly on the app's own stone, which was
 * captured at the end of an out-breath and so at the same 62% the CSS stone starts from. */

.orb {
  --size: clamp(8rem, 26vw, 11rem);
  position: relative;
  width: var(--size);
  height: var(--size);
}

.orb > * {
  position: absolute;
  inset: 0;
}

.phone .orb {
  --size: 51.5cqw;
  position: absolute;
  left: 50%;
  top: 38.8%;
  translate: -50% -50%;
}

.orb__glow {
  inset: -45%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--stone-highlight) 80%, transparent) 22%,
    color-mix(in srgb, var(--stone-highlight) 22%, transparent) 62%,
    transparent 100%
  );
  animation: glow var(--breath) infinite;
}

.orb__shadow {
  inset: auto 14% -10%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--stone-shadow), transparent);
  animation: settle var(--breath) infinite;
}

.orb__stone {
  border-radius: 50% 49% 51% 50% / 49% 51% 49% 51%;
  background:
    linear-gradient(140deg, transparent 38%, rgb(42 39 36 / 0.2) 100%),
    radial-gradient(
      circle at 40% 34%,
      var(--pearl) 0,
      color-mix(in srgb, var(--pearl) 90%, transparent) 18%,
      var(--stone-highlight) 46%,
      color-mix(in srgb, var(--stone-tint) 60%, var(--stone-highlight)) 74%
    );
  box-shadow: inset 1px 1px 0 rgb(246 241 234 / 0.7);
  animation: breathe var(--breath) infinite;
}

.orb__stone::after {
  content: "";
  position: absolute;
  left: 20%;
  top: 19%;
  width: 26%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(246 241 234 / 0.85), transparent);
  transform: rotate(-28deg);
}

.orb__prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre;
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  font-weight: 330;
  color: var(--on-stone);
  opacity: 0;
}

.phone .orb__prompt {
  font-size: 5.4cqw;
}

.orb__prompt em {
  font-family: var(--font-serif);
  font-size: 1.06em;
  font-weight: 420;
}

.orb__prompt--in {
  animation: prompt-in var(--breath) infinite;
}

.orb__prompt--out {
  animation: prompt-out var(--breath) infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.62);
    animation-timing-function: ease-in-out;
  }
  40% {
    transform: scale(1);
    animation-timing-function: ease-in-out;
  }
}

@keyframes glow {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.3;
    animation-timing-function: ease-in-out;
  }
  40% {
    transform: scale(1);
    opacity: 1;
    animation-timing-function: ease-in-out;
  }
}

@keyframes settle {
  0%,
  100% {
    transform: translateY(-38%) scale(0.62, 0.56);
    opacity: 0.9;
    animation-timing-function: ease-in-out;
  }
  40% {
    transform: translateY(0) scale(1, 0.9);
    opacity: 0.6;
    animation-timing-function: ease-in-out;
  }
}

@keyframes prompt-in {
  0%,
  33%,
  100% {
    opacity: 0;
  }
  4%,
  29% {
    opacity: 1;
  }
}

@keyframes prompt-out {
  0%,
  42%,
  96%,
  100% {
    opacity: 0;
  }
  47%,
  88% {
    opacity: 1;
  }
}

/* What resonance breathing is */

.idea {
  display: grid;
  gap: 1.75rem clamp(2.5rem, 7vw, 6rem);
}

.idea .section-head {
  margin-bottom: 0;
}

@media (min-width: 56rem) {
  .idea {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .idea .prose {
    padding-top: 0.6rem;
  }
}

.figures {
  display: grid;
  gap: 2rem;
  margin: clamp(3.5rem, 8vw, 6rem) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .figures {
    grid-template-columns: repeat(3, 1fr);
  }
}

.figures li {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-top: 1.5rem;
  border-top: 1px solid var(--outline);
}

.figure {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.4vw, 3.8rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.figures p:last-child {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* The app, feature by feature: a stage and its words, alternating sides. */

.features {
  display: grid;
  gap: clamp(5rem, 12vw, 10rem);
}

.feature {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
}

.feature-copy {
  display: grid;
  gap: 1.25rem;
  align-content: center;
  max-width: 30rem;
}

.feature h3 {
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.08;
}

.feature-copy > p:not(.label) {
  color: var(--text-secondary);
  font-size: clamp(1.06rem, 1.6vw, 1.15rem);
}

/* Devices on a stage are sized by the stage, so a pair never outgrows its room. */
.feature .phone {
  --w: min(17.5rem, 64cqi);
}

@media (min-width: 56rem) {
  .feature {
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(3rem, 7vw, 7rem);
  }

  .feature--flip {
    grid-template-columns: 1fr 1.15fr;
  }

  .feature--flip .stage {
    order: 2;
  }

  .feature .stage {
    min-height: 36rem;
  }
}

.facts {
  display: grid;
  gap: 0.7rem;
  margin: 0.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--outline);
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.facts li {
  position: relative;
  padding-left: 1.4rem;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.68em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--honey);
}

.facts strong {
  color: var(--ink);
  font-weight: 480;
}

/* Two phones on one stage, the second a step forward and down. */
.pair {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pair .phone {
  --w: min(16rem, 51cqi);
}

.pair .phone:first-child {
  translate: 0 -6%;
  rotate: -3deg;
}

.pair .phone + .phone {
  margin-left: calc(var(--w) * -0.24);
  translate: 0 6%;
  rotate: 3deg;
}

/* A detail of a screen, enlarged: the live heart trace. */
.detail {
  width: min(100%, 34rem);
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow:
    0 0 0 1px var(--hairline),
    0 2.5rem 5rem -2.5rem var(--device-shadow);
}

.detail img {
  width: 100%;
  height: auto;
}

/* Day and night: the stage itself is half Linen, half Ember, whatever the page is. */
.stage--both {
  background: linear-gradient(105deg, #e8e5df 50%, #100d0b 50%);
}

.stage--both .phone:first-child {
  --device-shadow: rgb(74 56 40 / 0.34);
}

.stage--both .phone + .phone {
  --device-shadow: rgb(0 0 0 / 0.7);
}

.stage--watch .watch {
  --w: min(16rem, 60cqi);
}

/* Principles, on a warm band */

.band {
  background: var(--band);
}

.principles {
  display: grid;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .principles li {
    padding-inline: clamp(1.5rem, 3vw, 2.75rem);
  }

  .principles li:first-child {
    padding-left: 0;
  }

  .principles li + li {
    border-left: 1px solid var(--outline);
  }
}

.principles li {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.principles p:last-child {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.manifesto {
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  max-width: 52rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  font-weight: 320;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.manifesto em {
  font-style: italic;
}

/* The close */

.closing {
  padding-bottom: clamp(1rem, 4vw, 3rem);
}

.closing .wrap {
  display: grid;
  justify-items: center;
  gap: 1.6rem;
  text-align: center;
}

.closing h2 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  max-width: 18ch;
}

.closing .listing {
  text-align: left;
}

/* Arrival. Where the browser can tie an animation to scrolling, each stage and its words rise
 * into place as they come into view, and are simply there everywhere else. Transform and opacity
 * only, so nothing reflows. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rise {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(2.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb__glow,
  .hero-visual::before {
    animation: none;
    transform: scale(0.96);
    opacity: 0.86;
  }

  .orb__shadow {
    animation: none;
    transform: translateY(-8%) scale(0.92, 0.83);
    opacity: 0.66;
  }

  .orb__stone {
    animation: none;
    transform: scale(0.92);
  }

  .orb__prompt {
    display: none;
  }

  a,
  .theme-toggle {
    transition: none;
  }
}

/* Documents: privacy and support */

.doc-head {
  display: grid;
  gap: 1.25rem;
  padding-block: clamp(2rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4rem);
  max-width: 48rem;
}

.doc {
  display: grid;
  gap: clamp(2.75rem, 6vw, 4rem);
  max-width: 44rem;
}

.doc section {
  display: grid;
  gap: 1rem;
}

.doc h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
}

.doc p,
.doc li {
  color: var(--text-secondary);
}

.doc ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.6rem;
}

.doc li::marker {
  color: var(--honey);
}

.doc strong {
  color: var(--ink);
  font-weight: 500;
}

.summary {
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--radius-card);
  background: var(--band);
}

.summary ul {
  padding-left: 1.2rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

/* Placeholders that must be filled before launch. Deliberately loud. */
.todo {
  background: none;
  color: var(--ink);
  border: 1px dashed var(--heart);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.faq {
  display: grid;
  gap: 0.75rem;
}

.faq details {
  border-radius: var(--radius-tile);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.35;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1px solid var(--text-tertiary);
  border-bottom: 1px solid var(--text-tertiary);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.4s ease;
}

.faq details[open] summary::after {
  transform: translateY(25%) rotate(-135deg);
}

.faq .answer {
  display: grid;
  gap: 0.8rem;
  padding: 0 1.4rem 1.4rem;
}

.faq .answer ol,
.faq .answer ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}

/* Not found */

.lost {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding-block: clamp(3rem, 10vw, 7rem);
  text-align: center;
}

.lost .orb {
  margin-bottom: 2.5rem;
}

.lost .lede {
  margin-inline: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 420;
}

.pill:hover {
  color: var(--on-accent);
}
