/* hypnogami.com in the Instrument style: warm paper, one deep green, one red signal, serif + sans + a little mono. */
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url(/fonts/geist.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist-mono.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  --paper: #f4efe7;
  --sheet: #fbf8f2;
  --line: #d9d2c5;
  --deep: #1f3a30;
  --ink: #1b1a24;
  --soft: #4a4954;
  --muted: #6b6a63;
  --signal: #e4572e;
  --signal-text: #b8401d;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: 16px;
  --wide: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.0625rem) / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--deep); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
p { text-wrap: pretty; }
h2 { font: 400 clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem) / 1.04 var(--serif); letter-spacing: -0.005em; text-wrap: balance; }
h3 { font: 500 1.125rem/1.3 var(--sans); }
em { font-style: italic; color: var(--deep); }
.label { font: 400 0.78rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.signal { color: var(--signal-text); }
.n { font: 400 0.8rem/1 var(--mono); color: var(--signal-text); letter-spacing: 0.06em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--deep); color: var(--paper); border-radius: 999px; }
.skip:focus { top: 12px; }

/* The bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 28px;
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 14px var(--gutter);
  background: rgb(244 239 231 / 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 1.7rem/1 var(--serif); }
.bar nav { display: flex; gap: 24px; margin-left: auto; }
.bar nav a { color: var(--soft); text-decoration: none; font-size: 0.95rem; }
.bar nav a:hover { color: var(--ink); }
.pill, .button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 999px;
  background: var(--deep); color: var(--paper); text-decoration: none;
  font: 500 0.95rem/1.2 var(--sans); white-space: nowrap;
  transition: background-color 0.2s;
}
.pill:hover, .button:hover { background: #2b4c40; color: var(--paper); }

/* Sections share one width; a rule drawn as a background lines up with the content, not the padding */
.hero, .band, .how, .price, .honest, .join, .privacy, footer {
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
}

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center;
  padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(56px, 8vw, 112px);
}
.hero h1 { margin-top: 20px; font: 400 clamp(3rem, 1.9rem + 5vw, 5.6rem) / 0.96 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.lede { margin-top: 24px; max-width: 34rem; font-size: 1.12rem; color: var(--soft); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 32px; }
.button { padding: 14px 24px; font-size: 1rem; }
.hero-actions a:not(.button) { font-weight: 500; }

/* The session plan: the instrument */
.plan {
  margin: 0; padding: 26px 26px 22px;
  background: var(--sheet); border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgb(31 58 48 / 0.35);
  display: grid; gap: 14px;
}
.plan-head { display: flex; justify-content: space-between; }
.plan-title { font: 400 clamp(2rem, 1.6rem + 1.4vw, 2.6rem) / 1 var(--serif); }
.plan-from { color: var(--muted); font-size: 0.95rem; margin-top: -6px; }
.curve { width: 100%; height: auto; margin-top: 6px; overflow: visible; }
.curve .grid { stroke: var(--line); stroke-width: 1; }
.curve .dash { stroke-dasharray: 3 4; }
.curve .line { fill: none; stroke: var(--deep); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.curve .now { fill: var(--signal); }
.phases { display: grid; grid-template-columns: 132fr 270fr 78fr; font: 400 0.72rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.specs { margin: 4px 0 0; display: grid; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }
.plan figcaption { margin-top: 4px; }

/* Bands */
.band { margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(32px, 4vw, 48px); }
.band, footer { background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.hero + .band { margin-top: 0; }
.band-head { display: grid; gap: 16px; max-width: 40rem; }
.band-head > p:last-child { color: var(--soft); font-size: 1.08rem; }
.cards { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cards li { display: grid; align-content: start; gap: 12px; padding: 24px; background: var(--sheet); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.cards p { color: var(--soft); font-size: 0.97rem; }

/* How it works */
.how {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: center;
  margin-top: clamp(64px, 9vw, 120px);
}
.how > div:last-child { display: grid; gap: 16px; }
.gami {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 32px;
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line);
}
.gami img { width: 46%; height: auto; }
.bubble {
  position: absolute; left: 10%; top: 12%;
  padding: 12px 18px; border-radius: 18px 18px 18px 4px;
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line);
  font: 400 1.5rem/1 var(--serif);
}
.honest h3.label { font-weight: 400; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 3rem 1fr; padding: 16px 0; border-top: 1px solid var(--line); color: var(--soft); }
.steps .n { padding-top: 0.3em; }
.steps strong { color: var(--ink); font-weight: 500; }
.aside { color: var(--muted); font-size: 0.95rem; }

/* What we're making */
.log { list-style: none; margin: 40px 0 0; padding: 0; display: grid; }
.log li { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--soft); }
.log strong { color: var(--ink); font-weight: 500; }
.state { justify-self: start; padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font: 400 0.74rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); height: fit-content; }
.state.is-live { background: var(--deep); color: var(--paper); box-shadow: none; }

/* Price */
.price { display: grid; gap: 16px; padding-top: clamp(64px, 9vw, 112px); }
.price > *, .privacy > * { max-width: 44rem; }
.price p:not(.label) { color: var(--soft); }

/* Honesty */
.honest { margin-top: clamp(64px, 9vw, 112px); }
.honest > h2 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem); }
.honest .cols { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.honest .cols > div { padding: 24px; border-radius: 20px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); }
.honest ul { margin: 14px 0 0; padding: 0 0 0 1.1em; display: grid; gap: 8px; color: var(--soft); }

