/* ==========================================================================
   The VRP Web — modern design system
   ========================================================================== */

:root {
  --color-primary: #1d4ed8;
  --color-primary-dark: #1e3a8a;
  --color-primary-light: #dbeafe;
  --color-accent: #f59e0b;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-header: #0f172a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
  --radius: 10px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --max-width: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header & navigation ---------- */
.site-header {
  background: var(--color-header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.site-header .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: .2px;
  white-space: nowrap;
}
.brand svg { flex: 0 0 auto; }
.brand:hover { color: var(--color-primary-light); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  padding: .45rem .75rem;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, .1); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem;
}
.site-nav a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  padding: .55rem .8rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.site-nav a.active {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
  width: 100%;
}
.content { flex: 1 0 auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.25; color: var(--color-header); margin: 1.6em 0 .55em; }
h1 { font-size: 2.1rem; margin-top: 0; }
h2 { font-size: 1.55rem; padding-bottom: .3em; border-bottom: 2px solid var(--color-border); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5rem; margin: 0 0 1rem; }
li { margin-bottom: .3rem; }
strong { color: var(--color-header); }

.kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 999px;
  padding: .25rem .8rem;
  margin-bottom: .9rem;
}

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-header) 0%, var(--color-primary-dark) 60%, var(--color-primary) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.hero h1 { color: #fff; font-size: 2.6rem; margin: 0 0 .4em; }
.hero p { font-size: 1.15rem; color: #dbeafe; max-width: 46em; }
.hero .actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem; }

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff !important;
  font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.light { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .5); }
.btn.light:hover { background: rgba(255, 255, 255, .25); }
.btn.outline { background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary) !important; }
.btn.outline:hover { background: var(--color-primary); color: #fff !important; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0; }
.card p { color: var(--color-text-muted); flex: 1; }
.card a.more { font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: .95rem;
}
table.data caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--color-header);
  padding: .6rem .4rem;
}
table.data th, table.data td {
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
table.data thead th {
  background: var(--color-header);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.data tbody tr:nth-child(even) { background: #f1f5f9; }
table.data tbody tr:hover { background: var(--color-primary-light); }

/* ---------- Figures ---------- */
figure {
  margin: 1.6rem auto;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: fit-content;
  box-shadow: var(--shadow-sm);
}
figure img { max-width: 100%; height: auto; border-radius: 6px; }
figcaption { margin-top: .8rem; font-size: .9rem; color: var(--color-text-muted); }

img.formula { vertical-align: middle; }
p.formula, div.formula {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  overflow-x: auto;
}

/* ---------- Callouts ---------- */
.note, .tip, .warning {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-left: 4px solid var(--color-primary);
  background: var(--color-primary-light);
}
.tip { border-left-color: #059669; background: #ecfdf5; }
.warning { border-left-color: var(--color-accent); background: #fffbeb; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-radius: 999px;
  padding: .2rem .7rem;
  margin-right: .35rem;
}

/* ---------- Two-column helper ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  margin-top: 3rem;
}
.site-footer .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer strong { color: var(--color-header); }
.site-footer a { color: var(--color-primary); }
.site-footer a:hover { color: var(--color-primary-dark); }
.site-footer .logos { display: flex; gap: 1.25rem; align-items: center; }
.site-footer .logos img { height: 64px; width: auto; }
.site-footer p { margin: 0; font-size: .9rem; }

/* ---------- Home: feature list ---------- */
.feature-list { list-style: none; padding-left: 0; }
.feature-list li { padding-left: 1.6rem; position: relative; margin-bottom: .5rem; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: .55rem; height: .55rem;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; padding-bottom: 1rem; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .site-header .wrap { flex-wrap: wrap; padding: .6rem 1.25rem; }
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 2rem 1.5rem; }
  .hero h1 { font-size: 2rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { background: #fff; }
  .container { padding: 0; }
}
