/* ============================================================
   dantas.dev — design system
   Tokens align with the DAN-51 brand book (enterprise blue,
   ink #0F172A, Avenir Next / Inter type, "D" foundation mark).
   ============================================================ */

:root {
  /* Brand palette */
  --brand-deep: #0B3A8F;
  --brand-primary: #1D4ED8;
  --brand: #2563EB;
  --brand-accent: #2E6DE6;
  --brand-300: #60A5FA;
  --brand-200: #93C5FD;
  --brand-100: #DBEAFE;

  /* Neutrals */
  --ink: #0F172A;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --surface: #F7FAFF;
  --white: #FFFFFF;

  /* Type */
  --font-display: "Avenir Next", "Montserrat", "Poppins", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;

  /* Scale & shape */
  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 22px 48px rgba(15, 23, 42, 0.14);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; color: var(--slate-700); }
a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-primary); margin-bottom: 12px;
}
.lead { font-size: 1.18rem; color: var(--slate-600); max-width: 60ch; }
.muted { color: var(--slate-500); }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-deep); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--slate-300); }
.btn-ghost:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--slate-200);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--brand-accent); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }

.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  color: var(--slate-700); font-weight: 500;
}
.nav-links a:hover { background: var(--slate-100); color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--brand-primary); background: var(--brand-100); }
.nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--slate-300);
  border-radius: 10px; width: 44px; height: 40px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(96, 165, 250, 0.22), transparent 60%),
    radial-gradient(700px 380px at 5% 0%, rgba(147, 197, 253, 0.18), transparent 55%),
    linear-gradient(180deg, var(--surface), #fff 70%);
  border-bottom: 1px solid var(--slate-200);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding: 88px 0 72px; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art {
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--slate-200); border-radius: 24px;
  padding: 36px; box-shadow: var(--shadow-lg);
}
.hero-art img { width: min(280px, 80%); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-200); }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center; background: var(--brand-100); color: var(--brand-primary);
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}

/* Project cards */
.project { display: flex; flex-direction: column; }
.project .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; list-style: none; }
.project .tags li {
  font-size: 0.78rem; font-weight: 600; color: var(--brand-deep);
  background: var(--brand-100); border-radius: 999px; padding: 4px 11px;
}
.project .project-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--slate-100); color: var(--slate-600);
}
.badge--live { background: #DCFCE7; color: #166534; }
.badge--wip { background: #FEF3C7; color: #92400E; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.stat { text-align: center; padding: 18px; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; color: var(--brand-deep); }
.stat .label { color: var(--slate-500); font-size: 0.95rem; }

/* Section heading block */
.section-head { max-width: 64ch; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* Prose blocks (About) */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1rem; }
.prose ul li { margin-bottom: 0.4rem; color: var(--slate-700); }
.prose li::marker { color: var(--brand-primary); }

/* Timeline */
.timeline { list-style: none; border-left: 2px solid var(--slate-200); padding-left: 24px; margin-top: 8px; }
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li::before {
  content: ""; position: absolute; left: -31px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brand-primary); box-shadow: 0 0 0 4px var(--brand-100);
}
.timeline .when { font-family: var(--font-display); font-weight: 700; color: var(--brand-deep); }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-primary));
  color: #fff; border-radius: 24px; padding: 48px; text-align: center; box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255, 255, 255, 0.88); }
.cta-banner .btn-primary { background: #fff; color: var(--brand-deep); }
.cta-banner .btn-primary:hover { background: var(--brand-100); }

/* ---------- Contact form ---------- */
.form { display: grid; gap: 18px; max-width: 620px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.field input, .field textarea {
  font: inherit; color: var(--ink); padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300); background: var(--white); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring); }
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: 0.85rem; color: var(--slate-500); }
.form-note { font-size: 0.9rem; color: var(--slate-500); }

.contact-links { list-style: none; display: grid; gap: 12px; }
.contact-links a { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 56px 0 28px; margin-top: 24px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.9rem; color: #94a3b8; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; padding: 64px 0 48px; }
  .hero-art { order: -1; max-width: 360px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--slate-200);
    padding: 12px 24px 18px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin: 6px 0 0; }
  .grid-3, .grid-2, .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 36px 24px; }
  .footer-bottom { flex-direction: column; }
}
