/* Axon Tech home: the brand. Tokens live in styles.css. */
html, body { overflow-x: clip; }
.b-label { font-size: var(--t-small); font-weight: 560; color: var(--ink-2); letter-spacing: 0; }
.b-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-4) var(--s-6); }
.b-actions .btn { min-height: 52px; padding: 0 26px; font-size: 1.0625rem; border-radius: 999px; }

/* ── Hero: the word, then the fibre ───────────────────────── */
.b-hero {
  position: relative; text-align: center; padding: clamp(40px, 9vh, 112px) var(--gutter) 0;
  min-height: calc(100svh - 64px); min-height: max(640px, calc(100svh - 64px));
}
.b-hero > :not(.fibre) { position: relative; z-index: 1; }
.b-hero h1 {
  font-size: clamp(2.75rem, 1.4rem + 5vw, 6rem);
  line-height: 0.98; letter-spacing: -0.045em; font-weight: 660;
  padding-bottom: 0.06em; /* descender of the comma */
}
.b-sub { text-wrap: balance;
  margin: clamp(20px, 3vh, 32px) auto 0; max-width: 33ch;
  font-size: clamp(1.1875rem, 1rem + .55vw, 1.5rem); line-height: 1.42; color: var(--ink-2); letter-spacing: -0.012em;
}
.b-hero .b-actions { margin-top: clamp(24px, 4vh, 40px); }
.fibre { --shift: 0.27; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }
.fibre canvas, .fibre .poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fibre .poster { object-fit: cover; object-position: 50% 50%; transition: opacity .6s var(--ease-out); }
.fibre.live .poster { opacity: 0; }
.fibre::after { /* the page's own white closes over the fibre's far ends */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, #fff, transparent 9%, transparent 91%, #fff);
}

/* ── Vision: words that light as you read ─────────────────── */
.b-vision { max-width: var(--page); margin: 0 auto; padding: clamp(104px, 16vh, 200px) var(--gutter) clamp(104px, 14vh, 168px); }
.lit {
  margin-top: var(--s-5); max-width: 27ch;
  font-size: clamp(1.75rem, 1.1rem + 2vw, 3.25rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 620;
  color: var(--ink);
}
.js .lit .w { color: oklch(63% 0.006 250); transition: color .5s var(--ease-out); }
.js .lit .w.on { color: var(--ink); }

/* ── Principles ───────────────────────────────────────────── */
.b-principles { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) clamp(104px, 16vh, 200px); }
.b-principles > h2 { font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.04em; font-weight: 620; max-width: 16ch; }
.principles { margin-top: var(--s-7); border-bottom: 1px solid var(--rule); }
.principles article {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-6); align-items: start;
  border-top: 1px solid var(--rule); padding: clamp(28px, 4vw, 48px) 0;
}
.principles h3 { font-size: clamp(2.5rem, 1.4rem + 3vw, 5rem); letter-spacing: -0.045em; font-weight: 650; line-height: .95; }
.principles p { padding-top: clamp(4px, 0.6vw, 12px); color: var(--ink-2); font-size: clamp(1.0625rem, .95rem + .35vw, 1.3125rem); line-height: 1.5; max-width: 34ch; }

