/* cargo-credential-prego site. Prego look: light by default, dark on request.
   Fonts are self-hosted (SIL Open Font License 1.1, see fonts/LICENSE-*.txt). */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/dm-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --band: #ecf1fc;
  --ink: #0c2a6b;
  --ink-2: #22407f;
  --muted: #4a5872;
  --line: rgba(12, 42, 107, 0.16);
  --line-strong: #0c2a6b;
  --accent: #1a47a8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(26, 71, 168, 0.07);
  --focus: #1d4ed8;
  --code-bg: #0c2a6b;
  --code-ink: #e6edf7;
  --code-muted: #9fb0c8;
  --code-prompt: #9cc0ff;
  --grid: rgba(12, 42, 107, 0.035);
  --shadow: 0 1px 0 rgba(12, 42, 107, 0.04);

  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-card: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d1220;
  --surface: #172238;
  --band: #121a2b;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: #8fb0ff;
  --accent: #8fb0ff;
  --accent-ink: #0d1220;
  --accent-soft: rgba(143, 176, 255, 0.08);
  --focus: #fcd34d;
  --code-bg: #121a2b;
  --code-ink: #e2e8f0;
  --code-muted: #94a3b8;
  --code-prompt: #f59e0b;
  --grid: rgba(143, 176, 255, 0.03);
  --shadow: none;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
ul,
ol,
pre {
  margin: 0;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.05em 0.35em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--accent-soft);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .wrap {
    padding: 0 32px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: 12px;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.05;
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  flex: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}
.brand-by {
  font-size: 0.85rem;
  color: var(--muted);
  display: none;
}
@media (min-width: 560px) {
  .brand-by {
    display: inline;
  }
}
.site-nav {
  display: none;
  gap: 28px;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex: none;
}
.icon-btn:hover {
  border-color: var(--line-strong);
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sun {
  display: none;
}
:root[data-theme="dark"] .icon-sun {
  display: block;
}
:root[data-theme="dark"] .icon-moon {
  display: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}
:root[data-theme="dark"] .btn-primary:hover {
  background: #b7cbff;
  border-color: #b7cbff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--accent-soft);
}

/* Hero */

.hero {
  padding: 56px 0 64px;
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero {
    padding: 96px 0 104px;
  }
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
  }
}
.hero h1 {
  font-size: clamp(2.4rem, 7.5vw, 4.2rem);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.lede {
  color: var(--ink-2);
  font-size: 1.125rem;
  max-width: 36em;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-note {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Terminal and code blocks */

.terminal {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  overflow: hidden;
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .terminal {
  border-color: rgba(148, 163, 184, 0.3);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: var(--code-muted);
}
.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.terminal-bar b {
  margin-left: 8px;
  font-weight: 400;
  font-family: var(--font-mono);
}
.terminal pre {
  padding: 18px 18px 22px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  line-height: 1.7;
}
.terminal code {
  border: 0;
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
.terminal .c {
  color: var(--code-muted);
}
.terminal .p {
  color: var(--code-prompt);
  user-select: none;
}

/* Sections */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.section-band {
  background: var(--band);
}
.section-title {
  font-size: clamp(2rem, 5.5vw, 3rem);
  text-transform: uppercase;
  max-width: 22ch;
  margin-bottom: 36px;
}
.section-lede {
  color: var(--ink-2);
  max-width: 44em;
  margin: -16px 0 32px;
}
.section p + p,
.section p + .terminal,
.section .terminal + p,
.section .terminal + .table-wrap,
.section .table-wrap + p {
  margin-top: 20px;
}
.two-col {
  display: grid;
  gap: 24px;
}
@media (min-width: 960px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* Cards and steps */

.cards,
.steps,
.rules {
  list-style: none;
  padding: 0;
}
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.card,
.step {
  font-family: var(--font-card);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}
.card:hover {
  border-color: var(--line-strong);
}
.card h3,
.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.card p,
.step p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.card-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent);
}
.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.step {
  background: transparent;
}
.step-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
}

.rules {
  display: grid;
  gap: 12px;
  max-width: 52em;
}
.rules li {
  padding-left: 28px;
  position: relative;
  color: var(--ink-2);
}
.rules li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 12px;
  height: 1.5px;
  background: var(--accent);
}

/* Table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-card);
  font-size: 0.92rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-size: 0.92rem;
  color: var(--muted);
}
.footer-inner {
  display: grid;
  gap: 10px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-nav a {
  font-weight: 600;
  text-decoration: none;
}
.footer-nav a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
