/* ClassHeart — direction A, "Paper" */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-wght-italic-basic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
/* metric-matched fallbacks, so the swap does not shift the layout much */
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Liberation Serif");
  size-adjust: 104%;
  ascent-override: 94%;
  descent-override: 25%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 97%;
  ascent-override: 98%;
  descent-override: 26%;
}

:root {
  --paper: #F6F1E8;
  --paper-2: #EFE7DA;
  --ink: #1D1B18;
  --ink-2: #3F3A33;
  --muted: #5C554B;
  --accent: #B4432E;
  --accent-ink: #A33A26;
  --accent-deep: #8F3321;
  --hair: rgba(29, 27, 24, 0.16);
  --ruled: rgba(74, 104, 128, 0.11);

  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: 16px;
  --mcol: 0px;
  --rule-gap: 12px;
  --header-h: 64px;
  --line: 2.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }

a { color: inherit; }

::selection { background: rgba(180, 67, 46, 0.2); color: var(--ink); }

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

.skip {
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 0.75rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- the page grid: margin column | margin rule | content ---------- */

.wrap {
  position: relative;
  max-width: 1360px;
  margin-inline: auto;
  padding-left: calc(var(--gutter) + var(--mcol) + var(--rule-gap) * 2);
  padding-right: var(--gutter);
}
.wrap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--gutter) + var(--mcol) + var(--rule-gap));
  width: 2px;
  background: var(--accent);
  opacity: 0.5;
  pointer-events: none;
}

@media (min-width: 960px) {
  :root {
    --gutter: clamp(28px, 3.4vw, 56px);
    --mcol: clamp(140px, 13vw, 184px);
    --rule-gap: clamp(22px, 2.4vw, 36px);
    --header-h: 76px;
  }
  .wrap {
    display: grid;
    grid-template-columns: var(--mcol) minmax(0, 1fr);
    column-gap: calc(var(--rule-gap) * 2);
    padding-left: var(--gutter);
  }
  .wrap > * { grid-column: 2; }
  .wrap > .margin-note { grid-column: 1; grid-row: 1; }
}

/* ---------- type ---------- */

.label, .num, .pill, .node, .p-num {
  font-family: var(--mono);
  font-weight: 400;
}
.label {
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

h2 {
  font-family: var(--serif);
  font-weight: 460;
  font-size: clamp(2.25rem, 1.45rem + 2.6vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink);
  max-width: 17ch;
  text-wrap: balance;
}
h3 {
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.body { color: var(--ink-2); }
.body-lg {
  font-size: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 36em;
}
.measure { max-width: 36em; }

/* margin notes: section labels written in the margin */
.margin-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
  margin-bottom: 1.5rem;
}
.margin-note .num {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.pill {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.7rem 0.25rem;
  line-height: 1.3;
  white-space: nowrap;
}
@media (min-width: 960px) {
  .margin-note {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.5rem;
    margin: 0;
    padding-top: 0.9rem;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    align-self: start;
  }
  .margin-note .num::after {
    content: "";
    display: block;
    width: 1.25rem;
    height: 1px;
    margin: 0.55rem 0 0 auto;
    background: var(--muted);
  }
}

/* ---------- buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.45rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-decoration: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.btn::before {
  /* the ink that fills the button on hover */
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: var(--accent-deep);
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s cubic-bezier(0.65, 0.05, 0.25, 1);
}
.btn:hover { border-color: var(--accent-deep); }
.btn:hover::before { transform: scaleX(1); }
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--muted);
}
.btn-quiet::before { background: var(--ink); }
.btn-quiet:hover { color: var(--paper); border-color: var(--ink); }
.btn-small { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.9375rem; }
.arrow { display: inline-block; vertical-align: -0.1em; margin-left: 0.15rem; transition: transform 0.2s ease; }
.text-link .arrow { margin-left: 0.35rem; }
.nowrap { white-space: nowrap; }
a:hover .arrow { transform: translateX(3px); }
a:hover .arrow-ne { transform: translate(2px, -2px); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 2.25rem;
}

.text-link {
  display: inline-block;
  padding: 0.7rem 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
}
.text-link:hover { color: var(--accent-ink); }

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

.site-header {
  position: relative;
  z-index: 20;
  background: var(--paper);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--hair); }