/* Join */
.join {
  margin-top: clamp(64px, 9vw, 112px); padding-block: clamp(48px, 7vw, 80px);
  display: grid; justify-items: center; text-align: center; gap: 14px;
  background: var(--deep); color: var(--paper); border-radius: 32px;
  max-width: var(--wide); width: calc(100% - 2 * var(--gutter));
}
.join h2 { margin-top: 8px; }
.join > p { color: #c9d3cc; }
.seal { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--paper); }
form { width: 100%; max-width: 32rem; margin-top: 18px; text-align: left; }
.field { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--sheet); }
.field:focus-within { box-shadow: 0 0 0 3px rgb(228 87 46 / 0.45); }
.field:has([aria-invalid="true"]) { box-shadow: 0 0 0 2px #f4a28a; }
input[type="email"] { flex: 1; min-width: 0; padding: 10px 16px; border: 0; background: none; color: var(--ink); font: inherit; }
input[type="email"]::placeholder { color: #75736b; }
input[type="email"]:focus-visible { outline: none; }
button {
  padding: 11px 22px; border: 0; border-radius: 999px;
  background: #c4441f; color: #fff; font: 500 0.98rem/1.2 var(--sans);
  cursor: pointer; white-space: nowrap; transition: background-color 0.2s;
}
button:hover { background: #a9391a; }
button:disabled { opacity: 0.6; cursor: progress; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 16px 6px 0; font-size: 0.9rem; line-height: 1.5; color: #c9d3cc; cursor: pointer; }
.consent input {
  flex: none; appearance: none; -webkit-appearance: none; display: grid; place-content: center;
  width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid #c9d3cc; border-radius: 5px; background: transparent; cursor: pointer;
}
.consent input::before { content: ""; width: 10px; height: 6px; margin-top: -2px; border: solid var(--deep); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform 0.15s; }
.consent input:checked { background: var(--paper); border-color: var(--paper); }
.consent input[aria-invalid="true"] { border-color: #f4a28a; }
.consent input:checked::before { transform: rotate(-45deg) scale(1); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; margin: 14px 6px 0; font-size: 0.95rem; color: var(--paper); }
.status.is-error { color: #f4a28a; }
.joined { margin: 24px 0 0; max-width: 32rem; font: 400 clamp(1.4rem, 1.2rem + 1vw, 1.8rem) / 1.3 var(--serif); }

/* Privacy */
.privacy { display: grid; gap: 12px; padding-top: clamp(56px, 7vw, 88px); }
.privacy h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem); }
.privacy p { font-size: 0.92rem; color: var(--muted); }

footer {
  display: grid; gap: 8px; margin-top: clamp(56px, 7vw, 88px);
  padding-top: 28px; padding-bottom: calc(40px + env(safe-area-inset-bottom));
  font-size: 0.9rem; color: var(--muted);
}
footer .brand { font-size: 1.4rem; margin-bottom: 4px; }
footer .label a { color: var(--muted); }

@media (max-width: 960px) {
  .hero, .how { grid-template-columns: 1fr; gap: 48px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how .gami { max-width: 420px; width: 100%; }
}
@media (max-width: 720px) {
  .bar nav { display: none; }
  .bar .pill { margin-left: auto; }
  .cards, .honest .cols { grid-template-columns: 1fr; }
  .log li { grid-template-columns: 1fr; gap: 8px; }
  .join { border-radius: 24px; }
}
@media (max-width: 520px) {
  .brand { font-size: 1.45rem; }
  .brand img { width: 28px; height: 28px; }
  .pill { padding: 9px 14px; font-size: 0.88rem; }
  .field { flex-direction: column; border-radius: 22px; padding: 8px; }
  input[type="email"] { padding: 12px 14px; }
  button { padding: 14px 22px; }
  .plan { padding: 22px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, .pill, .button, .consent input::before { transition: none; }
}

/* A session page (/s/<slug>): centred on one axis, the session, its plan as the player, the call to make it yours */
.bar > .brand + .pill { margin-left: auto; }
.session-head, .player, .column, .elsewhere {
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
}
.session-head { display: grid; justify-items: center; text-align: center; padding-top: clamp(32px, 5vw, 64px); }
.session-head h1 { margin-top: 16px; font: 400 clamp(2.8rem, 1.8rem + 4.6vw, 5.2rem) / 0.96 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.session-head .lede { max-width: 38rem; }
.session-head .keep { margin-top: 10px; max-width: 38rem; color: var(--muted); text-wrap: balance; }
.player { display: grid; justify-items: center; gap: 20px; margin-top: clamp(32px, 4vw, 48px); }
.screen { width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #0d1a15; }
.screen iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Listen only: the plan is the player, the native control is the fallback without script */
.listen {
  width: 100%; margin: 0; padding: 20px 24px 18px; display: grid; gap: 14px;
  background: var(--sheet); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line);
}
.listen-head { display: flex; align-items: center; gap: 14px; }
.listen .time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.play { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--deep); color: var(--paper); }
.play:hover { background: #2b4c40; }
.play svg { width: 18px; height: 18px; fill: currentColor; }
.play .i-pause, .play.is-playing .i-play { display: none; }
.play.is-playing .i-pause { display: inline; }
.track { position: relative; }
.listen .curve { display: block; margin: 0; width: 100%; height: clamp(72px, 9vw, 120px); overflow: visible; }
.listen.is-live .track { cursor: pointer; border-radius: 4px; }
.listen .curve .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.listen .curve .tick { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.listen .curve .line { fill: none; stroke: var(--deep); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--signal); pointer-events: none; }
.listen-foot { display: flex; justify-content: space-between; gap: 16px; }
.listen-foot .chapter { color: var(--ink); }
.listen.is-live audio { display: none; }
.listen audio { width: 100%; }
.download { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; }

/* The reading column: one centred measure */
.column { display: grid; justify-items: center; gap: clamp(40px, 5vw, 64px); margin-top: clamp(40px, 5vw, 64px); }
.column > section { width: 100%; max-width: 44rem; }
.notice-box { display: grid; gap: 8px; padding: 20px 24px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.notice-box p { font-size: 0.95rem; color: var(--soft); }
.about h2 { text-align: center; font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); margin-bottom: 18px; }
.about p { color: var(--soft); }
.about p + p { margin-top: 12px; }
.chapters-box > .label { text-align: center; }
/* two columns read down, as a timeline does */
.chapters { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rows), auto); grid-auto-flow: column; column-gap: 32px; }
.chapters li { border-top: 1px solid var(--line); }
.chapters button {
  display: grid; grid-template-columns: 4.2em 1fr; align-items: baseline; gap: 12px; width: 100%; padding: 10px 0;
  background: none; color: var(--ink); border-radius: 0; font: 400 0.98rem/1.4 var(--sans); text-align: left; white-space: normal;
}
.chapters button:hover { background: none; color: var(--deep); }
.chapters .n { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.chapters li.is-now .n { color: var(--signal-text); }
.words { margin-top: 24px; text-align: center; }
.words summary { cursor: pointer; font: 400 0.8rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.words p { margin-top: 12px; color: var(--soft); text-align: left; }
.customize details { display: grid; justify-items: center; gap: 14px; width: 100%; max-width: 34rem; }
.customize summary { list-style: none; margin-top: 10px; background: #c4441f; color: #fff; cursor: pointer; }
.customize summary::-webkit-details-marker { display: none; }
.customize summary:hover { background: #a9391a; }
.customize details[open] summary { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px rgba(244, 239, 231, 0.35); }
/* the signal red on the panel's green reads at 4.6:1 only lightened */
.customize .signal { color: #f4a28a; }
.customize details p { color: #c9d3cc; margin: 0 0 0.6rem; }
.customize .aside { margin-top: 6px; font-size: 0.85rem; color: #9fb0a6; }
.customize .aside a { color: var(--paper); }
.elsewhere { margin-top: clamp(32px, 4vw, 48px); text-align: center; color: var(--soft); }
@media (max-width: 720px) {
  .screen { border-radius: 14px; }
  .listen { padding: 16px 16px 14px; border-radius: 18px; }
  .chapters { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
}

/* The legal pages (/privacy, /terms, /cookies): one reading column, every text at 7:1 or more (WCAG AAA) */
.legal { max-width: calc(44rem + 2 * var(--gutter)); margin-inline: auto; padding: clamp(32px, 5vw, 64px) var(--gutter) 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.legal-nav a { color: var(--soft); text-decoration: none; }
.legal-nav a:hover { color: var(--ink); text-decoration: underline; }
.legal-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; }
.legal h1 { margin: 20px 0 0; font: 400 clamp(2.8rem, 1.9rem + 4vw, 4.4rem) / 1 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.draft {
  display: flex; align-items: baseline; gap: 10px; margin-top: 24px; padding: 12px 18px;
  background: var(--sheet); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 500;
}
.draft::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); transform: translateY(-1px); }
.legal h2 { margin-top: clamp(40px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.4rem); scroll-margin-top: 88px; }
.legal h3 { margin-top: 32px; }
.legal h4 { margin: 24px 0 0; font: 500 1rem/1.4 var(--sans); }
.legal h3, .legal h4 { text-wrap: balance; }
.legal p, .legal ul { margin: 12px 0 0; }
.legal h2 + p, .legal h2 + ul { margin-top: 16px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal li::marker { color: var(--soft); }
.legal code { font: 400 0.9em var(--mono); }
.legal a { overflow-wrap: anywhere; }
.table { margin-top: 16px; }
.table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; font: 400 0.74rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); padding: 0 12px 10px 0; vertical-align: bottom; }
.table td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.legal-page footer, .legal-page footer .label a { color: var(--soft); }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table tr { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
  .table td { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 0; border: 0; }
  .table td::before { content: attr(data-label); font: 400 0.74rem/1.9 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
}
