/* marcoperugini.com — Aper Minimalist Design System (Production CSS, Zero CDN, WCAG 2.1/2.2 AA) */
:root {
  --aper-ink: #1D1D1F;
  --aper-muted: #515154;
  --aper-surface: #F5F5F7;
  --aper-line: #D2D2D7;
  --aper-blue: #0066CC;
  --aper-blue-hover: #004C99;
  --aper-dark: #000000;
  --aper-dark-card: #161617;
  --aper-emerald: #047857;
  --aper-font-sans: system-ui, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", -sans-serif, sans-serif;
  --aper-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--aper-font-sans);
  color: var(--aper-ink);
  background: #FFFFFF;
  line-height: 1.5;
}
body { margin: 0; background: #FFFFFF; color: var(--aper-ink); font-family: var(--aper-font-sans); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* WCAG 2.1/2.2 AA Focus & Reduced Motion */
*:focus-visible {
  outline: 3px solid var(--aper-blue);
  outline-offset: 3px;
  border-radius: 6px;
}
.dark-zone *:focus-visible { outline-color: #60A5FA; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  width: auto; height: auto; clip: auto; overflow: visible; white-space: normal;
  background: var(--aper-ink); color: #FFFFFF; padding: 12px 20px;
  border-radius: 9999px; font-weight: 600; font-size: 14px;
}

.tracking-aper { letter-spacing: -0.035em; }
.font-mono { font-family: var(--aper-font-mono); }

/* Layout Containers */
.container-xl { max-width: 72rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.container-lg { max-width: 64rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.container-md { max-width: 52rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.container-sm { max-width: 42rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
@media (min-width: 640px) {
  .container-xl, .container-lg, .container-md, .container-sm { padding-left: 2rem; padding-right: 2rem; }
}

/* Navbar (h-16 bg-white/80 backdrop-blur-xl) */
.aper-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.aper-header-inner {
  height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.aper-brand { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; color: var(--aper-ink); }
.aper-nav-desktop { display: none; align-items: center; gap: 2rem; font-size: 13px; font-weight: 500; color: var(--aper-muted); }
.aper-nav-desktop a { padding: 0.5rem 0; transition: color 0.15s ease; }
.aper-nav-desktop a:hover { color: var(--aper-ink); }
@media (min-width: 768px) { .aper-nav-desktop { display: flex; } }

.aper-mobile-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; border-radius: 9999px; border: 0;
  background: transparent; color: var(--aper-ink); cursor: pointer;
}
.aper-mobile-btn:hover { background: var(--aper-surface); }
@media (min-width: 768px) { .aper-mobile-btn { display: none; } }

.aper-mobile-nav {
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--aper-line); padding: 0.5rem 1.5rem 1.5rem;
}
.aper-mobile-nav a {
  display: block; padding: 0.75rem 0; font-size: 16px; font-weight: 500;
  border-bottom: 1px solid rgba(0,0,0,0.06); color: var(--aper-ink);
}
.aper-mobile-nav a:last-child { border-bottom: 0; color: var(--aper-blue); font-weight: 600; }

/* Buttons & Pills */
.btn-pill-blue {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 48px; padding: 0.65rem 1.75rem; border-radius: 9999px; border: 0;
  background: var(--aper-blue); color: #FFFFFF; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: background-color 0.15s ease;
}
.btn-pill-blue:hover { background: var(--aper-blue-hover); }
.btn-pill-blue-sm { min-height: 38px; padding: 0.45rem 1rem; font-size: 13px; }

.btn-pill-ink {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 50px; padding: 0.7rem 1.75rem; border-radius: 9999px; border: 0;
  background: var(--aper-ink); color: #FFFFFF; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: background-color 0.15s ease;
}
.btn-pill-ink:hover { background: #000000; }

.btn-pill-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 42px; padding: 0.5rem 1.25rem; border-radius: 9999px;
  border: 1px solid var(--aper-line); background: #FFFFFF; color: var(--aper-ink);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color 0.15s ease;
}
.btn-pill-outline:hover { background: var(--aper-surface); }

.link-blue { color: var(--aper-blue); font-weight: 500; }
.link-blue:hover { text-decoration: underline; }

/* Sections */
.section-spacious { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 1024px) { .section-spacious { padding-top: 7rem; padding-bottom: 7rem; } }
.bg-white { background: #FFFFFF; }
.bg-aper-surface { background: var(--aper-surface); }
.bg-aper-dark { background: var(--aper-dark); color: #FFFFFF; }
.bg-aper-ink { background: var(--aper-ink); color: #FFFFFF; }
.border-top-soft { border-top: 1px solid rgba(0,0,0,0.06); }

/* Typography */
.eyebrow-blue { font-size: 14px; font-weight: 600; color: var(--aper-blue); letter-spacing: -0.01em; margin: 0; }
.eyebrow-muted { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--aper-muted); margin: 0; }
.hero-h1 {
  font-size: clamp(2.25rem, 5.5vw, 4.25rem); font-weight: 600;
  line-height: 1.05; letter-spacing: -0.035em; color: var(--aper-ink); margin: 0;
}
.section-h2 {
  font-size: clamp(1.85rem, 4vw, 3rem); font-weight: 600;
  line-height: 1.08; letter-spacing: -0.035em; margin: 0;
}
.page-h1 {
  font-size: clamp(2rem, 4.5vw, 3.35rem); font-weight: 600;
  line-height: 1.08; letter-spacing: -0.035em; color: var(--aper-ink); margin: 0;
}
.lead-text { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--aper-muted); line-height: 1.6; }
.text-muted { color: var(--aper-muted); }
.text-zinc-300 { color: #D4D4D8; }
.text-zinc-400 { color: #A1A1AA; }
.text-blue-300 { color: #93C5FD; }
.text-blue-400 { color: #60A5FA; }
.text-emerald-400 { color: #34D399; }

/* Cards & Grids */
.card-aper {
  background: #FFFFFF; border-radius: 28px; padding: 2.25rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-aper-hover:hover { box-shadow: 0 20px 50px -20px rgba(0,0,0,0.14); }
.card-surface { background: var(--aper-surface); border-radius: 24px; padding: 1.75rem; transition: background-color 0.15s ease; }
.card-surface-hover:hover { background: #E9E9EE; }
.card-dark { background: var(--aper-dark-card); border: 1px solid rgba(255,255,255,0.10); border-radius: 18px; padding: 1.5rem; }
.system-canvas {
  background: var(--aper-ink); color: #FFFFFF; border-radius: 28px; padding: 2rem;
  box-shadow: 0 30px 80px -25px rgba(0, 0, 0, 0.28);
}
@media (min-width: 640px) { .system-canvas { padding: 3rem; } }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.grid-12 { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 1024px) {
  .grid-12 { grid-template-columns: repeat(12, 1fr); }
  .col-span-5 { grid-column: span 5; }
  .col-span-7 { grid-column: span 7; }
}

/* Forms */
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--aper-muted); margin-bottom: 0.4rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; border: 1px solid var(--aper-line); border-radius: 12px;
  background: #FFFFFF; padding: 0.75rem 1rem; font-size: 14px; color: var(--aper-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input, .form-select { min-height: 48px; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--aper-blue); box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}
.alert-error {
  padding: 0.875rem 1rem; border-radius: 12px; background: #FEF2F2;
  border: 1px solid #FCA5A5; color: #7F1D1D; font-size: 13px; font-weight: 600;
}
.alert-success {
  padding: 1rem 1.25rem; border-radius: 16px; background: #ECFDF5;
  border: 1px solid #6EE7B7; color: #065F46; font-size: 14px; font-weight: 500;
}

/* Prose (Articles, Services, Case Studies, Legal) */
.aper-prose { font-size: 16px; line-height: 1.75; color: var(--aper-ink); }
.aper-prose h2 { font-size: 1.65rem; font-weight: 600; letter-spacing: -0.025em; margin: 2.5rem 0 0.85rem; line-height: 1.2; }
.aper-prose h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; margin: 1.75rem 0 0.65rem; }
.aper-prose p { margin: 0 0 1.15rem; color: #2D2D30; }
.aper-prose ul, .aper-prose ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.aper-prose li { margin-bottom: 0.45rem; color: #2D2D30; }
.aper-prose a { color: var(--aper-blue); text-decoration: underline; font-weight: 500; }
.aper-prose blockquote {
  margin: 1.5rem 0; padding: 1.25rem 1.5rem; background: var(--aper-surface);
  border-left: 4px solid var(--aper-blue); border-radius: 0 16px 16px 0; font-style: normal;
}
.aper-prose code {
  font-family: var(--aper-font-mono); font-size: 0.88em; background: var(--aper-surface);
  padding: 0.15rem 0.4rem; border-radius: 6px;
}
.aper-prose pre {
  background: var(--aper-ink); color: #F5F5F7; padding: 1.25rem; border-radius: 16px;
  overflow-x: auto; font-family: var(--aper-font-mono); font-size: 13px; line-height: 1.6;
}
.aper-prose pre code { background: transparent; padding: 0; color: inherit; }
.aper-prose table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 14px;
  background: #FFFFFF; border-radius: 16px; overflow: hidden; border: 1px solid var(--aper-line);
}
.aper-prose th, .aper-prose td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid #E5E5EA; }
.aper-prose th { background: var(--aper-surface); font-weight: 600; color: var(--aper-ink); }

/* Badges & Quick Answer */
.metric-pill {
  display: inline-flex; align-items: center; padding: 0.4rem 0.9rem;
  border-radius: 9999px; background: var(--aper-surface); border: 1px solid var(--aper-line);
  font-family: var(--aper-font-mono); font-size: 12px; font-weight: 500; color: var(--aper-ink);
}
.quick-answer-box {
  background: var(--aper-surface); border: 1px solid rgba(0,0,0,0.06);
  border-radius: 22px; padding: 1.5rem 1.75rem;
}

/* FAQ Accordion */
.faq-item { border-bottom: 1px solid #E5E5EA; padding: 1.1rem 0; }
.faq-item summary {
  list-style: none; cursor: pointer; font-weight: 600; font-size: 16px;
  color: var(--aper-ink); display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0.75rem 0 0; font-size: 15px; color: var(--aper-muted); line-height: 1.65; }

/* Footer */
.aper-footer {
  background: var(--aper-surface); border-top: 1px solid rgba(0,0,0,0.08);
  padding: 3rem 0; font-size: 12px; color: var(--aper-muted);
}
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(0,0,0,0.08); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col-title { font-weight: 600; color: var(--aper-ink); margin-bottom: 0.6rem; font-size: 13px; }
.footer-link { display: block; padding: 0.2rem 0; color: var(--aper-muted); }
.footer-link:hover { color: var(--aper-ink); text-decoration: underline; }

/* Cookie Banner */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50;
  max-width: 28rem; background: rgba(255,255,255,0.96); backdrop-filter: blur(20px);
  border: 1px solid var(--aper-line); border-radius: 24px;
  box-shadow: 0 25px 60px -15px rgba(0,0,0,0.22); padding: 1.5rem;
}
.hidden { display: none !important; }

