/* Cormorant trimmed to the four capitals the site sets in it, A, I, R and T, and the space; a new name each time it changes, since fonts are cached for a year. */
@font-face {
  font-family: "Cormorant";
  src: url("fonts/cormorant-arit.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020, U+0041, U+0049, U+0052, U+0054;
}

/*
  Ivory by default and near-black when the visitor's device asks for dark. theme.js sets data-theme on <html> to the visitor's choice,
  auto, light or dark; without JavaScript there is no data-theme and the device's setting applies.
*/
:root {
  --ground: #fcfaf6;
  --surface: #ffffff;
  --ink: #1d1813;
  --muted: #5f5546;
  --accent: #7a5c1e;
  --on-accent: #faf6ee;
  /* For lines only (the hero illustration, control borders); too light for text. */
  --ornament: #a8843f;
  --rule: rgba(122, 92, 30, 0.25);
  --glow: rgba(168, 132, 63, 0.22);
  /* The emblem image (medallion, orbits, traces and the arched ARITIA): a brighter, lit gold with a tight glow. Not for text. */
  --emblem: #b07f00;
  --emblem-glow: rgba(255, 190, 40, 0.6);

  /* Spacing: --space-N is N quarter-rems. */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Type sizes, by role. Fluid sizes use rem at both ends so browser zoom still enlarges them. */
  --step-small: 0.875rem;
  --step-nav: 0.95rem;
  --step-base: 1.0625rem;
  --step-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --step-h3: 1.25rem;
  --step-email: clamp(1.25rem, 1rem + 1.4vw, 2rem);
  --step-h2: clamp(2.25rem, 1.6rem + 3vw, 4.25rem);
  --step-hero: clamp(2.75rem, 1.7rem + 4.8vw, 5.75rem);

  /* Letter spacing for the spaced capitals. */
  --track-label: 0.2em;
  --track-footer: 0.18em;

  --measure: 38rem;
  --page: 76rem;
  /* The header's emblem mark, and the header's height: the mark and the header's padding above and below it. */
  --mark: 2.75rem;
  --header: calc(var(--mark) + 2 * var(--space-3));
  --radius: 1.25rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  color-scheme: light dark;
}

/* :where() keeps these at the plain :root's weight, so the print rules below still win. */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --ground: #14110d;
    --surface: #17140f;
    --ink: #f3ede2;
    --muted: #b3a893;
    --accent: #cc9640;
    --on-accent: #0d0b09;
    --ornament: #a97d33;
    --rule: rgba(204, 150, 64, 0.28);
    --glow: rgba(204, 150, 64, 0.32);
    --emblem: #dca443;
    --emblem-glow: rgba(240, 175, 50, 0.55);
  }
}

/* The Dark choice: the same colours as above. */
:root:where([data-theme="dark"]) {
  --ground: #14110d;
  --surface: #17140f;
  --ink: #f3ede2;
  --muted: #b3a893;
  --accent: #cc9640;
  --on-accent: #0d0b09;
  --ornament: #a97d33;
  --rule: rgba(204, 150, 64, 0.28);
  --glow: rgba(204, 150, 64, 0.32);
  --emblem: #dca443;
  --emblem-glow: rgba(240, 175, 50, 0.55);

  color-scheme: dark;
}

:root:where([data-theme="light"]) {
  color-scheme: light;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
.showcase-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Layout */
/* main takes the spare height, so the footer sits at the foot of short pages. */
main {
  flex: 1;
}

.skip {
  position: absolute;
  inset-inline-start: var(--space-4);
  inset-block-start: -10rem;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  z-index: 3;
}

.skip:focus {
  inset-block-start: var(--space-4);
}

/* The header spans the screen so its ground covers what scrolls under it; its padding lines the mark and links up with the page's column. */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) 0;
  padding: var(--space-3) max(var(--space-6), calc((100% - var(--page)) / 2 + var(--space-6)));
  background: var(--ground);
}

/* The narrowest phones need every pixel for the mark, the links and the light and dark choices; from 24rem up there is room for gaps. */
@media (width >= 24rem) {
  .top {
    column-gap: var(--space-4);
  }
}

/* It stays at the top while the page scrolls, except on short screens (a phone on its side, or a big zoom), where it would take too much of the view. */
@media (height >= 30rem) {
  html {
    scroll-padding-block-start: var(--header);
  }

  .top {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
  }
}

