/* =========================================================
   DLIMS — Driver License Information Management System
   Design system: institutional civic-tech, built around the
   language of an actual license/ID card.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* --- Color tokens --- */
  --ink-navy: #10192B;
  --ink-navy-70: rgba(16,25,43,0.7);
  --ink-navy-45: rgba(16,25,43,0.45);
  --paper: #ECEEE6;
  --paper-alt: #DEE3D8;
  --paper-deep: #CFD6C6;
  --white: #F8F9F4;
  --security-teal: #1F6F63;
  --security-teal-dim: #16564C;
  --brass: #B08D3E;
  --brass-bright: #C7A452;
  --stamp-red: #A63A2E;
  --line: rgba(16,25,43,0.14);
  --line-soft: rgba(16,25,43,0.08);

  /* --- Type --- */
  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* --- Field label motif: mimics printed ID-card field labels --- */
.field-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--security-teal-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.field-label::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--security-teal-dim);
  display: inline-block;
}

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(236,238,230,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink-navy);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: var(--ink-navy);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  background: var(--brass-bright);
}
.brand-mark::before {
  top: 8px; left: 6px; right: 6px; height: 2px;
}
.brand-mark::after {
  top: 14px; left: 6px; width: 10px; height: 2px;
}
.brand small {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-navy-45);
  display: block;
  margin-top: 1px;
}
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 7px;
  color: var(--ink-navy-70);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--paper-alt); color: var(--ink-navy); }
.nav-links a.active { color: var(--ink-navy); background: var(--paper-deep); }
.nav-cta {
  background: var(--ink-navy) !important;
  color: var(--white) !important;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--security-teal-dim) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  width: 40px; height: 40px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  background: var(--ink-navy);
  margin: 0 auto;
  position: relative;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 3px; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--ink-navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--security-teal-dim); }
.btn-secondary {
  background: transparent;
  border-color: var(--ink-navy);
  color: var(--ink-navy);
}
.btn-secondary:hover { background: var(--ink-navy); color: var(--white); }
.btn:active { transform: translateY(1px); }

/* --- Section rhythm --- */
section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-border-top { border-top: 1px solid var(--line); }
.section-dark {
  background: var(--ink-navy);
  color: var(--paper);
}
.section-dark .field-label { color: var(--brass-bright); }
.section-dark .field-label::before { background: var(--brass-bright); }

.eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Hero --- */
.hero { padding: 72px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  margin: 18px 0 22px;
}
.hero .lede {
  font-size: 18px;
  color: var(--ink-navy-70);
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- Signature element: the license card --- */
.card-stage {
  perspective: 1600px;
  display: flex;
  justify-content: center;
}
.license-card {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1.586 / 1;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(.2,.9,.25,1);
  cursor: pointer;
}
.license-card.flipped { transform: rotateY(180deg); }
.license-face {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(16,25,43,0.45), 0 2px 0 rgba(255,255,255,0.4) inset;
  border: 1px solid rgba(255,255,255,0.25);
}
.license-front {
  background:
    radial-gradient(circle at 85% 12%, rgba(199,164,82,0.35), transparent 45%),
    linear-gradient(135deg, #16233B 0%, #10192B 55%, #0B1220 100%);
  color: var(--paper);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.license-back {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(115deg, rgba(31,111,99,0.10) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #E7EADF 0%, #DEE3D8 100%);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.license-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.license-issuer {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236,238,230,0.6);
}
.license-issuer strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--paper);
  letter-spacing: 0;
  margin-top: 2px;
}
.license-chip {
  width: 34px; height: 26px;
  border-radius: 5px;
  background: linear-gradient(135deg, #C7A452, #8F6F28);
  position: relative;
}
.license-chip::before {
  content: "";
  position: absolute; inset: 4px;
  border: 1px solid rgba(16,25,43,0.35);
  border-radius: 3px;
}
.license-photo-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}
.license-photo {
  width: 56px; height: 68px;
  border-radius: 6px;
  background: linear-gradient(160deg, #2A3B57, #16233B);
  border: 1px solid rgba(236,238,230,0.25);
  flex-shrink: 0;
}
.license-fields { flex: 1; }
.license-field { margin-bottom: 6px; }
.license-field .k {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(236,238,230,0.5);
  display: block;
}
.license-field .v {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.license-field .v.typing::after {
  content: "▍";
  animation: blink 1s step-end infinite;
  color: var(--brass-bright);
}
@keyframes blink { 50% { opacity: 0; } }

.license-hologram {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 46px;
  background: linear-gradient(180deg, rgba(199,164,82,0.5), rgba(31,111,99,0.4), rgba(199,164,82,0.5));
  mix-blend-mode: screen;
  opacity: 0.5;
}

.license-back-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.license-back-header .field-label { color: var(--security-teal-dim); font-size: 9.5px; }
.license-barcode {
  height: 32px;
  background: repeating-linear-gradient(90deg, var(--ink-navy) 0 2px, transparent 2px 5px, var(--ink-navy) 5px 6px, transparent 6px 10px);
  opacity: 0.85;
  border-radius: 2px;
}
.license-back-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-navy-70);
}
.license-back-fields .k { color: var(--ink-navy-45); letter-spacing: 0.08em; text-transform: uppercase; font-size: 8.5px; }
.license-seal {
  margin-left: auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px dashed var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--brass);
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.card-hint {
  text-align: center;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-navy-45);
  letter-spacing: 0.05em;
}

/* --- Stats strip --- */
.stats-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 34px 24px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
}
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-navy-45);
  margin-top: 6px;
}