.header-in {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand cta" "nav nav";
  align-items: center;
  column-gap: 1rem;
  padding-top: 0.75rem;
}
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  justify-self: start;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  line-height: 1;
}
.mark { flex: none; }
.mark-stroke, .mini-heart path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-cta { grid-area: cta; }
.nav { grid-area: nav; margin-top: -0.125rem; }
.nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0 -6px 0 calc(-0.6rem - 6px);
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
}
.nav a { position: relative; }
.nav a::after {
  /* a pen stroke drawn under the link on hover */
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 9px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s cubic-bezier(0.65, 0.05, 0.25, 1);
}
.nav a:hover { color: var(--accent-ink); }
.nav a:hover::after { transform: scaleX(1); }

@media (min-width: 960px) {
  .site-header {
    position: sticky;
    top: 0;
  }
  .header-in {
    grid-template-columns: var(--mcol) minmax(0, 1fr) auto;
    grid-template-areas: none;
    column-gap: calc(var(--rule-gap) * 2);
    min-height: var(--header-h);
    padding-top: 0;
  }
  .header-in > .brand { grid-column: 1; grid-area: auto; }
  .header-in > .nav { grid-column: 2; grid-area: auto; margin: 0; }
  .header-in > .header-cta { grid-column: 3; grid-area: auto; }
  .nav ul { gap: 0.5rem; overflow: visible; }
  .nav a { font-size: 1rem; }
}
@media (min-width: 960px) and (max-width: 1100px) {
  .brand-name { font-size: 1.2rem; }
}

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

.hero {
  position: relative;
  overflow: hidden;
}
.ruled {
  position: absolute;
  inset: -48px 0 0;
  pointer-events: none;
}
.ruled::before {
  /* the faint ruled lines of an exercise book */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--line) - 1px),
    var(--ruled) calc(var(--line) - 1px),
    var(--ruled) var(--line)
  );
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  pointer-events: none;
}
.hero .wrap {
  padding-top: clamp(2.5rem, 7vh, 5.5rem);
  padding-bottom: clamp(3.5rem, 8vh, 6rem);
}
.hero-note { margin-bottom: 1.25rem; max-width: 13rem; }
@media (min-width: 720px) { .hero-note { max-width: none; } }
.hero-body {
  display: grid;
  gap: 2rem;
  align-items: center;
}
h1 {
  font-family: var(--serif);
  color: var(--ink);
}
.h1-brand {
  display: block;
  font-size: clamp(3.75rem, 1.5rem + 9.4vw, 8.75rem);
  font-weight: 540;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-left: -0.04em;
}
.h1-line {
  display: block;
  margin-top: 0.75em;
  max-width: 19ch;
  font-size: clamp(1.625rem, 1.15rem + 1.7vw, 2.625rem);
  font-weight: 380;
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}
.lead {
  margin-top: 1.75rem;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.62;
  color: var(--ink-2);
}
.hero-art {
  position: relative;
  justify-self: center;
  width: 118px;
  order: -1;
  justify-self: end;
  margin: -4.1rem -0.25rem -1.25rem 0;
}
.pen-heart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.pen {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pen-heart .pen { stroke-width: 8; }

@media (min-width: 720px) {
  .hero-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 3rem; }
  .hero-art { order: 0; width: 100%; max-width: 400px; margin: 0 0 -1.25rem; align-self: end; justify-self: end; }
  .pen-heart .pen { stroke-width: 3.2; }
}
@media (min-width: 960px) {
  .hero .wrap { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); align-content: center; }
  .hero-note { padding-top: 1.1rem; }
}

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

.section .wrap {
  padding-top: clamp(4.5rem, 7.5vw, 7rem);
  padding-bottom: clamp(4.5rem, 7.5vw, 7rem);
}
section[id] { scroll-margin-top: 0; }
@media (min-width: 960px) {
  section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }
}

/* about */
.about-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
.aside-line {
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.05rem + 0.4vw, 1.375rem);
  font-weight: 420;
  line-height: 1.35;
  color: var(--ink);
  max-width: 22ch;
}
.tick {
  display: block;
  width: 2.25rem;
  height: 1.5px;
  background: var(--accent);
  margin-bottom: 1rem;
}
@media (min-width: 960px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: end;
    margin-top: 2.75rem;
  }
}

