/* Lotus — public site
   One page, no build step. Tokens first, then layout, then sections.
   /assets/* is cached immutable for a year: bump ?v= on the stylesheet link
   in index.html and 404.html whenever this file changes. */

/* Georgia sized to Fraunces' text width (measured ratio 0.885), so headings
   reflow less while the web font loads. Heading measures stay in ch, and ch
   follows the face in use: without Fraunces the hero heading can take one
   more line. An em measure cannot fix this, because Fraunces' optical-size
   axis changes its ch-to-em ratio with the font size. */
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia");
  size-adjust: 88.5%;
}

:root {
  --paper: #fcf9fa;
  --ink: #26181f;
  --muted: #6d5c65;
  --mist: #efe4e8;
  --mist-strong: #dfcfd5;
  --pink: #e2287c;
  --pink-deep: #b91c63;
  /* Lotus Pink stays the brand and the ornament. Text and fills that carry
     text use these roles so every pair meets 4.5:1. */
  --pink-text: #b91c63;
  --action: #d62475;
  --action-hover: #b91c63;
  --on-action: #fff;
  --petal: #ffd6d9;
  --petal-soft: #fff0f1;
  --leaf: #2e6e5a;
  --leaf-soft: #e6f1ec;
  --code-bg: #2a1c24;
  --code-ink: #f7eef1;
  --focus: #2e6e5a;
  --selection: #ffd6d9;

  --font-display: "Fraunces", "Fraunces Fallback", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --measure: 62ch;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1216;
    --ink: #f6ecf0;
    --muted: #b79aa6;
    --mist: #33242c;
    --mist-strong: #4a3540;
    --pink: #ff5c9e;
    --pink-deep: #ff86b7;
    --pink-text: #ff5c9e;
    --action: #ff5c9e;
    --action-hover: #ff86b7;
    --on-action: #1b1216;
    --petal: #5a2438;
    --petal-soft: #2a1a21;
    --leaf: #7fd1b3;
    --leaf-soft: #1f3a31;
    --code-bg: #120b0f;
    --code-ink: #f6ecf0;
    --focus: #7fd1b3;
    --selection: #5a2438;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
  scrollbar-color: var(--mist-strong) var(--paper);
  accent-color: var(--action);
  caret-color: var(--pink-text);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--pink-text) 45%, transparent);
}

a:hover {
  color: var(--pink-text);
  text-decoration-color: currentColor;
}

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

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "SOFT" 60, "WONK" 0;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}

h2 {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.75rem);
  max-width: 24ch;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
}

p {
  margin: 0;
  max-width: var(--measure);
}

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

/* Skip link: off screen until it has keyboard focus. */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: var(--gutter);
  z-index: 20;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Paper on Ink in both states: the global pink link hover fails on Ink. */
.skip-link:hover,
.skip-link:focus-visible {
  color: var(--paper);
}

/* Buttons and inline code ------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.button-primary {
  background: var(--action);
  color: var(--on-action);
}

.button-primary:hover {
  background: var(--action-hover);
  color: var(--on-action);
}

.button-secondary {
  border-color: var(--mist-strong);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.inline-code {
  background: var(--mist);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

pre.code {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
  margin: 0;
  font-size: 0.9rem;
}

pre.code .k {
  color: #ffb0c8;
}

pre.code .s {
  color: #bfe8d4;
}

pre.code .c {
  color: #a58d98;
}

pre.code .a {
  color: #f2c9a0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mist);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.site-nav {
  display: none;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--ink);
}

@media (min-width: 48rem) {
  .site-nav {
    display: flex;
  }
}

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  /* Top padding kept small so part of the recording shows above the fold. */
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem);
}

/* The one bold gesture on the page: the mark, enormous and faint, cropped
   at the top-right corner like a flower seen too close. */
.hero-mark {
  position: absolute;
  top: -12vw;
  right: -14vw;
  width: min(64vw, 900px);
  opacity: 0.32;
  pointer-events: none;
  user-select: none;
  filter: saturate(0.9);
}

@media (prefers-color-scheme: dark) {
  .hero-mark {
    opacity: 0.14;
  }
}

.hero .wrap {
  position: relative;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--muted);
  border: 1px solid var(--mist-strong);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.25rem;
  background: var(--paper);
}

.hero h1 {
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5.5rem);
  max-width: 14ch;
  font-weight: 500;
}

.hero-lede {
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  max-width: 52ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  align-items: center;
}

.hero-window {
  position: relative;
  margin-top: clamp(2rem, 4vw, 3rem);
  border-radius: 14px;
  overflow: hidden;
  background: var(--code-bg);
  box-shadow:
    0 1px 0 rgba(38, 24, 31, 0.06),
    0 30px 80px -30px rgba(38, 24, 31, 0.35);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 5rem 0.6rem 0.9rem;
  color: #c9b3bd;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.window-bar span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #5a4650;
}

.window-bar em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  margin-left: 0.5rem;
}

