/* bevice — design system
   Minimal, Google-quiet: lots of whitespace, one accent, system font.
   UTF-8 + LF. No build tool, no framework, no external fonts. */

/* ============================================================
   1. Design tokens (CSS custom properties)
   ============================================================ */
:root {
  /* Color — neutral ink scale + one accent + status */
  --c-ink:        #1f2024;   /* near-black text */
  --c-ink-soft:   #4a4d55;   /* secondary text */
  --c-muted:      #74777f;   /* captions, meta */
  --c-line:       #e6e7ea;   /* hairlines, borders */
  --c-line-soft:  #f0f1f3;   /* very light divider */
  --c-surface:    #ffffff;   /* page background */
  --c-surface-2:  #f7f8fa;   /* subtle panel fill */

  --c-accent:        #2c6e63;  /* the single accent: calm human green-teal */
  --c-accent-strong: #1f5249;  /* hover / pressed */
  --c-accent-tint:   #e8f1ef;  /* accent wash for soft fills */

  --c-ok:        #2c6e63;   /* valid seal — neutral/greenish */
  --c-ok-tint:   #e8f1ef;
  --c-danger:    #b3261e;   /* REVOKED — red */
  --c-danger-tint:#fbe9e8;
  --c-warn:      #8a6d1f;   /* unknown / pending */
  --c-warn-tint: #f6efda;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

  /* Type scale (fluid where it helps) */
  --fs-hero:  clamp(2.4rem, 5.2vw, 4rem);
  --fs-h1:    clamp(1.9rem, 3.6vw, 2.6rem);
  --fs-h2:    clamp(1.4rem, 2.4vw, 1.8rem);
  --fs-h3:    1.2rem;
  --fs-body:  1.0625rem;     /* 17px */
  --fs-sm:    0.9375rem;     /* 15px */
  --fs-xs:    0.8125rem;     /* 13px */

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-body:  1.65;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* Spacing scale (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Radius, borders, shadow — restrained */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 22, 28, 0.06);
  --shadow-md: 0 4px 18px rgba(20, 22, 28, 0.08);

  /* Layout */
  --container: 1080px;
  --container-narrow: 720px;
  --header-h: 64px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ============================================================
   2. Reset (minimal, modern)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-strong); text-decoration: underline; }

ul, ol { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ============================================================
   3. Base typography
   ============================================================ */
h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.015em;
  color: var(--c-ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }

p { max-width: 65ch; }

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: var(--lh-snug);
  color: var(--c-ink-soft);
  font-weight: var(--fw-normal);
}

small, .text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.muted { color: var(--c-muted); }
.mono { font-family: var(--font-mono); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  padding: 0.1em 0.4em;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
}

/* ============================================================
   4. Layout — container, sections, grid
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--s-9); }
.section--tight { padding-block: var(--s-7); }
.section--alt { background: var(--c-surface-2); }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

.grid { display: grid; gap: var(--s-5); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 820px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.center { text-align: center; }
.center-x { margin-inline: auto; }
.measure { max-width: 60ch; }
.measure-center { max-width: 60ch; margin-inline: auto; }

/* ============================================================
   5. Header / navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: var(--fw-semibold);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}
.brand:hover { text-decoration: none; color: var(--c-ink); }
.brand img, .brand svg { width: 28px; height: 28px; }

.nav { display: flex; align-items: center; gap: var(--s-2); }
.nav a {
  color: var(--c-ink-soft);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
}
.nav a:hover { color: var(--c-ink); background: var(--c-surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--c-ink); }

.nav-actions { display: flex; align-items: center; gap: var(--s-3); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  border-radius: var(--r-sm);
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  background: var(--c-ink);
  position: relative;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
    padding: var(--s-3);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: var(--s-3); border-radius: var(--r-sm); }
  .nav-actions { display: none; }
}

/* ============================================================
   6. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1;
  padding: 0.72em 1.25em;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: var(--c-surface-2);
  color: var(--c-ink);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--c-accent);
  color: #fff;
}
.btn--primary:hover { background: var(--c-accent-strong); color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: var(--c-line);
  color: var(--c-ink);
}
.btn--ghost:hover { border-color: var(--c-ink-soft); background: var(--c-surface-2); }

.btn--quiet {
  background: transparent;
  color: var(--c-ink-soft);
}
.btn--quiet:hover { background: var(--c-surface-2); color: var(--c-ink); }

.btn--lg { font-size: var(--fs-body); padding: 0.85em 1.6em; }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn-row--center { justify-content: center; }

/* ============================================================
   7. Form elements
   ============================================================ */