/* The links sit at the far end, followed by the light and dark choices when they show. */
.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin-inline-start: auto;
}

/* Each part of the home page fills at least the screen below the header, its content in the middle; longer content makes it taller. */
.hero,
.section {
  min-height: calc(100vh - var(--header));
  min-height: calc(100svh - var(--header));
}

.section {
  display: grid;
  align-content: center;
  max-width: var(--page);
  margin-inline: auto;
  padding: var(--space-24) var(--space-6);
}

footer {
  padding: var(--space-8) var(--space-6) var(--space-12);
  border-block-start: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--step-small);
  letter-spacing: var(--track-footer);
  text-align: center;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

/* Components */
/* The emblem's medallion as the header's mark, in the emblem's gold with a fine glow; on the home page it is where the opening's emblem lands. */
.mark {
  border-radius: 50%;
}

.mark svg {
  display: block;
  width: var(--mark);
  height: var(--mark);
  color: var(--emblem);
  filter: drop-shadow(0 0 0.0625rem var(--emblem-glow));
}

/*
  The light and dark choices (theme.js): Auto, Light and Dark as one small pill of round buttons in the accent gold, the picked one filled,
  as tall as a header link's line and with icons at its text size, so it sits in line with About and Work.
  The pill's edge is an inset shadow so it adds nothing to the header's height.
*/
.theme-switch {
  display: flex;
  margin-inline-start: var(--space-2);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--ornament);
}

.theme-choice {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--space-6);
  height: var(--space-6);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: var(--step-nav);
  cursor: pointer;
}

/* Each button takes taps over the header mark's 44 px height, above and below its small circle, without looking any bigger. */
.theme-choice::after {
  content: "";
  position: absolute;
  inset: calc((var(--space-6) - var(--mark)) / 2) 0;
}

.theme-choice:hover,
.theme-choice:focus-visible {
  background: var(--rule);
}

/* The picked choice, read from <html> so it shows from the first paint; theme.js also sets aria-pressed for screen readers. */
[data-theme="auto"] .theme-choice[data-choice="auto"],
[data-theme="light"] .theme-choice[data-choice="light"],
[data-theme="dark"] .theme-choice[data-choice="dark"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* The icons at the links' text size, their lines about as heavy as the links' letters. */
.theme-choice svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Without JavaScript there is no data-theme, so the choices stay hidden. */
:root:not([data-theme]) .theme-switch {
  display: none;
}

.top nav a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--ink);
  font-size: var(--step-nav);
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 0.35em;
}

.top nav a:hover,
.top nav a:focus-visible,
.top nav a[aria-current] {
  color: var(--accent);
}

.top nav a[aria-current] {
  text-decoration-color: currentColor;
}

/* The padding makes each link about 44 px tall for thumbs. */
footer a {
  display: inline-block;
  padding-block: var(--space-3);
  color: var(--muted);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 0.35em;
}

footer a:hover,
footer a:focus-visible,
footer a[aria-current="page"] {
  text-decoration-color: currentColor;
}

footer nav span {
  margin-inline: 0.6em;
}

.section-label {
  margin: 0 0 var(--space-4);
  color: var(--accent);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 2rem var(--glow);
}

.button-ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

/*
  The copy buttons beside the email address (copy-email.js): in running text a small round button with a gold ring, as tall as
  the light and dark choices, its icon at their size; its negative margin keeps the line no taller. Its two icon looks, ready
  and copied, share one cell, so the button keeps its size when it changes; the failed look widens it into a pill around its
  words. Without JavaScript the buttons stay hidden.
*/
.copy-email {
  display: inline-grid;
  place-items: center;
  min-width: var(--space-6);
  min-height: var(--space-6);
  margin-block: calc(var(--space-2) / -2);
  margin-inline-start: var(--space-2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ornament);
  color: var(--accent);
  font-size: var(--step-nav);
  vertical-align: middle;
  cursor: pointer;
}

.copy-email[hidden] {
  display: none;
}

/* :where() keeps this at a class's weight, so the large button below keeps its own ground. The failed look's words get no tint, which would take them under 4.5:1. */
.copy-email:where(:hover, :focus-visible):where(:not(.is-failed)) {
  background: var(--rule);
}

.copy-email > * {
  grid-area: 1 / 1;
}

