/* Aeonloom website. Values from design-tokens.json / Main.dc.html (2026-10-11).
   Fonts are self-hosted (see fonts/). No third-party requests. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Italic-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F4EFE4;
  --vellum: #FFFDF8;
  --band: #EAE3D3;
  --border: #E4D9C1;
  --border-strong: #D8CCB2;
  --field-border: #DBCFB4;
  --ink: #26241F;
  --body: #4A463F;
  --muted: #6B655C;
  --accent: #0F6F74;
  --accent-hover: #0A4F53;
  --accent-tint: #EAF4F3;
  --accent-border: #B9D6D8;
  --footer-muted: #CFC7B6;
  --eu-icon: #1E2A5A;

  --display: "Source Serif 4", Georgia, serif;
  --ui: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* { box-sizing: content-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.display { font-family: var(--display); }
.mono { font-family: var(--mono); }

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

.site-header {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.brand:hover { color: var(--ink); }
.brand span {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  box-sizing: content-box;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  padding: 12px 14px;
}
.nav a:hover { color: var(--accent-hover); }
.nav a.nav-contact {
  color: var(--vellum);
  background: var(--ink);
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 23px;
}
.nav a.nav-contact:hover { color: var(--vellum); background: #000; }

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

.hero {
  padding-top: 56px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 960px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--body);
  max-width: 640px;
}

/* ---------- Loom ---------- */

