/* Ternalis Tech LLC — ternalistech.com
   Type: Jost (SIL Open Font License 1.1), self-hosted.
   Color: brand guide, brands/ternalis-tech/brand-guide.md */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/jost-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jost-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/jost-latin-500-normal.woff2") format("woff2");
}

:root {
  --cobalt: #1f4fd8;
  --ink: #111214;
  --vermilion: #e5432a;
  --fuligin: #050506;
  --charcoal: #3a3d44;
  --body: #3a3c40;
  --muted: #55575c;
  --rule: #e1e1dc;
  --panel: #f2f2ef;
  --white: #ffffff;
  --measure: 68ch;
  --shell: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Jost, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--cobalt); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 24px;
  top: 12px;
  z-index: 10;
  background: var(--white);
  padding: 10px 16px;
  border: 2px solid var(--cobalt);
  border-radius: 8px;
}

/* ---------- wordmark and nav ---------- */

.wordmark {
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.wordmark b { font-weight: 500; }
.wordmark span { font-weight: 300; }

.masthead { border-bottom: 1px solid var(--rule); }

.masthead .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 24px;
}
.nav a {
  color: var(--body);
  text-decoration: none;
  padding: 8px 0;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.nav a[aria-current="page"] { text-decoration-color: var(--vermilion); }

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

section { padding: 76px 0; }
section.tight { padding: 56px 0; }

.dark {
  background: var(--fuligin);
  color: var(--white);
}
.dark h2 { color: var(--white); }
.dark p { color: #c9cbcf; }

.panel { background: var(--panel); }

.eyebrow {
  margin: 0 0 12px;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dark .eyebrow { color: #a9abb0; }

h1 {
  margin: 0 0 20px;
  font-weight: 500;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

h2 {
  margin: 0 0 20px;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 24ch;
}

h3 {
  margin: 0 0 10px;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.25;
}

p { margin: 0 0 18px; max-width: var(--measure); color: var(--body); text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
h2.wide { max-width: none; }
p.lead {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 36ch;
}
.dark p.lead { color: #c9cbcf; }
p:last-child { margin-bottom: 0; }

.hero { padding: 96px 0 84px; }

/* Page headings set on a single line at desktop widths */
h1.oneline {
  max-width: none;
  font-size: clamp(1.75rem, 4.2vw, 3rem);
}
p.lead.oneline {
  max-width: none;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
}

/* ---------- grids and cards ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 40px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 24px;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 30px;
}

.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--body);
  font-size: 0.8125rem;
  font-weight: 500;
}
.tag.pilot {
  background: var(--cobalt);
  color: var(--white);
}

.note {
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--muted);
}

blockquote.verse {
  margin: 0 0 16px;
  padding-left: 18px;
  border-left: 3px solid var(--vermilion);
  font-weight: 300;
  font-size: 1.2rem;
  color: var(--ink);
}
blockquote.verse cite {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  font-style: normal;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
}
.btn:hover { background: var(--cobalt); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn.ghost:hover {
  background: var(--ink);
  color: var(--white);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.mailto {
  font-size: 1.25rem;
  font-weight: 500;
  word-break: break-word;
}

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

.footer {
  background: var(--fuligin);
  color: #c9cbcf;
  padding: 40px 0;
  font-size: 0.9375rem;
}
.footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer .wordmark { color: var(--white); font-size: 1.25rem; }
.footer p { color: #c9cbcf; margin: 0; }
.footer a { color: #ffffff; }

.rule {
  height: 6px;
  border: 0;
  margin: 0;
  background: linear-gradient(
    to right,
    var(--cobalt) 0 40%,
    var(--charcoal) 40% 64%,
    var(--vermilion) 64% 100%
  );
}

@media (max-width: 36rem) {
  section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .card { padding: 24px; }
}