/* socrates */
.socrates { background: var(--paper-2); }
.h2-product {
  font-size: clamp(3rem, 1.8rem + 4.6vw, 5.75rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
}
.tagline {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-weight: 380;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 30ch;
  color: var(--ink);
  text-wrap: balance;
}
.socrates-head .body { margin-top: 1.75rem; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.62; }

/* the loop */
.loop {
  position: relative;
  margin-top: 3.25rem;
}
.loop-line { display: none; }
.loop-steps {
  position: relative;
  display: grid;
  gap: 0;
  padding: 1.75rem 0;
}
.loop-steps::before {
  /* mobile: the loop as a tall rounded track, nodes on its left edge */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 21px;
  right: 2px;
  border: 1.5px solid var(--accent);
  border-radius: 28px;
  pointer-events: none;
}
.loop-steps::after {
  /* direction arrow on the return side, pointing up */
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-top: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
  background: transparent;
}
.loop-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
}
.node {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--accent-ink);
  font-size: 0.875rem;
  line-height: 1;
}
.step {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 440;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.loop-caption {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.5rem;
  max-width: 34em;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.55;
}
.mini-heart { flex: none; margin-top: 0.15rem; }
.mini-heart path { stroke-width: 2.8; }

@media (min-width: 900px) {
  .loop { margin-top: 4.5rem; }
  .loop-line {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 22px;
    width: 100%;
    height: calc(100% - 44px);
    overflow: visible;
    pointer-events: none;
  }
  .loop-line .pen { stroke-width: 1.5; }
  .loop-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto minmax(8.5rem, auto) auto;
    padding: 0 4%;
  }
  .loop-steps::before, .loop-steps::after { display: none; }
  .loop-steps li {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    min-height: 0;
  }
  .loop-steps li:nth-child(-n+4) { grid-row: 1; }
  .loop-steps li:nth-child(n+5) { grid-row: 3; flex-direction: column-reverse; }
  .loop-steps li:nth-child(5) { grid-column: 4; }
  .loop-steps li:nth-child(6) { grid-column: 3; }
  .loop-steps li:nth-child(7) { grid-column: 2; }
  .loop-steps li:nth-child(8) { grid-column: 1; }
  .step { font-size: clamp(1.25rem, 1rem + 0.5vw, 1.5rem); }
  .loop-caption {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(36ch, 46%);
    margin: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 1rem;
  }
  .mini-heart { margin: 0; }
}

.socrates-links { margin-top: 3.5rem; }

/* approach */
.principles {
  display: grid;
  gap: 2.75rem;
  margin-top: 2.75rem;
}
.principles li {
  position: relative;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
}
.p-num {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.8125rem;
  color: var(--accent-ink);
}
.principles p {
  margin-top: 0.75rem;
  color: var(--ink-2);
  max-width: 34em;
}
@media (min-width: 760px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem clamp(2.5rem, 5vw, 5rem);
    margin-top: 3.5rem;
  }
}

/* contact */
.contact .body-lg { margin-top: 1.5rem; max-width: 30em; text-wrap: balance; }
.email {
  margin-top: 2.25rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 0.6rem + 6vw, 5.5rem);
  font-weight: 420;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.email a {
  display: inline-block;
  padding: 0.14em 0 0.18em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}
.email a:hover { color: var(--accent-ink); }
.secondary-link { margin-top: 1.75rem; }

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

.site-footer {
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 0.9375rem;
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  margin-right: auto;
  width: 100%;
}
.footer-brand .brand-name { font-size: 1.25rem; }
.footer-parent a, .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}
.footer-parent a:hover, .footer-links a:hover { color: var(--accent-ink); }
.footer-links { display: flex; gap: 1.5rem; }
@media (min-width: 960px) {
  .footer-in {
    display: grid;
    grid-template-columns: var(--mcol) auto 1fr auto auto;
    column-gap: calc(var(--rule-gap) * 2);
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }
  .footer-in > * { grid-column: auto; }
  .footer-brand { width: auto; grid-column: 1; grid-row: 1; }
  .footer-motto { grid-column: 2 / -1; grid-row: 1; margin: 0; font-size: 1.375rem; }
  .footer-parent { grid-column: 2; grid-row: 2; }
  .footer-links { grid-column: 4; grid-row: 2; }
  .footer-copy { grid-column: 5; grid-row: 2; }
}

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

.notfound .wrap {
  min-height: calc(100vh - 160px);
  min-height: calc(100svh - 160px);
  align-content: center;
  padding-top: 4rem;
  padding-bottom: 5rem;
}
.notfound h1 {
  font-size: clamp(3rem, 1.6rem + 5.6vw, 6.5rem);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 12ch;
}
.notfound .body-lg { margin-top: 1.5rem; }
.nf-heart { width: 120px; height: auto; margin-bottom: 2rem; }
.nf-heart .pen { stroke-width: 9; }
.header-simple { grid-template-areas: "brand cta"; padding-bottom: 0.75rem; }


