/* Ensemonde — site styles. Fonts are self-hosted (SIL OFL), so no third-party requests. */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --field: #f3f5fa;
  --ink: #18204a;
  --slate: #4a5378;
  --mist: #d9dfee;
  --cobalt: #2f5bff;
  --sun: #ffd23f;
  --card: #ffffff;

  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --max: 72rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
}

a {
  color: var(--cobalt);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}
a:hover {
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  background: var(--ink);
  color: var(--field);
  padding: 0.5rem 0.9rem;
  z-index: 10;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

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

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark svg {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
}

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

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  padding-top: clamp(2rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 7rem);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
  max-width: 13ch;
  text-wrap: balance;
}

.hero p {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--slate);
  max-width: 38ch;
  margin: 0;
}

.ripple {
  width: 100%;
  max-width: 26rem;
  justify-self: end;
  aspect-ratio: 1;
  overflow: visible;
}
.ripple .ring {
  fill: none;
  stroke: var(--cobalt);
  transform-origin: 200px 200px;
  transform-box: view-box;
}
.ripple .ring-1 { stroke-width: 3; opacity: 0.9; }
.ripple .ring-2 { stroke-width: 2; opacity: 0.55; }
.ripple .ring-3 { stroke-width: 1.5; opacity: 0.3; }
.ripple .ring-4 { stroke-width: 1; opacity: 0.16; }
.ripple .dot {
  fill: var(--sun);
  stroke: var(--ink);
  stroke-width: 4;
  transform-origin: 200px 200px;
  transform-box: view-box;
}

/* The one orchestrated moment: a tap lands, then the rings spread out. */
@media (prefers-reduced-motion: no-preference) {
  .ripple .dot {
    animation: tap 700ms cubic-bezier(0.3, 1.6, 0.5, 1) 200ms both;
  }
  .ripple .ring {
    animation: spread 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .ripple .ring-1 { animation-delay: 550ms; }
  .ripple .ring-2 { animation-delay: 700ms; }
  .ripple .ring-3 { animation-delay: 850ms; }
  .ripple .ring-4 { animation-delay: 1000ms; }
}
@keyframes tap {
  0% { transform: scale(2.2); opacity: 0; }
  60% { transform: scale(0.82); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes spread {
  from { transform: scale(0.15); opacity: 0; }
}

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

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--mist);
}

.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 1.25rem;
}

.section p {
  max-width: var(--measure);
}

/* ---------- App block ---------- */

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.app-name {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.app-name svg {
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
}
.app-name h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}
.status {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.app ul.facts {
  padding-left: 1.2rem;
  margin: 1.25rem 0 0;
  max-width: var(--measure);
}
.app ul.facts li {
  margin-bottom: 0.4rem;
}
.app ul.facts li::marker {
  color: var(--cobalt);
}

/* The sample sequence: a real sequence, so it is numbered. */
.sequence {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 1.4rem 1.4rem 1.1rem;
  box-shadow: 8px 8px 0 var(--ink);
  margin: 0;
}
.sequence figcaption {
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.sequence figcaption span {
  font-weight: 400;
  color: var(--slate);
  font-size: 0.95rem;
}
.sequence ol {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}
.sequence li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 5.2rem 1fr;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--mist);
  font-size: 1rem;
  line-height: 1.35;
}
.sequence li:first-child {
  border-top: 0;
}
.sequence li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--slate);
}
.sequence .kind {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  text-align: center;
  padding: 0.3rem 0;
  border-radius: 8px;
  background: var(--field);
  border: 1px solid var(--mist);
}
.sequence .kind.tap {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}
.sequence li.nested {
  padding-left: 1.5rem;
}

/* ---------- About / contact ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}

.email {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  letter-spacing: -0.01em;
  word-break: break-word;
}

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

.site-footer {
  border-top: 1px solid var(--mist);
  padding: 2rem 0 3rem;
  color: var(--slate);
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-footer p {
  margin: 0;
}
.site-footer ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.site-footer a {
  color: var(--slate);
}

/* ---------- Long-form pages (privacy) ---------- */

.doc {
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 8vw, 6rem);
}
.doc .wrap > * {
  max-width: var(--measure);
}
.doc h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.75rem;
}
.doc .meta {
  color: var(--slate);
  margin: 0 0 2.5rem;
}
.doc h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 3rem 0 0.75rem;
  line-height: 1.2;
}
.doc h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.4rem;
}
.doc li {
  margin-bottom: 0.45rem;
}
.doc .toc {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: 14px;
  padding: 1rem 1.5rem;
}
.doc .toc ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}

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

.lost .wrap {
  padding-top: clamp(3rem, 10vw, 8rem);
  padding-bottom: clamp(3rem, 10vw, 8rem);
}
.lost h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 52rem) {
  .hero .wrap,
  .app,
  .split {
    grid-template-columns: 1fr;
  }
  .ripple {
    order: -1;
    justify-self: start;
    max-width: 9rem;
  }
  .hero .wrap {
    gap: 1.5rem;
  }
}

@media (max-width: 30rem) {
  body {
    font-size: 1.0625rem;
  }
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .sequence li {
    grid-template-columns: 1.5rem 4.6rem 1fr;
  }
  .sequence li.nested {
    padding-left: 0.75rem;
  }
  .sequence {
    box-shadow: 5px 5px 0 var(--ink);
  }
}

/* ---------- About us page ---------- */

.about h1 {
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  max-width: 16ch;
  margin-bottom: 1.5rem;
}
.about .lede {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--slate);
  margin: 0 0 1rem;
}
.values {
  margin: 0;
}
.values dt {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-top: 1.5rem;
  padding-left: 1.4rem;
  position: relative;
}
.values dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 2px var(--ink);
}
.values dd {
  margin: 0.35rem 0 0 1.4rem;
}
.more {
  font-weight: 700;
}
