/* Hallmark · shape: custom, the page turns inward like the mark · genre: editorial · theme: brand, pinned by the user's ECHO brand guide (context/brand.md)
 * paper: oklch(95.7% 0.012 79.8) · accent: oklch(62.0% 0.053 64.6) · display: Cormorant Garamond · body: DM Sans · hero: split, head and the join field left, the stone engraving right at 1:1 · nav: logo left, two links and one quiet action right, no rule · footer: the logotype over one row of links · signature: the master logo engraved in stone, shown whole; a one-minute breath guide to try
 * job: join (a list, before classes, times or an address exist) · axes: light/roman-serif/warm · posture: full-palette (paper Ivory, field Espresso, well Sand, signal Clay) · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: S, a wellness page fits any studio; the inward order, the stone and the timed breath belong to ECHO's mark alone */
/* Hallmark · waive 65 · cream Ivory paper, Cormorant serif display and Clay accent, pinned · the approved ECHO brand guide pins this exact palette and these faces */
/* Hallmark · dismissed 23 · the Clay disc on the Espresso field is the breath guide itself, under the declared full-palette posture · it is the one signal a visitor follows while breathing */
/* Hallmark · answered F15 · sections part their two columns by 96px; the 40px and 24px gaps sit inside a practice row and the two-item where/when list, not between section columns */
/* Hallmark · dismissed 41 · Ivory on Clay measures 3.2:1 and carries only the breath cue at 31px and the logo · large text needs 3:1, small text never sits on Clay */
@import url("./tokens.css");
@import url("./base.css");

@property --sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}

:root {
  --nav-h: 76px;
  --measure-lede: 34ch;
}

h1, h2, h3 { color: var(--color-ink); }

/* ---------- controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-lg);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-paper);
  font: 500 var(--text-md)/1 var(--font-body);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: var(--color-ink-2); border-color: var(--color-ink-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }

.btn--quiet { background: transparent; color: var(--color-ink); border-color: var(--color-ink-2); }
.btn--quiet:hover { background: var(--color-paper-2); border-color: var(--color-ink); }

.btn--on-field { background: transparent; color: var(--color-on-field); border-color: var(--color-on-field-2); }
.btn--on-field:hover { background: var(--color-on-field); color: var(--color-field); border-color: var(--color-on-field); }
.btn--on-field:focus-visible { outline-color: var(--color-focus-on-field); }

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(-1 * var(--space-3xl));
  z-index: var(--z-toast);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-ink);
  color: var(--color-paper);
}
.skip:focus-visible { top: var(--space-md); }

/* ---------- the logo, one inline master cropped by viewBox ---------- */

.logo { display: block; height: auto; color: var(--color-accent); }

/* ---------- nav ---------- */

.nav { height: var(--nav-h); }
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}
.nav__home { display: flex; align-items: center; gap: var(--space-sm); color: var(--color-accent); border-radius: 2px; }
.nav__home:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.nav__home .logo--mark { width: 34px; }
.nav__home .logo--word { width: 92px; }
.nav__links { display: flex; align-items: center; gap: var(--space-xl); }
.nav__links a:not(.btn) {
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-short) var(--ease-out);
}
.nav__links a:not(.btn):hover { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); }
.nav__links a:not(.btn):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: 2px; }
.nav__links .btn { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }

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

.hero {
  display: grid;
  align-items: center;
  min-height: calc(100svh - var(--nav-h));
  padding-block: var(--space-lg) var(--space-2xl);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 32rem) minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: center;
}
.hero__copy { display: grid; gap: var(--space-xl); min-width: 0; }
.hero h1 {
  font-weight: 400;
  font-size: clamp(3.25rem, 5.6vw + 0.5rem, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.015em;
  max-width: 11ch;
}
.hero__lede {
  font-size: var(--text-lead);
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-ink-2);
  max-width: var(--measure-lede);
}
.stone {
  margin: 0;
  aspect-ratio: 1;
  max-height: 640px;
  max-width: 640px;
  justify-self: start;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-paper-2);
}
.stone img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid color-mix(in oklab, var(--color-ink) 8%, transparent); outline-offset: -1px; }

/* ---------- join form (hero and close) ---------- */

.join { display: grid; gap: var(--space-xs); max-width: 30rem; }
.join label { font-size: var(--text-sm); color: var(--color-ink-2); }
.join__row { display: flex; gap: var(--space-xs); }
.join input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--space-md);
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-md);
  outline: 2px solid transparent;
  outline-offset: -3px;
}
.join input::placeholder { color: var(--color-muted); }
.join input:focus-visible { outline-color: var(--color-focus); }
.join input[aria-invalid] { border-color: var(--color-error); }
.join input:disabled { opacity: 0.55; cursor: not-allowed; }
.join__help { min-height: 1lh; font-size: var(--text-sm); color: var(--color-ink-2); }

/* ---------- the mark ---------- */

.mark { padding-block: var(--section-gap) var(--section-gap-s); }
.mark__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-3xl);
  align-items: center;
}
.mark__figure { position: relative; margin: 0; width: min(100%, 470px); color: var(--color-accent); }
.mark__figure .logo { width: 100%; }
.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  background: var(--color-paper);
  color: var(--color-ink);
  font: italic 400 var(--text-lg)/1 var(--font-display);
  transform: translate(-50%, -50%);
}
.mark__copy { display: grid; gap: var(--space-xl); min-width: 0; }
.mark__copy h2 { max-width: 14ch; }
.turns { list-style: none; counter-reset: turn; margin: 0; padding: 0; display: grid; gap: var(--space-lg); max-width: 40ch; }
.turns li {
  counter-increment: turn;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: var(--space-md);
  align-items: baseline;
  font-size: var(--text-lead);
  font-weight: 300;
  line-height: 1.5;
}
.turns li::before {
  content: counter(turn);
  font: italic 400 var(--text-lg)/1 var(--font-display);
  color: var(--color-accent);
  text-align: center;
}
.turns b { font-weight: 500; }