.copy-email svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-email-done,
.copy-email.is-copied .copy-email-ready {
  visibility: hidden;
}

.copy-email.is-copied .copy-email-done {
  visibility: visible;
}

.copy-email-failed,
.copy-email.is-failed svg {
  display: none;
}

.copy-email.is-failed .copy-email-failed {
  display: block;
}

/* The failed look: its words in the page's own type, in a pill as wide as they need, wrapping inside it only where the pill alone is wider than the column. */
.copy-email.is-failed {
  padding-inline: var(--space-2);
  border-radius: 999px;
  font-family: inherit;
  font-size: var(--step-small);
  white-space: normal;
}

/* Heard by screen readers only. */
.copy-email-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lede,
.hero-lede,
.section-lede {
  max-width: var(--measure);
  margin: var(--space-6) 0 0;
  color: var(--muted);
  font-size: var(--step-lead);
}

/* Home: opening section */
.hero {
  display: grid;
  gap: var(--space-12);
  align-content: center;
  align-items: center;
  max-width: var(--page);
  margin-inline: auto;
  padding: var(--space-12) var(--space-6);
}

@media (width >= 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

/*
  Safari keeps the vw part of a zoomed font size at its unzoomed size, so at 300% zoom "Considered" can be wider than the screen.
  The column may then shrink to the screen and the word breaks, rather than the page scrolling sideways (WCAG 1.4.10).
*/
.hero-text {
  min-width: 0;
}

.hero h1 {
  font-size: var(--step-hero);
  overflow-wrap: break-word;
}

/* Gold text with a soft glow behind it. */
.shine {
  color: var(--accent);
  text-shadow: 0 0 2.5rem var(--glow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-8) 0 0;
}

/* The illustration: the emblem in a glow, with orbits and circuit traces drawn around it. */
.art {
  display: grid;
  place-items: center;
  width: min(100%, 30rem);
  margin-inline: auto;
  pointer-events: none;
}

.art > * {
  grid-area: 1 / 1;
}

.art-glow {
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
}

.orbits {
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--emblem);
}

/* The centre of the orbits' 400-unit drawing, so they turn about the emblem. */
.orbit {
  stroke-width: 1;
  stroke-dasharray: 2 10;
  transform-origin: 200px 200px;
}

.orbit-b {
  stroke-dasharray: 30 14 4 14;
  opacity: 0.6;
}

.traces path {
  stroke-width: 1.5;
  opacity: 0.7;
}

.pulses circle,
.pixels-float rect,
.orbit-icon-line,
.motion-draw .pads > *,
.motion-draw .pixels > * {
  transform-box: fill-box;
  transform-origin: center;
}

.pulses circle {
  fill: var(--emblem);
  stroke: none;
}

.pixels-float rect {
  fill: var(--emblem);
  stroke: none;
  opacity: 0.7;
}

/*
  The icons that take turns on the dots (orbit-icons.js): gold line drawings, each on a plate of the ground that the ring and trace pass behind.
  The snow, scan lines and line over the picture show only while the channel changes.
*/
.orbit-icons {
  stroke: none;
}

.orbit-icon {
  opacity: 0;
}

.orbit-icon.is-shown {
  opacity: 1;
}

.orbit-icon-plate {
  fill: var(--ground);
}