/* ---------- ink doodles (static by default: complete drawings) ---------- */

.ink {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doodle {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}
.h1-brand { position: relative; display: inline-block; }
.doodle-star {
  right: -0.34em;
  top: -0.08em;
  width: 0.3em;
  height: 0.3em;
}
.doodle-star .ink { stroke-width: 2.2; }
.h1-line { position: relative; isolation: isolate; }
.hl { position: relative; white-space: nowrap; }
.hl::before {
  /* a soft highlighter swipe */
  content: "";
  position: absolute;
  left: -0.12em;
  right: -0.1em;
  bottom: 0.04em;
  height: 0.46em;
  z-index: -1;
  background: rgba(180, 67, 46, 0.15);
  border-radius: 0.18em 0.4em 0.22em 0.35em;
  transform: rotate(-0.8deg);
}

.motto {
  margin-bottom: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.375rem, 1.05rem + 1.15vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.m-line { display: block; }
.m-heart, .m-ev { position: relative; color: var(--accent-ink); }
.m-beat { right: -0.52em; top: -0.42em; width: 0.56em; height: 0.56em; }
.m-beat .ink { stroke-width: 2.6; }
.m-underline { left: 0; bottom: -0.1em; width: 100%; height: 0.28em; }
.m-cite { right: -0.58em; top: -0.28em; width: 0.42em; height: 0.42em; }
.m-cite .ink { stroke-width: 2.2; }
@media (min-width: 720px) {
  .m-line { display: inline; }
  .m-line + .m-line { margin-left: 0.55em; }
}

.footer-motto span { display: inline-block; }
.footer-motto {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1875rem;
  line-height: 1.35;
  color: var(--ink);
  width: 100%;
  margin-bottom: 0.25rem;
}
.doodle-arrow { display: none; }
@media (min-width: 960px) {
  .hero-note { position: static; }
  .doodle-arrow {
    display: block;
    position: static;
    width: 112px;
    height: auto;
    margin: 0.75rem calc(var(--rule-gap) * -2 + 4px) 0 0;
  }
  .doodle-arrow .ink { stroke-width: 1.6; }
}
.mh { position: absolute; display: block; pointer-events: none; }
.mh svg { width: 100%; height: 100%; overflow: visible; }
.mh-1 { width: 13%; left: -4%; top: 4%; }
.mh-1 svg { transform: rotate(-14deg); }
.mh-2 { width: 8.5%; right: -1%; top: -6%; }
.mh-2 svg { transform: rotate(12deg); }
.mh .ink { stroke-width: 2.4; }

.h-ink {
  display: block;
  width: min(2.4em, 100%);
  height: 0.2em;
  margin-top: 0.14em;
  overflow: visible;
}
.h-ink .ink { stroke-width: 2.25; }
.h2-product .h-ink { width: 2.1em; height: 0.16em; }

.pill { display: inline-flex; align-items: center; gap: 0.45rem; }
.pulse {
  position: relative;
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}

.p-head {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}
.p-head .p-num { margin: 0; }
.p-icon { order: -1; width: 56px; height: 56px; margin-left: -6px; overflow: visible; transition: transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1); }
.p-icon .ink { stroke-width: 1.6; }
.principles li:hover .p-icon { transform: rotate(-5deg) scale(1.06); }

.contact .col { position: relative; }
.plane {
  position: absolute;
  right: -0.25rem;
  top: -0.75rem;
  width: clamp(104px, 19vw, 260px);
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.trail {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.trail-reveal { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; }
.plane-fly { transform: translate(214px, 40px) rotate(-35.6deg); }
.plane-body { transform-box: fill-box; transform-origin: 50% 50%; }
.plane-shape {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 959px) {
  .plane { width: 116px; top: 0.35rem; right: -0.5rem; }
}
@media (min-width: 960px) {
  .plane { top: -2.5rem; right: 2%; }
}

/* the Socrates loop: a travelling ink dot, nodes that light up */
.node { position: relative; z-index: 2; }
.node::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}
.loop-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper-2);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.5s ease;
}
.loop.is-running .loop-dot { opacity: 1; }
.loop-steps li.is-lit .node {
  background: var(--accent);
  color: var(--paper);
  transform: scale(1.12);
}
.loop-steps li.is-lit .step { color: var(--accent-ink); }
.loop-steps li.is-lit .node::after { animation: node-ping 1.1s cubic-bezier(0, 0, 0.2, 1); }
@keyframes node-ping {
  from { opacity: 0.6; transform: scale(1); }
  to { opacity: 0; transform: scale(1.75); }
}
.mini-heart.beat { animation: beat-once 0.9s ease-in-out; }
@keyframes beat-once {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.3); }
  40% { transform: scale(0.95); }
  60% { transform: scale(1.15); }
}