/* Sits in the window bar, over its right end. Hidden until the script runs. */
.window-toggle {
  position: absolute;
  top: 0.35rem;
  right: 0.6rem;
  min-height: 1.5rem;
  padding: 0.15rem 0.7rem;
  border: 1px solid #7c6772;
  border-radius: 999px;
  background: none;
  color: #c9b3bd;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.2;
  cursor: pointer;
}

.window-toggle:hover {
  border-color: #c9b3bd;
  color: #f7eef1;
}

.window-toggle:focus-visible {
  outline-color: #7fd1b3;
}

.hero-window video,
.hero-window img {
  width: 100%;
  aspect-ratio: 1948 / 1040;
  object-fit: cover;
}

/* Sections --------------------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--mist);
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
}

@media (min-width: 60rem) {
  .section-head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

/* The 1.0 sheet: a definition list, one hairline per row, no cards. */
.sheet {
  margin: 0;
  border-top: 1px solid var(--mist-strong);
}

.sheet-row {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--mist);
}

.sheet dt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
}

.sheet dd {
  margin: 0;
  color: var(--muted);
  max-width: var(--measure);
}

@media (min-width: 48rem) {
  .sheet-row {
    grid-template-columns: 15rem 1fr;
  }
}

.sheet-more {
  margin-top: 1.5rem;
  color: var(--muted);
}

/* Feature showcases ------------------------------------------------------ */

.showcase {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2rem, 5vw, 4rem);
}

.showcase + .showcase {
  border-top: 1px solid var(--mist);
}

.showcase:first-of-type {
  padding-top: 0;
}

.showcase:last-of-type {
  padding-bottom: 0;
}

.showcase-copy h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  max-width: 20ch;
}

.showcase-copy p {
  margin-top: 1rem;
  color: var(--muted);
}

.showcase-copy ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.showcase-copy li,
.pro-grid li {
  padding-left: 1.4rem;
  position: relative;
}

.showcase-copy li::before,
.pro-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pink);
}

.showcase-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--mist-strong);
  background: var(--petal-soft);
}

.showcase-media video {
  width: 100%;
  aspect-ratio: 1948 / 1040;
  object-fit: cover;
}

@media (min-width: 60rem) {
  .showcase {
    grid-template-columns: 5fr 7fr;
    gap: 3.5rem;
  }

  .showcase.flip {
    grid-template-columns: 7fr 5fr;
  }

  .showcase.flip .showcase-copy {
    order: 2;
  }
}

/* Sources ---------------------------------------------------------------- */

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.sources li {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--mist-strong);
  border-radius: 999px;
}

/* A data source the reader writes: dashed, because it is not in the box. */
.sources li.yours {
  color: var(--muted);
  border-style: dashed;
}

/* The safety sheet sits under the source chips, in the same section. */
.safety-title {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1.25rem;
}

/* Get started ------------------------------------------------------------ */

.steps {
  counter-reset: step;
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.steps h3::before {
  content: counter(step) ". ";
  color: var(--pink-text);
}

.steps p {
  color: var(--muted);
}

@media (min-width: 60rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  @supports (grid-template-rows: subgrid) {
    .steps li {
      grid-row: span 3;
      grid-template-rows: subgrid;
    }
  }
}

.steps-guide {
  margin-top: 2.5rem;
}

/* Pro -------------------------------------------------------------------- */

.pro {
  background: var(--petal-soft);
  border-top: 1px solid var(--petal);
  border-bottom: 1px solid var(--petal);
}

.pro-grid {
  display: grid;
  gap: 2rem;
}

.pro-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.pro-grid li strong {
  display: block;
  font-weight: 600;
}

.pro-grid li span {
  color: var(--muted);
}

.pro-note {
  margin-top: 1.5rem;
  color: var(--muted);
}

@media (min-width: 60rem) {
  .pro-grid {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }

  .pro-grid ul {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
  }
}

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

.faq {
  border-top: 1px solid var(--mist-strong);
  max-width: 56rem;
}

.faq details {
  border-bottom: 1px solid var(--mist);
  padding: 1rem 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

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

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-family: var(--font-body);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin-top: 0.75rem;
  color: var(--muted);
}

.closing {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

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

.site-footer {
  border-top: 1px solid var(--mist);
  padding-block: 3rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-grid h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-variation-settings: normal;
  letter-spacing: normal;
  line-height: 1.6;
  color: var(--ink);
  font-weight: 600;
}

.footer-about {
  margin-top: 0.75rem;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.footer-grid li a {
  display: inline-block;
  padding-block: 0.2rem;
}

.footer-grid a {
  text-decoration: none;
}

.footer-grid a:hover {
  text-decoration: underline;
}

.site-footer .brand {
  color: var(--ink);
}

.footer-note {
  max-width: none;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--mist);
  font-size: 0.875rem;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* Forced colours --------------------------------------------------------- */

@media (forced-colors: active) {
  .hero-mark {
    display: none;
  }

  .showcase-copy li::before,
  .pro-grid li::before {
    forced-color-adjust: none;
    background: CanvasText;
  }
}

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

.not-found {
  padding-block: 6rem;
}

.not-found h1 {
  margin-top: 2rem;
  font-size: 2.5rem;
}

.not-found p {
  margin-top: 1rem;
  color: var(--muted);
}