/* ── PAC: the first instrument ────────────────────────────── */
.b-pac { background: var(--ground-2); }
.tile {
  max-width: var(--page); margin: 0 auto; padding: clamp(96px, 14vh, 168px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: var(--s-7); align-items: center; perspective: 1600px;
}
.pac-word { font-size: clamp(3.25rem, 1.6rem + 4.5vw, 6.5rem); line-height: .88; letter-spacing: -0.055em; font-weight: 680; margin-top: var(--s-4); }
.tile-lead { margin-top: var(--s-6); font-size: clamp(1.375rem, 1.05rem + .9vw, 1.875rem); line-height: 1.25; letter-spacing: -0.025em; font-weight: 560; max-width: 22ch; }
.tile-text { margin-top: var(--s-4); color: var(--ink-2); max-width: 40ch; }
.tile .btn { margin-top: var(--s-6); border-radius: 999px; }

.paper { justify-self: center; width: min(470px, 100%); transform-style: preserve-3d; }
.sheet {
  background: #fff; border-radius: 8px; padding: 30px 28px 26px; font-size: 11.5px; color: #222;
  box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 50px 80px -40px oklch(28% 0.03 250 / .45), 0 0 0 1px #ececec;
  transform: rotateX(5deg) rotateY(-9deg) rotateZ(1deg); display: flex; flex-direction: column; gap: 12px;
  transition: transform .6s var(--ease-out);
}
.sheet-head { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #111; padding-bottom: 8px; font-size: 15px; }
.sheet-who { font-weight: 600; font-size: 13px; }
.sheet-what { color: #555; }
.sheet-grid { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 6px 12px; padding: 10px 0; border-top: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; }
.sheet-grid span { color: #555; }
.sheet-text { display: grid; gap: 6px; font-size: 11px; line-height: 1.4; color: #444; }
.sheet-text b { color: #111; font-weight: 600; }
.sheet-scans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.sheet-scans figure { border-radius: 4px; border: 1px solid #e3e3e3; overflow: hidden; background: #fafafa; }
.sheet-scans figure svg { width: 100%; height: auto; aspect-ratio: 6 / 7; display: block; }
.sheet-scans figcaption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: #555; padding: 4px 6px; border-top: 1px solid #ececec; background: #fff; }
.sheet-sign { margin-top: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; border-top: 1px solid #e5e5e5; padding-top: 10px; }
.sheet-sign b { color: #0d4b2a; font-size: 15px; }
.sheet-sign span { color: #555; }

/* ── Origin ───────────────────────────────────────────────── */
.b-origin { max-width: var(--page); margin: 0 auto; padding: clamp(104px, 16vh, 200px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s-8); align-items: end; }
.b-origin h2 { font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.04em; font-weight: 620; max-width: 13ch; }
.origin-copy p { margin-top: var(--s-5); font-size: clamp(1.1875rem, 1rem + .5vw, 1.4375rem); line-height: 1.5; letter-spacing: -0.012em; max-width: 42ch; }
.facts { border-top: 1.5px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); font-size: var(--t-small); }
.facts dt { color: var(--ink-2); }

/* ── Coda ─────────────────────────────────────────────────── */
.b-coda { padding: 0 0 clamp(120px, 18vh, 200px); }
.b-coda .coda-inner { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.b-coda h2 { margin-top: var(--s-6); font-size: clamp(2.5rem, 1.5rem + 3vw, 4.75rem); line-height: 1.0; letter-spacing: -0.04em; font-weight: 650; }
.b-coda .coda-inner > p { margin: var(--s-5) 0 0; color: var(--ink-2); font-size: var(--t-lead); max-width: 40ch; }
.b-coda .b-actions { margin-top: var(--s-6); justify-content: flex-start; }
.coda-nerve {
  position: relative; width: min(720px, 100%); margin: 0 auto; color: var(--ink);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}
.coda-nerve svg { width: 100%; height: auto; display: block; }
.coda-sheaths rect { fill: #f3e8de; stroke: #d6bfae; stroke-width: 1; }
.coda-spark {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--impulse); box-shadow: 0 0 0 5px color-mix(in oklch, var(--impulse) 18%, transparent);
  left: calc(100% * 360 / 720);
}
@media (prefers-reduced-motion: no-preference) {
  .coda-spark { animation: saltatory 7.2s infinite; left: 0; }
  @keyframes saltatory {
    0%, 9% { left: calc(100% * 120 / 720); animation-timing-function: cubic-bezier(.7, 0, .3, 1); }
    14%, 23% { left: calc(100% * 240 / 720); animation-timing-function: cubic-bezier(.7, 0, .3, 1); }
    28%, 37% { left: calc(100% * 360 / 720); animation-timing-function: cubic-bezier(.7, 0, .3, 1); }
    42%, 51% { left: calc(100% * 480 / 720); animation-timing-function: cubic-bezier(.7, 0, .3, 1); }
    56%, 65% { left: calc(100% * 600 / 720); animation-timing-function: cubic-bezier(.7, 0, .3, 1); }
    72%, 100% { left: calc(100% * 600 / 720); opacity: 0; }
  }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tile { grid-template-columns: 1fr; }
  .paper { width: min(440px, 100%); }
}
@media (max-width: 760px) {
  .b-origin { grid-template-columns: 1fr; gap: var(--s-6); }
  .sheet { transform: rotateX(6deg) rotateZ(1deg); }
}
@media (max-width: 520px) {
  .principles article { grid-template-columns: 1fr; gap: var(--s-4); }
  .b-actions { flex-direction: column; gap: var(--s-4); }
}
@media (forced-colors: active) {
  .coda-spark { forced-color-adjust: none; background: Highlight; }
  .sheet { outline: 1px solid CanvasText; }
}

/* Portrait screens: the fibre gets its own band under the words. */
@media (max-aspect-ratio: 1/1) {
  .b-hero { min-height: 0; padding-bottom: clamp(240px, 52vw, 440px); }
  .fibre { --shift: 0.06; top: auto; height: calc(clamp(240px, 52vw, 440px) + 56px); }
  .b-vision { padding-top: clamp(56px, 7vh, 104px); }
}

/* The node, up close */
.b-node { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) clamp(104px, 16vh, 200px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-7); align-items: end; }
.b-node figure { grid-column: 2; }
.b-node img { width: 100%; height: auto; display: block; aspect-ratio: 1; }
.b-node .node-caption { grid-column: 1; grid-row: 1; align-self: end; max-width: 30ch; font-size: clamp(1.1875rem, 1rem + .5vw, 1.4375rem); line-height: 1.45; letter-spacing: -0.012em; color: var(--ink); }
.b-node .node-caption b { font-weight: 620; }
@media (max-width: 760px) { .b-node { grid-template-columns: 1fr; } .b-node figure, .b-node .node-caption { grid-column: 1; grid-row: auto; } }

/* Coda: the fibre comes to rest, then the invitation */
.coda-fibre { display: block; width: 100%; height: auto; aspect-ratio: 1440 / 300; object-fit: cover; }
.coda-fibre { -webkit-mask-image: linear-gradient(to right, transparent 8%, #000 34%); mask-image: linear-gradient(to right, transparent 8%, #000 34%); }
/* Stills melt into the page: no hard image edges around glass. */
.b-node img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}
.b-node { align-items: center; }
.b-node .node-caption { align-self: center !important; }
.coda-fibre {
  -webkit-mask-image: linear-gradient(to right, transparent 10%, #000 38%), linear-gradient(to bottom, #000 70%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 10%, #000 38%), linear-gradient(to bottom, #000 70%, transparent);
  mask-composite: intersect;
}
/* "Our vision" stays legible wherever the fibre passes: a quiet frosted pill. */
.b-hero .b-actions .link {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 999px;
  text-decoration: none; background: rgb(255 255 255 / .86); border: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color .18s var(--ease-out);
}
.b-hero .b-actions .link:hover { border-color: var(--ink); }

/* ── Products: one discipline at a time ───────────────────── */
.b-products { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) clamp(104px, 16vh, 200px); }
.b-products > h2 { font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.04em; font-weight: 620; max-width: 14ch; }
.products-lead { margin-top: var(--s-5); color: var(--ink-2); font-size: var(--t-lead); line-height: 1.5; max-width: 40ch; }
.domains { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.domains a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  border-top: 1.5px solid var(--ink); padding: var(--s-5) 0 var(--s-2);
}
.d-for { font-size: var(--t-small); color: var(--ink-2); }
.d-name { margin-top: var(--s-4); font-size: clamp(2.25rem, 1.5rem + 2vw, 3.75rem); line-height: .95; letter-spacing: -0.045em; font-weight: 660; }
.d-next { color: oklch(60% 0.006 250); }
.d-what { margin-top: var(--s-5); color: var(--ink-2); line-height: 1.5; max-width: 30ch; flex: 1; }
.d-state {
  margin-top: var(--s-5); align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--t-small); color: var(--ink); padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule);
  transition: border-color .2s var(--ease-out);
}
.d-state.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--impulse); }
.domains a:hover .d-state { border-color: var(--ink); }
.domains a:hover .d-name:not(.d-next) { color: var(--ink); }
.domains a:hover .d-next { color: var(--ink-2); }
.domains a:active .d-state { transform: scale(.97); }

/* ── Clinic: the second tile, mirrored ────────────────────── */
.b-clinic { background: var(--ground); }
.tile.flip { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); }
.tile.flip .board { grid-column: 1; grid-row: 1; }
.board { justify-self: center; width: min(470px, 100%); margin: 0; }
.board-inner {
  background: #fff; border-radius: 14px; padding: 24px 22px 18px; font-size: 13px; color: #222;
  box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 50px 80px -40px oklch(28% 0.03 250 / .45), 0 0 0 1px #ececec;
  transform: rotateX(5deg) rotateY(9deg) rotateZ(-1deg);
}
.board-head { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; padding-bottom: 12px; font-size: 15px; }
.board-head span { color: #666; font-size: 12px; }
.board-steps { list-style: none; margin: 0; padding: 10px 0 12px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #e8e8e8; }
.board-steps li { position: relative; padding-top: 14px; font-size: 11px; color: #5f5f5f; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-steps li::before { content: ""; position: absolute; top: 3px; left: 0; right: 0; height: 1.5px; background: #e2e2e2; }
.board-steps li::after { content: ""; position: absolute; top: 0; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #c9c9c9; }
.board-steps li.here { color: #111; font-weight: 600; }
.board-steps li.here::after { background: var(--impulse); box-shadow: 0 0 0 4px color-mix(in oklch, var(--impulse) 18%, transparent); }
.board-rows { list-style: none; margin: 0; padding: 0; }
.board-rows li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid #efefef; }
.board-rows .tok { color: #666; font-size: 12px; }
.board-rows .who { font-weight: 560; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-rows .who small { display: block; font-weight: 400; color: #5f5f5f; font-size: 11.5px; }
.board-rows .st { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: #f4f4f5; color: #444; white-space: nowrap; }
.board-rows .st.now { background: color-mix(in oklch, var(--impulse) 13%, #fff); color: oklch(42% 0.14 40); font-weight: 560; }
.board-rows .st.blue { background: color-mix(in oklch, #2563a8 14%, #fff); color: #1c4e86; }
.board-rows .st.amber { background: color-mix(in oklch, #c77d20 18%, #fff); color: #8a5510; }
.board-rows li.done .who { color: #5f5f5f; font-weight: 400; }
.board-rows li.done .st { background: color-mix(in oklch, #12a05c 13%, #fff); color: #0a6b3e; }
.board-foot { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding-top: 12px; border-top: 1px solid #efefef; font-size: 11.5px; color: #666; }
.board-foot svg { width: 11px; height: 13px; flex: none; }

@media (max-width: 1100px) {
  .tile.flip { grid-template-columns: 1fr; }
  .tile.flip .board { grid-column: auto; grid-row: auto; }
}
@media (max-width: 860px) {
  .domains { grid-template-columns: 1fr; gap: var(--s-6); }
  .d-what { max-width: 40ch; }
}
@media (max-width: 760px) { .board-inner { transform: rotateX(6deg) rotateZ(-1deg); } }
@media (forced-colors: active) { .board-inner { outline: 1px solid CanvasText; } }
@media (prefers-reduced-motion: no-preference) { .sheet, .board-inner { transition: transform .35s var(--ease-out); } }
.clinic-word { letter-spacing: -0.045em; } /* lowercase needs air: l and i touch at PAC's tracking */
.d-name { letter-spacing: -0.045em; }
