/* DrivTek EasyTrace — Minimal Static Public Pages (drivtek.com)
   No external fonts, no third-party assets, no cookies, mobile-first accessible CSS. */

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

:root {
  --bg: #faf8f6;
  --surface: #ffffff;
  --surface-subtle: #f4efeb;
  --text: #1e1617;
  --text-muted: #574a4c;
  --border: #e4dcd6;
  --border-strong: #c9bdb5;
  --brand: #4f000b;
  --brand-hover: #6c0818;
  --accent: #c85500;
  --accent-bar: #fe7500;
  --focus: #c85500;
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 780px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 160ms ease, opacity 160ms ease;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: var(--radius-sm);
}

/* Header */
.site-header {
  background-color: var(--surface);
  border-top: 3px solid var(--accent-bar);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.site-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--brand-hover);
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.site-nav a.is-current {
  color: var(--brand);
  font-weight: 700;
}

.lang-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  padding: 3px;
  box-shadow: inset 0 1px 2px rgba(30, 22, 23, 0.06);
}

.lang-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  bottom: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 1px 4px rgba(79, 0, 11, 0.25);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  pointer-events: none;
}

.lang-toggle.is-en::before {
  transform: translateX(100%);
}

.lang-btn {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 74px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  transition: color 200ms ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active,
.lang-btn.is-active:hover {
  color: #ffffff;
}

@keyframes langFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-entering {
  animation: langFadeIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Main Content */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 20px 44px;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 1px 3px rgba(30, 22, 23, 0.04);
}

@media (min-width: 640px) {
  .site-main {
    padding: 40px 24px 56px;
  }

  .page-card {
    padding: 40px 44px;
  }
}

.page-card h1 {
  margin: 0 0 12px;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--brand);
}

.page-card h2 {
  margin: 32px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--brand);
  scroll-margin-top: 20px;
}

.version-line {
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.page-card p {
  margin: 0 0 16px;
}

.page-card ul,
.page-card ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.page-card li {
  margin-bottom: 8px;
}

.page-card li:last-child {
  margin-bottom: 0;
}

.cta-row {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.btn-primary {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  background-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(79, 0, 11, 0.18);
  transition: background-color 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(79, 0, 11, 0.22);
}

.btn-primary:active {
  transform: translateY(0);
}

.cta-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
}

.sep {
  color: var(--text-muted);
  user-select: none;
}

.lang-divider {
  margin: 40px 0;
  border: 0;
  border-top: 2px dashed var(--border);
}

/* Footer */
.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.footer-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.footer-legal {
  margin: 0;
  line-height: 1.5;
}

.footer-legal a {
  color: var(--text-muted);
}

.footer-legal a:hover {
  color: var(--brand);
}

@media print {
  .site-header,
  .skip-link,
  .lang-toggle {
    display: none;
  }

  body {
    background: #ffffff;
  }

  .page-card {
    border: 0;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  a,
  .lang-toggle::before,
  .lang-btn,
  .btn-primary {
    transition: none;
  }

  .lang-entering {
    animation: none;
  }
}

.lang-hidden {
  display: none !important;
}
