/* Ruby Intelligence LLC — site styles
   Palette and type are set once here. Change these tokens to restyle the
   whole site without touching the pages. */

:root {
  --paper:      #F2F0F4;
  --surface:    #FFFFFF;
  --ink:        #221B26;
  --ink-soft:   #5B5162;
  --ruby:       #A8113C;
  --garnet:     #5C0A24;
  --mist:       #CFC8D6;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  --font-display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: oldstyle-num;
}

@media (min-width: 40rem) {
  body { font-size: 1.125rem; }
}

img, svg { max-width: 100%; }

a {
  color: var(--garnet);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--ruby); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ruby);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- shell ---------- */

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

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--mist);
  background: var(--surface);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.wordmark:hover { color: var(--garnet); }

.wordmark__mark { flex: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ruby);
}

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

.hero {
  padding-top: clamp(3rem, 9vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 7vw, 4rem);
}

.hero__inner {
  display: grid;
  gap: clamp(2rem, 6vw, 3.5rem);
  align-items: center;
}

@media (min-width: 52rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) 13rem;
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 6vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  max-width: 16ch;
}

.hero__lead {
  margin: 0;
  max-width: var(--measure);
  font-size: 1.1875rem;
  color: var(--ink-soft);
}

@media (min-width: 40rem) {
  .hero__lead { font-size: 1.3125rem; }
}

.hero__stone {
  justify-self: center;
  width: clamp(9rem, 28vw, 13rem);
}

@media (max-width: 51.99rem) {
  .hero__stone { order: -1; justify-self: start; width: 7.5rem; }
}

/* ---------- the drawn stone ---------- */

.stone { display: block; overflow: visible; }

.stone polygon,
.stone line {
  fill: none;
  stroke: var(--ruby);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.stone .stone__table { fill: rgba(168, 17, 60, 0.07); }

.stone .stone__spoke { stroke: var(--ruby); opacity: 0.4; }

@media (prefers-reduced-motion: no-preference) {
  .stone polygon,
  .stone line {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: cut 1100ms cubic-bezier(0.33, 0.9, 0.35, 1) forwards;
  }
  .stone .stone__r1 { animation-delay: 140ms; }
  .stone .stone__r2 { animation-delay: 260ms; }
  .stone .stone__table { animation-delay: 380ms; }
  .stone .stone__spoke { animation-delay: 460ms; }
}

@keyframes cut {
  to { stroke-dashoffset: 0; }
}

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

.band {
  padding-top: clamp(2.5rem, 7vw, 4rem);
  padding-bottom: clamp(2.5rem, 7vw, 4rem);
}

.band--surface {
  background: var(--surface);
  border-top: 1px solid var(--mist);
  border-bottom: 1px solid var(--mist);
}

.band h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.band h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.5rem;
}

.band p,
.band ul,
.band ol {
  max-width: var(--measure);
}

.band p { margin: 0 0 1.1rem; }

.band ul,
.band ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }

.band li { margin-bottom: 0.45rem; }

/* A faceted left rule. Used to set off a passage that carries weight. */
.facet-note {
  border-left: 2px solid var(--ruby);
  padding-left: 1.25rem;
  margin: 2rem 0;
  max-width: var(--measure);
}

.facet-note p:last-child { margin-bottom: 0; }

/* ---------- entity details ---------- */

.details {
  display: grid;
  gap: 1.5rem 3rem;
  margin: 0;
  max-width: var(--measure);
}

@media (min-width: 34rem) {
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.details dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.details dd {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* ---------- colophon ---------- */

.colophon {
  border-top: 1px solid var(--mist);
  background: var(--surface);
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.colophon__inner {
  display: grid;
  gap: 1.75rem 3rem;
}

@media (min-width: 40rem) {
  .colophon__inner { grid-template-columns: minmax(0, 1fr) auto; }
}

.colophon address {
  font-style: normal;
  line-height: 1.55;
}

.colophon__entity {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 0.3rem;
}

.colophon__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-family: var(--font-display);
  list-style: none;
  margin: 0;
  padding: 0;
}

.colophon__links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.colophon__links a:hover {
  color: var(--garnet);
  text-decoration: underline;
}

/* ---------- long-form legal pages ---------- */

.legal { padding-top: clamp(2.5rem, 7vw, 4rem); padding-bottom: 1rem; }

.legal h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}

.legal__stamp {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--ruby);
}