.orbit-icon-picture path {
  stroke: var(--emblem);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.orbit-icon-picture .orbit-icon-solid {
  fill: var(--emblem);
  stroke: none;
}

.orbit-icon-snow,
.orbit-icon-scan,
.orbit-icon-line {
  fill: var(--emblem);
  opacity: 0;
}

/* The name arched over the medallion, in spaced capitals and the emblem's gold. */
.brand-word {
  fill: var(--emblem);
  stroke: none;
  font-family: var(--serif);
  font-weight: 600;
}

.emblem {
  width: 44%;
  height: auto;
  color: var(--emblem);
  /* A fine, tight glow so the lines read as lit; two small shadows keep it crisp rather than blurry. */
  filter: drop-shadow(0 0 0.0625rem var(--emblem-glow)) drop-shadow(0 0 0.375rem var(--emblem-glow));
}

/* emblem.js glides the medallion into the header's mark from its top-left corner. */
.art .emblem {
  transform-origin: 0 0;
}

/* Home: sections */
.section h2 {
  font-size: var(--step-h2);
}

.tiles {
  display: grid;
  gap: var(--space-6);
  margin: var(--space-12) 0 0;
  padding: 0;
  list-style: none;
}

@media (width >= 48rem) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tile {
  min-width: 0;
  padding: var(--space-8);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.tile-icon {
  width: 2.5rem;
  height: 2.5rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.tile h3,
.app-text h3 {
  margin-block: var(--space-6) var(--space-2);
  font-size: var(--step-h3);
  letter-spacing: 0;
}

.tile p,
.app-text p {
  margin: 0;
  color: var(--muted);
}

/*
  Home: the apps, one carousel with one app to a slide: its three screens side by side, then its name, line and link.
  Without JavaScript it is a row that scrolls and snaps.
  --phone-gap is the space between the phones, the row's padding at its sides and how far each phone's glow reaches,
  so a glow never falls on the next phone or is cut off at the row's edge.
*/
.showcase {
  --phone-gap: var(--space-2);
  margin-block-start: var(--space-12);
}

.showcase-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--space-8);
  margin: 0;
  padding: var(--space-8) var(--phone-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}

.slide {
  scroll-snap-align: center;
  min-width: 0;
}

/* An app's three screens, each at most 13rem wide, closer together on narrow screens so all three fit beside each other. */
.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 13rem));
  justify-content: center;
  gap: var(--phone-gap);
  margin: 0 0 var(--space-8);
  padding: 0;
  list-style: none;
}

@media (width >= 48rem) {
  .showcase {
    --phone-gap: var(--space-6);
  }
}

/* Each screen's column is a container, so the phone's corners, padding and "Coming soon" scale with its width (cqi, 1% of it) and match the 13rem phone at full size. */
.screens > li {
  container-type: inline-size;
}

/* A phone frame at a phone screen's proportions (390 x 844). */
.phone {
  position: relative;
  aspect-ratio: 390 / 844;
  padding: min(0.55rem, 4.25cqi);
  border: 2px solid var(--rule);
  border-radius: min(2.4rem, 18.5cqi);
  background: var(--surface);
}

/* The current app's phones glow; the glow's opacity is all that changes. */
.phone::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  box-shadow: 0 0 0 2px var(--accent), 0 0 var(--phone-gap) var(--glow);
  opacity: 0;
  pointer-events: none;
}

.showcase.is-enhanced .phone {
  transform: scale(0.9);
}

.showcase.is-enhanced .is-current .phone {
  transform: none;
}

.showcase.is-enhanced .is-current .phone::after {
  opacity: 1;
}

/* The frame's corner radius less its padding, so the screen's corners follow the frame. */
.screen {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: min(1.9rem, 14.25cqi);
  object-fit: cover;
}

.screen-soon {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: min(var(--space-4), 7.7cqi);
  background:
    radial-gradient(circle at 50% 35%, var(--glow), transparent 60%),
    var(--ground);
  text-align: center;
}

.soon-mark {
  width: min(3.5rem, 27cqi);
  height: min(3.5rem, 27cqi);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: inset 0 0 0 min(6px, 2.9cqi) var(--ground), inset 0 0 0 min(8px, 3.85cqi) var(--accent);
}

