/* Osmosis — osmosis.sarl homepage
   Porcelain brand language. No external fonts, no inline styles, no tracking:
   everything here is self-hosted so the page satisfies the strict CSP in
   `_headers` (default-src 'none'; style-src 'self'; font-src 'self'). */

:root {
  color-scheme: light;

  /* Porcelain palette */
  --porc:    #f8f7f4;
  --porc-up: #fcfbf8;
  --ink:     #1e1d22;
  --sec:     #6b6970;
  --faint:   #a7a5ab;
  --line:    #e2e0e6;
  --line-sf: #ecebf0;

  /* Violet / sage accents */
  --vio:     #5a4fb5;
  --vio-dp:  #483f96;
  --vio-lt:  #8f84d9;
  --sage:    #84987f;
  --node-a:  #e4e0f4;
  --node-b:  #c2bed6;

  --ok:   #4b6a48;
  --warn: #8d3a41;

  --display: "Iowan Old Style", Baskerville, "Palatino Linotype", Palatino,
             "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 64px;
  --measure: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--porc);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

a { color: inherit; text-underline-offset: 5px; }
a:hover { color: var(--vio); }

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

p { margin: 0 0 22px; }
strong { font-weight: 600; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
}

h1 {
  margin: 0 0 44px;
  font-size: clamp(60px, 9.4vw, 132px);
  line-height: .98;
  letter-spacing: -.05em;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -.034em;
}

h3 {
  margin: 20px 0 14px;
  font-size: 27px;
  line-height: 1.22;
  letter-spacing: -.022em;
}

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

.eyebrow {
  margin: 0 0 26px;
  font: 11px/1.6 var(--mono);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--vio);
}

.lead {
  font-family: var(--display);
  font-size: 27px;
  line-height: 1.32;
  letter-spacing: -.016em;
  color: var(--ink);
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 10px;
  left: 16px;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--porc);
  text-decoration: none;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); color: var(--porc); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 9;
  background: var(--porc);
  background: color-mix(in srgb, var(--porc) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-sf);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.05em;
  text-decoration: none;
}
.wordmark-mark {
  display: block;
  width: 46px;
  height: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 30px;
}
nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 13px;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--sec);
}
nav a:hover { color: var(--ink); }
.nav-access { color: var(--vio); }
.nav-access:hover { color: var(--vio-dp); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 96px 104px;
}