/* The one reveal: the spiral is uncovered in the direction the line turns. Visible without script. */
.js .mark__figure .logo {
  --sweep: 0deg;
  -webkit-mask-image: conic-gradient(from 210deg at 51% 51%, var(--color-ink) var(--sweep), transparent var(--sweep));
  mask-image: conic-gradient(from 210deg at 51% 51%, var(--color-ink) var(--sweep), transparent var(--sweep));
  transition: --sweep 800ms var(--ease-out);
}
.js .mark__figure.is-in .logo { --sweep: 360deg; }
@media (prefers-reduced-motion: reduce) {
  .js .mark__figure .logo { --sweep: 360deg; transition: none; }
}

/* ---------- the practice, stepping inward ---------- */

.practice { padding-block: var(--section-gap-s) var(--section-gap); }
.practice h2 { margin-bottom: var(--space-2xl); }
.ways { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.way {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-xl);
  align-items: baseline;
  padding-block: var(--space-xl);
  padding-left: calc(var(--step, 0) * var(--space-3xl));
  border-bottom: 1px solid var(--color-rule);
}
.way:nth-child(2) { --step: 1; }
.way:nth-child(3) { --step: 2; }
.ways h3 {
  margin: 0;
  font-family: var(--font-outlier);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw + 0.25rem, 4.25rem);
  letter-spacing: var(--tracking-outlier);
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--color-ink);
  max-width: none;
  overflow-wrap: break-word;
  min-width: 0;
}
.way__line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: 1.35;
  color: var(--color-ink-2);
  max-width: 30ch;
}

/* ---------- breathe: the centre ---------- */

.breathe { background: var(--color-field); color: var(--color-on-field); padding-block: var(--section-gap); }
.breathe h2 { color: var(--color-on-field); max-width: 12ch; }
.breathe__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-3xl);
  align-items: center;
}
.breathe__copy { display: grid; gap: var(--space-lg); justify-items: start; min-width: 0; }
.breathe__copy p { font-size: var(--text-lead); font-weight: 300; color: var(--color-on-field-2); max-width: 32ch; }
.breathe a:focus-visible { outline-color: var(--color-focus-on-field); }

.pacer {
  margin: 0;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(100%, 520px);
  justify-self: center;
}
.pacer__ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-on-field-2);
  border-radius: 50%;
}
.pacer__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-accent);
  transform: scale(0.42);
  transition-property: transform;
  transition-timing-function: var(--ease-in-out);
  transition-duration: var(--dur-long);
}
.pacer[data-phase="in"] .pacer__disc { transform: scale(1); }
.pacer[data-phase="out"] .pacer__disc { transform: scale(0.42); }
.pacer__cue {
  position: relative;
  z-index: var(--z-raised);
  max-width: 36%;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-2xl);
  color: var(--color-on-field);
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .pacer__disc { transition: none; }
}

/* ---------- close: join, where and when ---------- */

.close { background: var(--color-paper-2); padding-block: var(--section-gap); }
.close__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-3xl);
  align-items: center;
}
.close__sprout { margin: 0; justify-self: center; width: min(100%, 420px); color: var(--color-accent); }
.close__sprout .logo { width: 100%; }
.close__copy { display: grid; gap: var(--space-xl); min-width: 0; }
.close__copy h2 { max-width: 12ch; }
.close .join input { background: var(--color-paper); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); max-width: 30rem; border-top: 1px solid var(--color-rule); padding-top: var(--space-lg); }
.facts div { display: grid; gap: var(--space-2xs); }
.facts dt { font-size: var(--text-sm); color: var(--color-ink-2); }
.facts dd { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); }
.fill {
  padding: 0 0.25em;
  border: 1px dashed color-mix(in oklch, var(--color-muted) 70%, transparent);
  border-radius: 3px;
  color: var(--color-muted);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

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

.footer { padding-block: var(--space-3xl) var(--space-xl); }
.footer__inner { display: grid; gap: var(--space-2xl); }
.footer .logo--type { width: min(100%, 340px); }
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md) var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-rule);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-xl); }
.footer__links a { text-decoration: none; transition: color var(--dur-short) var(--ease-out); }
.footer__links a:hover { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); }
.footer__links a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: 2px; }

/* ---------- narrow screens ---------- */

@media (max-width: 60rem) {
  .hero__grid, .mark__grid, .breathe__grid, .close__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
  .stone { justify-self: stretch; max-height: none; }
  .mark__figure { width: min(84%, 360px); }
  .close__sprout { width: min(60%, 260px); justify-self: start; }
  .way { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); padding-left: calc(var(--step, 0) * var(--space-lg)); }
  .nav__links { gap: var(--space-lg); }
}
@media (max-width: 40rem) {
  .nav__links a:not(.btn) { display: none; }
  .nav__home .logo--word { display: none; }
  .join__row { flex-direction: column; }
  .join__row .btn { width: 100%; }
  .pacer { width: min(100%, 320px); }
  .pacer__cue { font-size: var(--text-lg); }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .nav__links a, .footer__links a { transition: none; }
}