/* Smaller on the narrow phones of a small screen, never under 0.6875rem (11 px), and wrapping to two lines there. */
.soon-text {
  color: var(--accent);
  font-size: clamp(0.6875rem, 6.75cqi, var(--step-small));
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* The app's name, its line and its link, under its screens. */
.app-text {
  text-align: center;
}

.app-text h3 {
  margin-block-start: 0;
}

.app-link {
  display: inline-block;
  margin-block-start: var(--space-2);
  padding-block: var(--space-2);
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.showcase-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.showcase-controls[hidden] {
  display: none;
}

.showcase-button,
.copy-email-large {
  min-width: 48px;
  min-height: 48px;
  border: 2px solid var(--ornament);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.showcase-button:hover,
.showcase-button:focus-visible,
.copy-email-large:hover,
.copy-email-large:focus-visible {
  border-color: var(--accent);
}

.showcase-dots {
  display: flex;
  gap: var(--space-2);
}

/* Each dot is a 24 px target around a small visible bar. */
.showcase-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.showcase-dot::before {
  content: "";
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: var(--muted);
}

.showcase-dot:hover::before,
.showcase-dot:focus-visible::before {
  background: var(--ink);
}

.showcase-dot[aria-current="true"]::before {
  width: 20px;
  background: var(--accent);
}

/* Home: contact, under the apps */
.contact {
  margin-block-start: var(--space-24);
  text-align: center;
}

.contact h3 {
  font-size: var(--step-h2);
}

.contact .section-lede {
  margin-inline: auto;
}

/* At most the column's width, so a narrow screen with wide text spacing wraps the address (after the @, where the page allows a break) instead of scrolling sideways. */
.email {
  display: inline-block;
  max-width: 100%;
  padding: var(--space-4) var(--space-8);
  border: 2px solid var(--accent);
  border-radius: 999px;
  font-size: var(--step-email);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 2.5rem var(--glow);
  overflow-wrap: break-word;
}

/* The address and its copy button, side by side, or the button under the address where they don't fit. */
.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  /* The 1em is the paragraph's default top margin, which this replaces, so the address stays as far under the line above as it was. */
  margin-block-start: calc(1em + var(--space-8));
}

/* Beside the large address, the copy button takes the look of the showcase's arrow buttons, with a slightly larger icon. */
.copy-email-large {
  margin: 0;
  box-shadow: none;
  font-size: var(--step-h3);
}

/* Text pages: support and privacy */
.text-page main {
  padding: var(--space-12) var(--space-6) var(--space-24);
}

.text-page article {
  max-width: var(--measure);
  margin-inline: auto;
}

.text-page h1 {
  font-size: var(--step-h2);
}

.text-page h2 {
  margin: var(--space-12) 0 var(--space-3);
  font-size: var(--step-h3);
  letter-spacing: 0;
  line-height: 1.25;
}

.text-page article p,
.text-page article ul {
  margin: 0 0 var(--space-4);
}

.text-page article ul {
  /* 1.4rem lines the bullets up under the text's left edge. */
  padding-inline-start: 1.4rem;
}

/* A little less than a paragraph's space, so list items read as one group. */
.text-page li + li {
  margin-block-start: var(--space-2);
}

.text-page li::marker {
  color: var(--accent);
}

.text-page article a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: break-word;
}

/* The address, its copy button and any punctuation straight after stay on one line together. */
.email-copy {
  white-space: nowrap;
}

/* The button and the punctuation straight after it, as one unbreakable box, so the line can break only before the button. */
.email-copy-tail {
  display: inline-block;
  white-space: nowrap;
}

/* While the button shows its failed words it may drop under the address, so the words never make the line wider than the column. */
.email-copy:has(.is-failed) {
  white-space: normal;
}

.text-page .lede {
  margin: var(--space-6) 0 var(--space-8);
}

.contact-box {
  margin: var(--space-8) 0;
  padding: var(--space-6) var(--space-8);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-box p:last-child {
  margin-block-end: 0;
}

/* Not found page */
.not-found main {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: var(--space-16) var(--space-6) var(--space-24);
  text-align: center;
}

.not-found .emblem {
  width: 7.5rem;
  margin-block-end: var(--space-8);
}

.not-found h1 {
  font-size: var(--step-h2);
}

.not-found .lede {
  margin-inline: auto;
}

/*
  Motion, only for visitors who haven't asked for less. The opening sequence runs once for about
  6.5 seconds and forms ARITIA over the emblem; then the two rings keep turning, slowly and in
  opposite directions.
*/
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* The text only rises, never fades, so it can be read from the first moment. */
  .hero-text > * {
    animation: rise 0.9s ease-out both;
  }

  .hero-text > :nth-child(2) { animation-delay: 0.13s; }
  .hero-text > :nth-child(3) { animation-delay: 0.27s; }

  /*
    Each ring turns in, then keeps turning the same way: the inner one clockwise, the outer one back.
    The turn-in fills backwards only: Safari lets a turn-in that holds its end (forwards or both)
    override the steady turn listed after it, so the rings would stop once the opening is over.
  */
  .orbit-a { animation: spin 6.5s cubic-bezier(0.3, 0, 0.2, 0.675) backwards, turn 48s linear 6.5s infinite; }
  .orbit-b { animation: spin-back 6.5s cubic-bezier(0.3, 0, 0.2, 0.74) backwards, turn-back 60s linear 6.5s infinite; }

  /*
    Until the opening's emblem lands in the corner (emblem.js marks it), the home page's corner mark waits unseen, unless it has keyboard focus,
    and the gliding medallion is lifted over the header. Without JavaScript, for reduced motion, or on short screens, where the header scrolls
    away with the page, nothing glides: the mark is simply there and the medallion stays under the header with the rest of the art.
  */
  @media (scripting: enabled) and (height >= 30rem) {
    .mark-glide:not(.is-landed, :focus-visible) svg {
      opacity: 0;
    }

    .art .emblem {
      position: relative;
      z-index: 2;
    }
  }

  /* main.js marks the illustration while it is off screen after the opening; nobody can see the rings there. */
  .art.is-offscreen .orbit {
    animation-play-state: paused;
  }

  .traces path {
    stroke-dasharray: 1;
    animation: draw 1.6s ease-out 0.53s both;
  }

  .pulses circle {
    animation: pop 0.53s ease-out both;
  }

  .pulses circle:nth-child(1) { animation-delay: 1.73s; }
  .pulses circle:nth-child(2) { animation-delay: 1.87s; }
  .pulses circle:nth-child(3) { animation-delay: 2s; }
  .pulses circle:nth-child(4) { animation-delay: 2.13s; }
  .pulses circle:nth-child(5) { animation-delay: 2.27s; }
  .pulses circle:nth-child(6) { animation-delay: 2.4s; }

  .pixels-float rect {
    animation: drift 3.2s ease-in-out 2 alternate;
  }

  /*
    An icon tunes in (is-shown) or out (is-gone) like an old television changing channels, in 0.5 s, well inside the step beside STEP_MS in
    orbit-icons.js. In: a burst of snow and rolling scan lines, then a line that springs open into the picture. Out: the picture collapses
    to a line that shrinks away, then snow, then the plain dot. Each part comes on and goes off once, so nothing flashes.
  */
  .orbit-icon.is-shown,
  .orbit-icon.is-gone,
  .orbit-icon.is-shown > *,
  .orbit-icon.is-gone > * {
    animation-duration: 0.5s;
    animation-timing-function: linear;
    animation-fill-mode: both;
  }

  .orbit-icon.is-shown { animation-name: tune-in; }
  .orbit-icon.is-gone { animation-name: tune-out; }
  .is-shown .orbit-icon-picture { animation-name: picture-in; animation-timing-function: ease-out; }
  .is-gone .orbit-icon-picture { animation-name: picture-out; animation-timing-function: ease-in; }
  .is-shown .orbit-icon-line { animation-name: line-in; }
  .is-gone .orbit-icon-line { animation-name: line-out; }
  .is-shown .orbit-icon-scan { animation-name: scan-in; }
  .is-gone .orbit-icon-scan { animation-name: scan-out; }
  /* The snow jumps from place to place rather than gliding, as static does. */
  .is-shown .orbit-icon-snow { animation-name: snow-in; animation-timing-function: steps(1); }
  .is-gone .orbit-icon-snow { animation-name: snow-out; animation-timing-function: steps(1); }

  .motion-draw .rings > *,
  .motion-draw .head > * {
    stroke-dasharray: 1;
    animation: draw 1.87s ease-in-out 0.4s both;
  }

  .motion-draw .pads > * { animation: pop 0.53s ease-out 2.13s both; }
  .motion-draw .pixels > * { animation: pop 0.4s ease-out both; }
  .motion-draw .pixels > :nth-child(11) { animation-delay: 2.4s; }
  .motion-draw .pixels > :nth-child(10) { animation-delay: 2.51s; }
  .motion-draw .pixels > :nth-child(9) { animation-delay: 2.61s; }
  .motion-draw .pixels > :nth-child(8) { animation-delay: 2.72s; }
  .motion-draw .pixels > :nth-child(7) { animation-delay: 2.83s; }
  .motion-draw .pixels > :nth-child(6) { animation-delay: 2.93s; }
  .motion-draw .pixels > :nth-child(5) { animation-delay: 3.04s; }
  .motion-draw .pixels > :nth-child(4) { animation-delay: 3.15s; }
  .motion-draw .pixels > :nth-child(3) { animation-delay: 3.25s; }
  .motion-draw .pixels > :nth-child(2) { animation-delay: 3.36s; }
  .motion-draw .pixels > :nth-child(1) { animation-delay: 3.47s; }

  /* ARI travels up the curve from the left and TIA from the right, turning about the emblem's centre, until they meet as ARITIA. */
  .word-ari,
  .word-tia {
    transform-origin: 200px 200px;
    animation: ari 3.2s cubic-bezier(0.4, 0, 0.2, 1) 2.2s both;
  }

  .word-tia {
    animation-name: tia;
  }

  .phone::after {
    transition: opacity 0.3s ease-out;
  }

  .showcase.is-enhanced .phone {
    transition: transform 0.3s ease-out;
  }
}

@keyframes rise {
  from { transform: translateY(1.25rem); }
}

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.4); }
}