.hero-weave {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -16%;
  width: min(1080px, 78vw);
  opacity: .5;
  transform: translateY(-54%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 92px;
  align-items: end;
}

.hero-copy > p:not(.lead),
.section-copy p,
.steps p { color: var(--sec); }

.hero-copy > p:not(.lead) { max-width: 46ch; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  min-height: 52px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease,
              box-shadow .18s ease;
}
.button.primary {
  background: var(--vio);
  color: #fff;
  box-shadow: 0 1px 2px rgba(30, 29, 34, .12);
}
.button.primary:hover {
  background: var(--vio-dp);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(90, 79, 181, .24);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  color: var(--vio);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.text-link:hover { border-bottom-color: currentColor; }

.hero-note {
  position: relative;
  padding: 26px 0 8px 30px;
  border-left: 1px solid var(--line);
}
.note-index {
  display: block;
  margin-bottom: 32px;
  color: var(--faint);
  font: 10px/1.6 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero-note p {
  margin-bottom: 16px;
  font: 27px/1.3 var(--display);
  letter-spacing: -.022em;
}
.note-tail { font-size: 13px; color: var(--sec); }

/* ------------------------------------------------------------ live weave */

/* Each weave is a square stage holding two layers: the static SVG, which is
   what you get with JavaScript off, and a canvas that motion.js animates.
   The canvas only replaces the image once motion.js has booted (`html.js`),
   so there is never a blank frame. */
.weave-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  height: auto;
}
.weave-still,
.weave-live {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.weave-live { opacity: 0; }
.js .weave-live.is-live { opacity: 1; }
.js .weave-live.is-live + .weave-still,
.js .weave-still:has(+ .weave-live.is-live) { opacity: 0; }

/* Browsers without :has() keep both layers; they are the same drawing in the
   same place, so the result is a slightly denser weave, not a broken one. */

/* ------------------------------------------------------------------ seam */

/* The seam is a narrow window onto the middle band of a full-size weave. */
.seam {
  position: relative;
  overflow: hidden;
  height: 76px;
  margin-inline: auto;
  aspect-ratio: auto;
  pointer-events: none;
  opacity: .34;
}
.seam .weave-still,
.seam .weave-live {
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(1500px, 150%);
  max-width: none;
  height: auto;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
}

/* -------------------------------------------------------------- sections */

.section {
  padding-block: 92px;
  border-top: 1px solid var(--line-sf);
}
.seam + .section { border-top: 0; padding-top: 12px; }

.section-heading { margin-bottom: 52px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
}
.section-copy { padding-top: 6px; }
.section-copy p:last-of-type { margin-bottom: 22px; }
#your-choice { border-top: 0; }

/* steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  position: relative;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
}
.steps li::after {
  content: "";
  position: absolute;
  inset-block-start: -1px;
  inset-inline-start: 0;
  width: 46px;
  height: 2px;
  background: var(--vio-lt);
}
.step-number {
  color: var(--vio);
  font: 12px/1 var(--mono);
  letter-spacing: .08em;
}
.steps p { margin-bottom: 0; font-size: 15px; }

/* arkana */

.arkana-section {
  position: relative;
  overflow: hidden;
  padding-block: 92px;
  background: linear-gradient(180deg, var(--node-a) 0%, #eeebf8 100%);
}
.arkana-weave {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: -22%;
  width: min(880px, 70vw);
  height: auto;
  opacity: .3;
  transform: translateY(-50%) scaleX(-1);
  pointer-events: none;
}
.arkana-section .wrap { position: relative; z-index: 1; }
.arkana-section .eyebrow { color: var(--vio-dp); }
.arkana-section .section-copy p:not(.lead) { color: #514e5c; }

/* faq */

.faq-section {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 80px;
}
.faq-section .section-heading { margin-bottom: 0; }

details {
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}
details:first-child { border-top: 1px solid var(--line); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 16px;
  min-height: 44px;
  cursor: pointer;
  font-size: 17px;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  flex: none;
  color: var(--vio);
  font: 18px/1 var(--mono);
}
details[open] summary { color: var(--vio); }
details p {
  margin: 2px 0 18px;
  max-width: 58ch;
  color: var(--sec);
  font-size: 15px;
}

/* ---------------------------------------------------------------- access */

.access-wrap { padding-bottom: 96px; }

.access-section {
  position: relative;
  overflow: hidden;
  padding: 76px 40px 64px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--porc-up);
  text-align: center;
}
.access-weave {
  position: absolute;
  z-index: 0;
  top: -58%;
  left: 50%;
  width: min(1100px, 130%);
  max-width: none;
  height: auto;
  opacity: .24;
  transform: translateX(-50%);
  pointer-events: none;
}
.access-section > *:not(.access-weave) { position: relative; z-index: 1; }
.access-section h2 { margin-bottom: 22px; }
.access-lede {
  max-width: 42ch;
  margin-inline: auto;
  color: var(--sec);
}
.access-note {
  margin: 20px auto 0;
  font-size: 12px;
  color: var(--faint);
}

.waitlist-form {
  max-width: 520px;
  margin: 36px auto 0;
  text-align: left;
}
.form-field { margin-bottom: 24px; }
.form-field label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 10px;
  font-size: 15px;
}
.field-note {
  color: var(--faint);
  font: 10px/1.6 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.form-field input {
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.form-field input::placeholder { color: var(--faint); opacity: 1; }
.form-field input:hover { border-color: var(--node-b); }
.form-field input:focus {
  border-color: var(--vio-lt);
  box-shadow: 0 0 0 3px rgba(143, 132, 217, .22);
}
.field-help {
  margin: 10px 0 0;
  color: var(--sec);
  font-size: 13px;
  line-height: 1.6;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block: 8px;
  cursor: pointer;
  font-size: 14px;
}
.consent-label input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--vio);
}
#waitlist-challenge { margin-top: 20px; min-height: 1px; }
.waitlist-form .button { width: 100%; margin-top: 20px; cursor: pointer; }
.waitlist-form .button:disabled {
  background: var(--node-b);
  color: #43414b;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.form-status {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--sec);
  overflow-wrap: anywhere;
}
.form-status[data-state="error"] { color: var(--warn); }
.form-status[data-state="success"] { color: var(--ok); }
.retry-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--vio);
  cursor: pointer;
  font-family: inherit;
}

[hidden] { display: none !important; }

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

.site-footer {
  border-top: 1px solid var(--line-sf);
  background: var(--porc);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding-block: 44px 40px;
}
.footer-brand .wordmark { font-size: 28px; }
.footer-brand .wordmark-mark { width: 42px; }
.footer-brand p {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--sec);
}
.site-footer nav { gap: 8px 28px; }
.footer-meta {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  font: 11px/1.6 var(--mono);
  letter-spacing: .04em;
  color: var(--faint);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  :root { --gutter: 40px; }
  .hero-bottom, .split { gap: 48px; }
  .faq-section { grid-template-columns: 1fr; gap: 36px; }
  .hero-weave { right: -32%; opacity: .4; }
}

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .split { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; gap: 10px 24px; }
}