/* --- Two column / feature grids --- */
.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
h2.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  max-width: 16ch;
}
.section-sub {
  font-size: 16.5px;
  color: var(--ink-navy-70);
  max-width: 52ch;
  margin-top: 14px;
}
.section-dark .section-sub { color: rgba(236,238,230,0.72); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 44px;
}
.feature-card {
  background: var(--paper);
  padding: 30px 26px;
}
.feature-card .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--security-teal-dim);
  letter-spacing: 0.1em;
}
.feature-card h3 {
  font-size: 19px;
  margin: 14px 0 10px;
}
.feature-card p {
  font-size: 14.5px;
  color: var(--ink-navy-70);
  line-height: 1.6;
}

/* --- Timeline / process --- */
.process-list {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.process-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.process-item .step {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.08em;
  padding-top: 2px;
}
.process-item h4 { font-size: 18px; margin-bottom: 8px; }
.process-item p { color: var(--ink-navy-70); font-size: 14.5px; max-width: 62ch; }

/* --- Cards / quote / callouts --- */
.callout {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
}
.quote-block {
  border-left: 2px solid var(--brass);
  padding-left: 24px;
}
.quote-block p {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
}
.quote-block cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-navy-45);
  letter-spacing: 0.04em;
}

/* --- Forms --- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-navy-45);
}
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-navy);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--security-teal);
  box-shadow: 0 0 0 3px rgba(31,111,99,0.15);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-note {
  font-size: 13px;
  color: var(--ink-navy-45);
  margin-top: 10px;
}
.form-success {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(31,111,99,0.1);
  border: 1px solid rgba(31,111,99,0.3);
  color: var(--security-teal-dim);
  font-size: 14.5px;
}
.form-success.show { display: block; }

/* --- Footer --- */
footer {
  background: var(--ink-navy);
  color: rgba(236,238,230,0.72);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(236,238,230,0.14);
}
footer .brand { color: var(--paper); }
footer .brand-mark { background: var(--brass-bright); }
footer .brand-mark::before, footer .brand-mark::after { background: var(--ink-navy); }
.footer-desc {
  font-size: 14px;
  margin-top: 14px;
  max-width: 32ch;
  color: rgba(236,238,230,0.55);
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(236,238,230,0.45);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  text-decoration: none;
  font-size: 14px;
  color: rgba(236,238,230,0.78);
}
.footer-col a:hover { color: var(--brass-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(236,238,230,0.4);
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Reveal on scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* --- Page hero (inner pages) --- */
.page-hero { padding: 64px 0 20px; }
.page-hero .field-label { margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 48px); }
.page-hero .lede { font-size: 17px; color: var(--ink-navy-70); max-width: 60ch; margin-top: 16px; }

/* --- Table (for compliance/security page content) --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-navy-45);
  font-weight: 500;
}

/* --- Team / about grid --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.founder-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.founder-avatar {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: linear-gradient(150deg, #1F6F63, #10192B);
  flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-grid, .two-col, .about-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats-strip .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.mobile-open a { padding: 12px 10px; }
  section { padding: 64px 0; }
  .process-item { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