@keyframes spin {
  from { transform: rotate(-120deg); opacity: 0; }
}

@keyframes spin-back {
  from { transform: rotate(120deg); opacity: 0; }
}

@keyframes drift {
  to { transform: translateY(-10px); }
}

@keyframes turn {
  to { transform: rotate(360deg); }
}

@keyframes turn-back {
  to { transform: rotate(-360deg); }
}

@keyframes ari {
  from { transform: rotate(-100deg); opacity: 0; }
  25% { opacity: 1; }
}

@keyframes tia {
  from { transform: rotate(100deg); opacity: 0; }
  25% { opacity: 1; }
}

/* The channel change on the dots: the parts of one icon's slot, in and out. */
@keyframes tune-in {
  from { opacity: 0; }
  8% { opacity: 1; }
}

@keyframes tune-out {
  from, 86% { opacity: 1; }
  to { opacity: 0; }
}

@keyframes snow-in {
  from { opacity: 0; }
  6% { opacity: 1; transform: none; }
  18% { opacity: 1; transform: translate(2px, -2px); }
  30% { opacity: 1; transform: translate(-2px, 1.5px); }
  42% { opacity: 1; transform: translate(1.5px, 2px); }
  54% { opacity: 1; transform: translate(-1px, -1.5px); }
  62%, to { opacity: 0; }
}