@media (max-width: 600px) {
  :root { --gutter: 22px; }
  html { scroll-padding-top: 20px; }
  .site-header { position: static; }
  .header-inner { display: block; padding-block: 18px 12px; }
  .site-header nav { justify-content: flex-start; margin-top: 14px; gap: 2px 20px; }
  nav a { font-size: 12px; min-height: 40px; }
  .wordmark { font-size: 26px; }
  .wordmark-mark { width: 38px; }

  .hero { padding-block: 44px 56px; }
  .hero-weave { top: 26%; right: -46%; width: 150%; opacity: .34; }
  h1 { margin-bottom: 28px; font-size: clamp(50px, 14vw, 74px); }
  .lead { font-size: 23px; }
  .hero-bottom { grid-template-columns: 1fr; gap: 34px; }
  .hero-note { padding: 4px 0 4px 20px; }
  .note-index { margin-bottom: 16px; }
  .hero-note p { font-size: 24px; margin-bottom: 12px; }

  .seam { height: 44px; }
  .seam img { width: 260%; }

  .section, .arkana-section { padding-block: 56px; }
  .section-heading { margin-bottom: 32px; }
  .eyebrow { margin-bottom: 18px; }

  .access-wrap { padding-bottom: 56px; }
  .access-section { padding: 46px 22px 40px; border-radius: 12px; }
  .footer-inner { grid-template-columns: 1fr; padding-block: 32px; }
  .site-footer nav { gap: 10px 24px; }
}

/* ---------------------------------------------------------------- reveal */

/* Only applied once motion.js is running, so with JavaScript off nothing is
   ever left hidden. The lift is small and the fade does the work: content
   that slides a long way reads as a slideshow, not as a page. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1),
              transform .7s cubic-bezier(.22, .61, .36, 1);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Steps arrive in sequence, reading left to right. */
.js .steps li:nth-child(2) { transition-delay: .09s; }
.js .steps li:nth-child(3) { transition-delay: .18s; }

/* The step rule draws itself in rather than appearing. */
.steps li::after {
  transform-origin: left center;
  transition: transform .8s cubic-bezier(.22, .61, .36, 1) .12s;
}
.js .steps li[data-reveal]::after { transform: scaleX(0); }
.js .steps li[data-reveal].is-in::after { transform: scaleX(1); }

/* FAQ disclosure: the marker turns rather than swapping glyph. */
summary::after {
  transition: transform .26s cubic-bezier(.22, .61, .36, 1), color .2s ease;
}
details[open] summary::after { transform: rotate(135deg); }
details p {
  animation: faq-in .32s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .steps li[data-reveal]::after { transform: scaleX(1); }
}

@media (prefers-contrast: more) {
  :root { --sec: #4a4850; --faint: #5d5b63; --line: #b8b6bf; }
  .hero-weave, .arkana-weave, .access-weave, .seam { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header nav, .actions, .access-wrap, .skip-link,
  .seam, .hero-weave, .arkana-weave { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  body { background: #fff; color: #000; }
  .wrap { width: 100%; }
  .hero, .section, .arkana-section { padding-block: 24px; }
  .arkana-section { background: none; }
  h1 { font-size: 54px; }
  h2 { font-size: 30px; }
  .steps, .split, .hero-bottom, .faq-section { display: block; }
  .steps li { break-inside: avoid; margin-top: 20px; }
  .hero-note { display: none; }
  details { break-inside: avoid; }
  details p { display: block; }
}