/* ---------- motion: only when allowed, only once html.js is set ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes draw { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

  /* hero: the page is ruled, the words arrive, the pen draws */
  .js .ruled::before {
    transform-origin: 0 50%;
    animation: rule-in 1.4s cubic-bezier(0.65, 0.05, 0.3, 1) both;
  }
  @keyframes rule-in { from { transform: scaleX(0); } to { transform: none; } }
  @supports (animation-timeline: scroll()) {
    /* the ruled lines drift a little slower than the page (scroll-driven, off the main thread) */
    .js .ruled {
      animation: drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
    @keyframes drift { from { transform: none; } to { transform: translate3d(0, 16vh, 0); } }
  }

  .js .hero-note > .label,
  .js .hero .motto,
  .js .h1-brand,
  .js .h1-line,
  .js .hero .lead,
  .js .hero .actions { animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .js .hero .motto { animation-delay: 0.08s; }
  .js .h1-brand { animation-delay: 0.18s; }
  .js .h1-line { animation-delay: 0.3s; }
  .js .hero .lead { animation-delay: 0.42s; }
  .js .hero .actions { animation-delay: 0.54s; }
  .js .hl::before { transform-origin: 0 50%; animation: swipe 0.75s 1.3s cubic-bezier(0.5, 0.1, 0.25, 1) both; }
  @keyframes swipe {
    from { transform: rotate(-0.8deg) scaleX(0); }
    to { transform: rotate(-0.8deg) scaleX(1); }
  }

  .js .pen-draw {
    stroke-dasharray: 1 1.05;
    stroke-dashoffset: 1.02;
    animation: draw 2.2s 0.45s cubic-bezier(0.55, 0.1, 0.3, 1) both;
  }
  .js .pen-heart {
    transform-origin: 50% 48%;
    animation: heart-beat 3.4s 2.9s ease-in-out infinite;
  }
  @keyframes heart-beat {
    0%, 30%, 100% { transform: scale(1); }
    7% { transform: scale(1.045); }
    13% { transform: scale(0.995); }
    19% { transform: scale(1.028); }
  }

  .js .doodle .ink,
  .js .mh .ink {
    stroke-dasharray: 1 1.05;
    stroke-dashoffset: 1.02;
    animation: draw 0.7s cubic-bezier(0.5, 0.1, 0.25, 1) both;
  }
  .js .m-beat .ink { animation-duration: 0.7s; animation-delay: 0.95s; }
  .js .m-underline .ink { animation-duration: 0.7s; animation-delay: 1.55s; }
  .js .m-cite .ink { animation-duration: 0.45s; animation-delay: 2.15s; }
  .js .m-beat { transform-origin: 50% 60%; animation: heart-beat 3.4s 2.9s ease-in-out infinite; }
  .js .doodle-arrow .ink { animation-duration: 0.8s; animation-delay: 1.6s; }
  .js .doodle-arrow .ink-late { animation-duration: 0.3s; animation-delay: 2.35s; }
  .js .doodle-star .ink { animation-duration: 0.6s; animation-delay: 2.5s; }
  .js .mh-1 .ink { animation-delay: 2.65s; }
  .js .mh-2 .ink { animation-delay: 2.95s; }
  .js .doodle-star { animation: twinkle 5.2s 3.3s ease-in-out infinite; }
  @keyframes twinkle {
    0%, 100% { transform: none; }
    50% { transform: rotate(18deg) scale(0.84); }
  }
  .js .mh-1 { animation: float 5.6s 3.4s ease-in-out infinite; }
  .js .mh-2 { animation: float 4.4s 3.7s ease-in-out infinite; }
  @keyframes float {
    0%, 100% { transform: none; }
    50% { transform: translateY(-7px); }
  }

  /* scroll: sections write themselves in */
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js .margin-note.reveal { transform: translateX(-16px); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .margin-note .num::after { transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.6s cubic-bezier(0.5, 0.1, 0.25, 1) 0.35s; }
  .js .margin-note.is-in .num::after { transform: none; }
  .js .reveal .tick { transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.7s cubic-bezier(0.5, 0.1, 0.25, 1) 0.6s; }
  .js .reveal.is-in .tick { transform: none; }

  .js .h-ink .ink {
    stroke-dasharray: 1 1.05;
    stroke-dashoffset: 1.02;
    transition: stroke-dashoffset 0.9s cubic-bezier(0.5, 0.1, 0.25, 1) 0.4s;
  }
  .js .is-in .h-ink .ink { stroke-dashoffset: 0; }

  .js .pulse::after { animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite; }
  @keyframes ping {
    from { opacity: 0.55; transform: scale(1); }
    to { opacity: 0; transform: scale(3); }
  }

  /* the loop: drawn, then each step arrives in order */
  .js .loop .loop-path {
    stroke-dasharray: 1 1.05;
    stroke-dashoffset: 1.02;
    transition: stroke-dashoffset 2.4s cubic-bezier(0.55, 0.1, 0.3, 1);
  }
  .js .loop .loop-arrow { opacity: 0; transition: opacity 0.6s ease 2s; }
  .js .loop.is-in .loop-path { stroke-dashoffset: 0; }
  .js .loop.is-in .loop-arrow { opacity: 1; }
  .js .loop .node {
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.45s ease var(--d), transform 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) var(--d), background-color 0.35s ease, color 0.35s ease;
  }
  .js .loop .step {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease calc(var(--d) + 0.12s), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d) + 0.12s), color 0.35s ease;
  }
  .js .loop.is-in .node { opacity: 1; transform: none; }
  .js .loop.is-in .step { opacity: 1; transform: none; }
  .js .loop.is-in .loop-steps li.is-lit .node { transform: scale(1.12); }
  .js .loop.is-settled .node,
  .js .loop.is-settled .step { transition-delay: 0s; }
  .loop-steps li:nth-child(1) { --d: 0s; }
  .loop-steps li:nth-child(2) { --d: 0.14s; }
  .loop-steps li:nth-child(3) { --d: 0.28s; }
  .loop-steps li:nth-child(4) { --d: 0.42s; }
  .loop-steps li:nth-child(5) { --d: 0.56s; }
  .loop-steps li:nth-child(6) { --d: 0.7s; }
  .loop-steps li:nth-child(7) { --d: 0.84s; }
  .loop-steps li:nth-child(8) { --d: 0.98s; }
  .js .loop .loop-caption { opacity: 0; transition: opacity 0.8s ease 1.2s; }
  .js .loop.is-in .loop-caption { opacity: 1; }

  /* approach: each principle draws its own small icon, and again on hover */
  .js .p-icon .ink {
    stroke-dasharray: 1 1.05;
    stroke-dashoffset: 1.02;
    transition: stroke-dashoffset 0.7s cubic-bezier(0.5, 0.1, 0.25, 1);
  }
  .js .p-icon .ink:nth-child(1) { transition-delay: 0.3s; }
  .js .p-icon .ink:nth-child(2) { transition-delay: 0.6s; }
  .js .p-icon .ink:nth-child(3) { transition-delay: 0.85s; }
  .js .p-icon .ink:nth-child(4) { transition-delay: 1.05s; }
  .js .is-in .p-icon .ink { stroke-dashoffset: 0; }
  .js .principles li.is-in:hover .p-icon .ink { animation: draw 0.65s cubic-bezier(0.5, 0.1, 0.25, 1) both; }
  .js .principles li.is-in:hover .p-icon .ink:nth-child(2) { animation-delay: 0.15s; }
  .js .principles li.is-in:hover .p-icon .ink:nth-child(3) { animation-delay: 0.3s; }
  .js .principles li.is-in:hover .p-icon .ink:nth-child(4) { animation-delay: 0.42s; }

  /* contact: a paper plane loops in, leaving a dashed trail */
  .js .plane .trail-reveal { stroke-dasharray: 1 1.05; stroke-dashoffset: 1.02; }
  .js .plane .plane-fly { opacity: 0; }
  .js .is-in .plane .trail-reveal { animation: plane-trail 2.4s linear 0.6s both; }
  .js .is-in .plane .plane-fly { opacity: 1; transition: opacity 0.3s ease 0.6s; animation: plane-fly 2.4s linear 0.6s both; }
  .js .is-in .plane .plane-body { animation: plane-bob 3.8s ease-in-out 3.2s infinite; }
  @keyframes plane-bob {
    0%, 100% { transform: none; }
    50% { transform: translateY(-3px) rotate(-4deg); }
  }

  /* nothing loops while it is off screen */
  .is-offscreen .pen-heart,
  .is-offscreen .m-beat,
  .is-offscreen .doodle-star,
  .is-offscreen .mh,
  .is-offscreen .pulse::after,
  .is-offscreen .plane-body { animation-play-state: paused; }
}