.field { display: block; }
.field + .field { margin-top: var(--s-5); }

.label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  margin-bottom: var(--s-2);
  color: var(--c-ink);
}
.hint { font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--s-2); }

.input, .textarea, .select {
  display: block;
  width: 100%;
  font-size: var(--fs-body);
  padding: 0.7em 0.85em;
  background: var(--c-surface);
  color: var(--c-ink);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-tint);
}
.textarea { min-height: 8em; resize: vertical; line-height: var(--lh-snug); }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}
.checkbox-row input { margin-top: 0.25em; width: 18px; height: 18px; flex: none; accent-color: var(--c-accent); }
.checkbox-row label { font-size: var(--fs-sm); color: var(--c-ink-soft); line-height: var(--lh-snug); }

/* ============================================================
   8. Cards
   ============================================================ */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.card--soft { background: var(--c-surface-2); border-color: transparent; }
.card--pad-sm { padding: var(--s-5); }

.card__icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--c-accent-tint);
  color: var(--c-accent-strong);
  margin-bottom: var(--s-4);
  font-weight: var(--fw-semibold);
}
.card h3 { margin-bottom: var(--s-2); }
.card p { color: var(--c-ink-soft); font-size: var(--fs-sm); }

/* Numbered steps */
.steps { counter-reset: step; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  background: var(--c-ink);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--s-4);
}

/* ============================================================
   9. Badge / status pill  (valid = neutral/green, REVOKED = red)
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4em 0.8em;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  line-height: 1;
}
.pill::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill--ok      { color: var(--c-ok);     background: var(--c-ok-tint); }
.pill--revoked { color: var(--c-danger); background: var(--c-danger-tint); }
.pill--unknown { color: var(--c-warn);   background: var(--c-warn-tint); }

/* Large status block for the verify page */
.status-block {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
}
.status-block--ok      { background: var(--c-ok-tint);     border-color: rgba(44,110,99,0.25); }
.status-block--revoked { background: var(--c-danger-tint); border-color: rgba(179,38,30,0.30); }
.status-block--unknown { background: var(--c-warn-tint);   border-color: rgba(138,109,31,0.30); }
.status-block__title { font-size: var(--fs-h2); line-height: 1.1; }
.status-block__icon { width: 48px; height: 48px; flex: none; }

/* ============================================================
   10. Table (public register)
   ============================================================ */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.table th, .table td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-line-soft);
  vertical-align: middle;
}
.table thead th {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--c-surface-2); }
.table td.mono { font-size: var(--fs-xs); color: var(--c-ink-soft); }

/* ============================================================
   11. Hero
   ============================================================ */
.hero { padding-block: clamp(var(--s-7), 9vw, var(--s-9)); text-align: center; }
.hero__seal { width: 120px; height: 120px; margin: 0 auto var(--s-5); }
.hero h1 { font-size: var(--fs-hero); max-width: 16ch; margin-inline: auto; }
.hero .lead { max-width: 46ch; margin: var(--s-5) auto 0; }
.hero .btn-row { margin-top: var(--s-6); }

/* ============================================================
   12. Snippet / code block
   ============================================================ */
.codeblock {
  background: var(--c-ink);
  color: #e8eaee;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  overflow-x: auto;
  white-space: pre;
}

/* ============================================================
   13. Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--c-line);
  padding-block: var(--s-7);
  margin-top: var(--s-9);
  color: var(--c-ink-soft);
  font-size: var(--fs-sm);
}
.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-6);
  align-items: flex-start;
}
.site-footer .brand { font-size: 1.05rem; margin-bottom: var(--s-3); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.footer-nav a { color: var(--c-ink-soft); }
.footer-nav a:hover { color: var(--c-ink); }
.footer-bottom {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  color: var(--c-muted);
  font-size: var(--fs-xs);
}

/* ============================================================
   14. Utilities
   ============================================================ */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.wrap { flex-wrap: wrap; }

.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }

.hr { border: none; border-top: 1px solid var(--c-line); margin-block: var(--s-6); }

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px;
  background: var(--c-ink); color: #fff;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); z-index: 100;
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: var(--s-3); text-decoration: none; }

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