.loom-section { padding-top: 8px; padding-bottom: 72px; }
.loom {
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-image: repeating-linear-gradient(90deg, transparent 0 19px, rgba(38, 36, 31, 0.16) 19px 21px, transparent 21px 24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.thread {
  display: flex;
  align-items: center;
  gap: 14px;
}
.thread i {
  display: block;
  height: 12px;
  width: var(--len);
  border-radius: 0 6px 6px 0;
  background-image: repeating-linear-gradient(90deg, var(--c) 0 14px, transparent 14px 26px, var(--c) 26px 48px);
  background-position: var(--off, 0) 0;
}
.thread span {
  flex: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  padding: 2px 6px;
}
.t-klarlog    { --c: #1E2A5A; --len: 58%; }
.t-keystone   { --c: #7E9B76; --len: 71%; --off: 24px; }
.t-lumineus   { --c: #0F6F74; --len: 86%; }
.t-tabulia    { --c: #4F9A9C; --len: 79%; --off: 24px; }
.t-chronology { --c: #2F5D8A; --len: 64%; }
.t-mediator   { --c: #E3934A; --len: 52%; --off: 24px; }

/* ---------- Section heads ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.section-head h2,
.band h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 44px;
  letter-spacing: -0.01em;
}
.section-head p { font-size: 16px; color: var(--muted); }

/* ---------- Work ---------- */

.work {
  padding-top: 24px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 23px;
  text-decoration: none;
}
.btn svg { flex: none; }
.btn-primary { background: var(--accent); color: var(--vellum); }
.btn-primary:hover { background: var(--accent-hover); color: var(--vellum); }
.btn-tint {
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.btn-tint:hover { background: #DCEDEC; color: var(--accent-hover); }
.btn-outline {
  align-self: flex-start;
  border: 1.5px solid var(--cta-border);
  color: var(--cta-text);
}
.btn-outline:hover { background: var(--paper); color: var(--cta-text); }
.btn-outline:focus-visible { outline-color: var(--cta-border); }

.featured {
  background: var(--vellum);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: stretch;
}
.featured-text {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.featured .eyebrow-sm {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.featured h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.15;
}
.featured h3 span { font-weight: 400; color: #8A8378; }
.featured-text > p:not(.eyebrow-sm):not(.platforms) {
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
}
.featured-text strong { font-weight: 600; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.platforms { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Lumineus + Tabulia mini preview */
.pv-search {
  flex: 1 1 380px;
  background: var(--paper);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pv-search .box {
  background: var(--vellum);
  border: 1px solid var(--field-border);
  border-radius: 23px;
  padding: 12px 18px;
  font-size: 15px;
  color: #6F6B65;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pv-search .answer {
  background: var(--vellum);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pv-search .answer-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9C9891;
}
.bar { height: 9px; background: #E9E1D0; border-radius: 5px; }
.bar-line { display: flex; align-items: center; gap: 8px; }
.cite {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  padding: 1px 8px;
}
.pv-search .sources { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-search .source {
  flex: 1 1 140px;
  background: var(--vellum);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pv-search .source .bar { height: 8px; border-radius: 4px; }
.pv-search .source span { font-family: var(--mono); font-size: 11px; color: #6F6B65; }

/* Four app cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}
.card {
  background: var(--vellum);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card .title-row { display: flex; align-items: center; gap: 10px; }
.card .title-row i { width: 22px; height: 6px; border-radius: 3px; background: var(--bar); }
.card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
}
.card > p:not(.status) { font-size: 16px; line-height: 1.55; color: var(--body); }
.card .status {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.card--keystone   { --bar: #7E9B76; --cta-border: #5F7B58; --cta-text: #3F5A39; }
.card--klarlog    { --bar: #1E2A5A; --cta-border: #1E2A5A; --cta-text: #1E2A5A; }
.card--chronology { --bar: #2F5D8A; --cta-border: #2F5D8A; --cta-text: #2F5D8A; }
.card--mediator   { --bar: #F2A65A; --cta-border: #B5651D; --cta-text: #8A4A12; }

.preview {
  border-radius: 12px;
  height: 168px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* KeyStone preview */
.pv-keystone { background: #F4F3EE; padding: 18px; gap: 12px; }
.pv-keystone .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pv-keystone .chip {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--ink-c);
}
.pv-keystone .days { display: flex; gap: 5px; }
.pv-keystone .days span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.5px solid var(--dot);
}
.pv-keystone .days span.on { background: var(--dot); }
.v-family { --fill: #E1F5EE; --ink-c: #085041; --dot: #1D9E75; }
.v-health { --fill: #EAF3DE; --ink-c: #27500A; --dot: #639922; }
.v-work   { --fill: #FAEEDA; --ink-c: #633806; --dot: #BA7517; }

/* KlarLog preview */
.pv-klarlog { background: #1E2A5A; padding: 16px; gap: 8px; }
.pv-klarlog .brandline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #E6EAF5;
  font-size: 13px;
  font-weight: 600;
}
.pv-klarlog .item {
  background: #FFFFFF;
  border: 1px solid #CBD5E0;
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pv-klarlog .item .bar { height: 8px; width: var(--w); background: #E2E8F0; border-radius: 4px; }
.pv-klarlog .state { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--sc); }
.pv-klarlog .state i { width: 7px; height: 7px; border-radius: 50%; background: var(--sd); }

/* Chronology preview */
.pv-chronology { background: #F3F3F1; padding: 18px 16px; gap: 12px; }
.pv-chronology .event {
  background: #FFFFFF;
  border: 1px solid #2F5D8A;
  border-radius: 6px;
  padding: 8px 10px;
  align-self: center;
  width: 130px;
  box-sizing: border-box;
}
.pv-chronology .event b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  color: #1C1C1A;
}
.pv-chronology .event span { font-size: 11px; color: #3D3D3A; }
.pv-chronology .line {
  position: relative;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pv-chronology .line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 2px;
  background: #8A8984;
}
.pv-chronology .line i {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--d);
}
.pv-chronology .line i.sel { box-shadow: 0 0 0 3px #EAF0F6; }
.pv-chronology .years {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #5E5E5A;
  font-variant-numeric: tabular-nums;
}

/* Mediator preview */
.pv-mediator { background: #0E1012; padding: 14px; gap: 8px; }
.pv-mediator .wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  background: #171A1E;
  border: 1px solid var(--wc);
  border-radius: 6px;
  padding: 0 8px;
  overflow: hidden;
}
.pv-mediator .wave.a { --wc: #F2A65A; }
.pv-mediator .wave.b { --wc: #6CBDF5; }
.pv-mediator .wave span {
  flex: 1;
  height: var(--h);
  border-radius: 1px;
  background: #3A4048;
}
.pv-mediator .wave span.on { background: var(--wc); }
.pv-mediator .pads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pv-mediator .pads span {
  font-size: 11px;
  font-weight: 500;
  color: var(--pc);
  border: 1.5px solid var(--pc);
  border-radius: 6px;
  padding: 6px 0;
  text-align: center;
}

/* ---------- For others ---------- */

.for-others {
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.for-others .section-head { border-top: 1px solid var(--border); padding-top: 48px; }
.others-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.client {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.client .eyebrow-sm {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.client h3 { font-family: var(--display); font-weight: 600; font-size: 24px; }
.client p:last-child { font-size: 16px; line-height: 1.55; color: var(--body); }

/* ---------- Principles ---------- */

.band { background: var(--band); padding: 80px 24px; }
.band-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 36px;
}
.rule {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 2px solid var(--ink);
  padding-top: 20px;
}
.rule .num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.rule h3 { font-family: var(--display); font-weight: 600; font-size: 24px; }
.rule p { font-size: 16px; line-height: 1.6; color: var(--body); }

/* ---------- EU ---------- */

.eu {
  padding-top: 88px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.eu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.eu-card {
  background: var(--vellum);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.eu-card svg { stroke: var(--eu-icon); }
.eu-card h3 { font-family: var(--display); font-weight: 600; font-size: 22px; }
.eu-card p { font-size: 16px; line-height: 1.6; color: var(--body); }

/* ---------- Studio ---------- */

.studio {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}
.name-block { flex: 1 1 100%; display: flex; flex-direction: column; gap: 12px; }
.name-line {
  font-family: var(--display);
  font-size: clamp(18px, 3.4vw, 44px);
  line-height: 1.3;
  white-space: nowrap;
}
.name-line em { color: var(--accent); }
.studio-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.studio-text p { font-size: 18px; line-height: 1.65; color: var(--body); }

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

.site-footer { background: var(--ink); color: var(--paper); padding: 80px 24px 40px; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px 24px;
}
.footer-intro { flex: 1 1 280px; display: flex; flex-direction: column; gap: 16px; }
.form-note { font-size: 15px; line-height: 1.55; color: var(--footer-muted); max-width: 360px; }
.contact-form {
  flex: 1 1 360px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form .field { display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-size: 14px; font-weight: 500; color: var(--footer-muted); }
.contact-form input,
.contact-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 10px 14px;
}
.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-form button:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.contact-form button {
  align-self: flex-start;
  min-height: 44px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 23px;
  padding: 14px 24px;
  cursor: pointer;
}
.contact-form button:hover { background: #fff; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { font-size: 14px; font-weight: 500; color: #F2B8A0; }

/* The same form on the paper background (the conversation page) */
.contact-form.light label { color: var(--muted); }
.contact-form.light input,
.contact-form.light textarea { background: var(--vellum); border-color: var(--border-strong); }
.contact-form.light button { background: var(--ink); color: var(--vellum); }
.contact-form.light button:hover { background: #000; }
.contact-form.light input:focus-visible,
.contact-form.light textarea:focus-visible,
.contact-form.light button:focus-visible { outline-color: var(--accent); }
.contact-form.light .form-error { color: #9A3B1B; }

/* A conversation, the page behind the link in our reply */
.thread-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.turn { background: var(--vellum); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.turn.ours { background: var(--accent-tint); border-color: var(--accent-border); }
.turn .who { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.turn .said { white-space: pre-wrap; font-size: 16px; line-height: 1.55; color: var(--body); }
.notice .contact-form { max-width: 640px; flex: none; }

/* Result page of contact.php */
.notice { padding-top: 56px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 24px; }
.notice h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.footer-top h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--body);
  padding-top: 24px;
  font-size: 14px;
  color: var(--footer-muted);
}
.footer-bottom .mono { font-family: var(--mono); }