@keyframes plane-fly {
  0% { transform: translate(10.0px, 122.0px) rotate(8.3deg); }
  4.17% { transform: translate(10.0px, 122.0px) rotate(8.3deg); }
  8.33% { transform: translate(10.6px, 122.1px) rotate(8.1deg); }
  12.5% { transform: translate(12.4px, 122.3px) rotate(7.3deg); }
  16.67% { transform: translate(16.0px, 122.7px) rotate(5.5deg); }
  20.83% { transform: translate(21.7px, 123.1px) rotate(2.6deg); }
  25% { transform: translate(30.4px, 123.2px) rotate(-1.6deg); }
  29.17% { transform: translate(42.8px, 122.2px) rotate(-7.6deg); }
  33.33% { transform: translate(58.5px, 119.0px) rotate(-15.7deg); }
  37.5% { transform: translate(77.9px, 111.3px) rotate(-28.0deg); }
  41.67% { transform: translate(98.3px, 95.1px) rotate(-51.1deg); }
  45.83% { transform: translate(104.8px, 65.7px) rotate(-115.6deg); }
  50% { transform: translate(75.6px, 67.2px) rotate(-252.4deg); }
  54.17% { transform: translate(99.5px, 89.8px) rotate(-352.8deg); }
  58.33% { transform: translate(131.1px, 87.7px) rotate(-373.3deg); }
  62.5% { transform: translate(155.4px, 78.6px) rotate(-387.8deg); }
  66.67% { transform: translate(173.3px, 67.9px) rotate(-392.1deg); }
  70.83% { transform: translate(187.0px, 59.0px) rotate(-394.0deg); }
  75% { transform: translate(197.1px, 52.1px) rotate(-395.1deg); }
  79.17% { transform: translate(204.2px, 47.1px) rotate(-395.6deg); }
  83.33% { transform: translate(209.0px, 43.6px) rotate(-395.7deg); }
  87.5% { transform: translate(211.9px, 41.5px) rotate(-395.7deg); }
  91.67% { transform: translate(213.4px, 40.5px) rotate(-395.6deg); }
  95.83% { transform: translate(213.9px, 40.1px) rotate(-395.6deg); }
  100% { transform: translate(213.9px, 40.1px) rotate(-395.6deg); }
}
@keyframes plane-trail {
  0% { stroke-dashoffset: 1.0200; }
  4.17% { stroke-dashoffset: 1.0197; }
  8.33% { stroke-dashoffset: 1.0176; }
  12.5% { stroke-dashoffset: 1.0120; }
  16.67% { stroke-dashoffset: 1.0011; }
  20.83% { stroke-dashoffset: 0.9831; }
  25% { stroke-dashoffset: 0.9563; }
  29.17% { stroke-dashoffset: 0.9188; }
  33.33% { stroke-dashoffset: 0.8689; }
  37.5% { stroke-dashoffset: 0.8048; }
  41.67% { stroke-dashoffset: 0.7249; }
  45.83% { stroke-dashoffset: 0.6272; }
  50% { stroke-dashoffset: 0.5100; }
  54.17% { stroke-dashoffset: 0.3928; }
  58.33% { stroke-dashoffset: 0.2951; }
  62.5% { stroke-dashoffset: 0.2152; }
  66.67% { stroke-dashoffset: 0.1511; }
  70.83% { stroke-dashoffset: 0.1012; }
  75% { stroke-dashoffset: 0.0638; }
  79.17% { stroke-dashoffset: 0.0369; }
  83.33% { stroke-dashoffset: 0.0189; }
  87.5% { stroke-dashoffset: 0.0080; }
  91.67% { stroke-dashoffset: 0.0024; }
  95.83% { stroke-dashoffset: 0.0003; }
  100% { stroke-dashoffset: 0.0000; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