@keyframes snow-out {
  from, 30% { opacity: 0; }
  32% { opacity: 1; transform: none; }
  44% { opacity: 1; transform: translate(2px, -2px); }
  56% { opacity: 1; transform: translate(-2px, 1.5px); }
  68% { opacity: 1; transform: translate(1.5px, 2px); }
  80%, to { opacity: 0; }
}

@keyframes scan-in {
  from { opacity: 0; transform: translateY(-5px); }
  6%, 54% { opacity: 0.7; }
  62%, to { opacity: 0; transform: translateY(5px); }
}

@keyframes scan-out {
  from, 30% { opacity: 0; transform: translateY(-5px); }
  32%, 78% { opacity: 0.7; }
  86%, to { opacity: 0; transform: translateY(5px); }
}

@keyframes line-in {
  from, 40% { opacity: 0; transform: scaleX(0.1); }
  48%, 60% { opacity: 1; transform: none; }
  76%, to { opacity: 0; }
}

@keyframes line-out {
  from, 28% { opacity: 0; }
  30% { opacity: 1; transform: none; }
  50% { opacity: 1; transform: scaleX(0.05); }
  54%, to { opacity: 0; transform: scaleX(0.05); }
}

@keyframes picture-in {
  from, 50% { opacity: 0; transform: scale(1.25, 0.05); }
  52% { opacity: 1; transform: scale(1.25, 0.05); }
  78% { transform: scale(0.95, 1.08); }
}

@keyframes picture-out {
  30% { opacity: 1; transform: scale(1.25, 0.05); }
  32%, to { opacity: 0; transform: scale(1.25, 0.05); }
}

/* Print: dark ink on white, no site links or decoration, external link addresses written out. */
@media print {
  :root {
    --ground: #fff;
    --surface: #fff;
    --ink: #000;
    --muted: #333;
    --accent: #000;
    --on-accent: #000;
    --rule: #999;
    --glow: transparent;
    --emblem: #000;
    --emblem-glow: transparent;
    color-scheme: light;
  }

  .skip,
  .top nav,
  .theme-switch,
  .art,
  .showcase-controls,
  .copy-email,
  footer nav {
    display: none;
  }

  .top {
    position: static;
  }

  .top .mark svg {
    opacity: 1;
  }

  .button {
    background: none;
  }

  .showcase-track {
    grid-auto-flow: row;
    padding-inline: 0;
    overflow: visible;
  }

  .text-page article a[href^="http"]::after {
    content: " (" attr(href) ")";
  }
}
