/* AutoGuard Pro — company site (Impact Elements–inspired layout) */

[data-theme="light"] {
  --accent: #ce181e;
  --accent-hover: #a0121e;
  --accent-light: #e8353b;
  --accent-subtle: rgba(206, 24, 30, 0.1);
  --accent-glow: rgba(206, 24, 30, 0.25);
  --bg: #f8f9fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5c6370;
  --text-faint: #94a3b8;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(206, 24, 30, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
  --header-bg: rgba(248, 249, 251, 0.92);
  --gradient-hero:
    radial-gradient(ellipse at 18% 45%, rgba(206, 24, 30, 0.12) 0%, transparent 58%),
    radial-gradient(ellipse at 82% 18%, rgba(206, 24, 30, 0.07) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 100%, rgba(15, 17, 23, 0.04) 0%, transparent 50%),
    linear-gradient(165deg, #fafbfc 0%, #eef1f7 45%, #faf6f7 100%);
  --grid-line: rgba(0, 0, 0, 0.055);
  --grid-mask: radial-gradient(ellipse at center, black 22%, transparent 72%);
  --logo-filter: none;
}

[data-theme="dark"] {
  --accent: #e8353b;
  --accent-hover: #ce181e;
  --accent-light: #ff6b6b;
  --accent-subtle: rgba(232, 53, 59, 0.12);
  --accent-glow: rgba(232, 53, 59, 0.3);
  --bg: #0a0c10;
  --bg-elevated: #12141c;
  --bg-card: #1a1d27;
  --text: #e8eaed;
  --text-muted: #9aa3b8;
  --text-faint: #6b7280;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(232, 53, 59, 0.45);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(10, 12, 16, 0.88);
  --gradient-hero: radial-gradient(ellipse at 20% 50%, rgba(206, 24, 30, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(206, 24, 30, 0.08) 0%, transparent 50%);
  --grid-line: rgba(255, 255, 255, 0.03);
  --grid-mask: radial-gradient(ellipse at center, black 30%, transparent 80%);
  --logo-filter: brightness(1.05);
}

:root {
  --font-body: "Inter", system-ui, sans-serif;
  --font-heading: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
  --container-max: 1280px;
  --section-padding: clamp(4rem, 8vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; color-scheme: light dark; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

body.menu-open { overflow: hidden; }

h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: -0.02em; line-height: 1.2; }

a { text-decoration: none; color: inherit; transition: color 0.15s ease; }

ul { list-style: none; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.section { padding: var(--section-padding) 0; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100001;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
}

.skip-link:focus { top: 1rem; }

/* Section headers */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.label-line {
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.section-title .accent { color: var(--accent); }

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 36rem;
  line-height: 1.7;
}

.section-header { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-header .section-subtitle { margin: 0 auto; }
.section-header.align-left { text-align: left; }
.section-header.align-left .section-subtitle { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff !important;
  transform: translateY(-2px);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

/* Header */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background var(--transition), box-shadow var(--transition);
}

#main-header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.logo-link { flex-shrink: 0; z-index: 1001; }

.logo-img {
  height: 40px;
  width: auto;
  filter: var(--logo-filter);
}

nav ul { display: flex; gap: 2rem; align-items: center; }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001;
}

.header-cta { padding: 0.625rem 1.25rem; font-size: 0.8125rem; }
.header-cta-secondary { padding: 0.625rem 1rem; font-size: 0.8125rem; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.icon-sun, .icon-moon { display: flex; align-items: center; justify-content: center; }

[data-theme="dark"] .icon-sun { display: flex; }
[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: flex; }

.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: var(--grid-mask, radial-gradient(ellipse at center, black 30%, transparent 80%));
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding: 2rem 0 4rem;
}

.logo-hero { height: clamp(56px, 10vw, 80px); width: auto; margin: 0 auto; }

.hero-brand-tagline {
  margin-top: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  max-width: 18ch;
  margin: 0 auto;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  max-width: 42rem;
  margin: 1.25rem auto 0;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Trust bar */
.trust { padding: 0 0 clamp(3rem, 6vw, 5rem); margin-top: -2rem; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.trust-item svg { color: var(--accent); flex-shrink: 0; margin-top: 0.15rem; }

.trust-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.trust-item span { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.45; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.about-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.value {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  align-items: flex-start;
}

.value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent);
  flex-shrink: 0;
}

.value h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.15rem; }
.value p { font-size: 0.8125rem; color: var(--text-muted); }

.about-visual { display: flex; flex-direction: column; gap: 1.25rem; }

.about-photo { overflow: hidden; padding: 0; }

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.principles { padding: 1.5rem; }

.principles-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dots { display: flex; gap: 0.35rem; }
.dots span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--text-faint);
}
.dots span:first-child { background: #ff5f57; }
.dots span:nth-child(2) { background: #febc2e; }
.dots span:nth-child(3) { background: #28c840; }

.principle {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.principle-icon {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.principle h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.25rem; }
.principle p { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.55; }

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.why-card { padding: 2rem; }

.why-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-subtle);
  -webkit-text-stroke: 1px var(--accent);
  color: transparent;
  margin-bottom: 1rem;
  line-height: 1;
}

.why-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.75rem; }
.why-card p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.65; }

/* Services */
.services { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.service-card { padding: 1.75rem; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent);
}

.card-num {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-faint);
}

.service-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }

.divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1rem;
}

.service-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
  line-height: 1.5;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.45rem;
}

/* Showcase */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .showcase-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.showcase-photo { overflow: hidden; padding: 0; }
.showcase-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.showcase-copy .section-subtitle { margin-bottom: 1.5rem; }

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.step {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.step-left .step-card { grid-column: 1; text-align: right; }
.step-left .node { grid-column: 2; }
.step-right .node { grid-column: 2; }
.step-right .step-card { grid-column: 3; }

.node {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 8px var(--accent-subtle);
  z-index: 1;
}

.step-card { padding: 1.5rem; }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* Audience */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.audience-card { padding: 1.75rem; border-left: 3px solid var(--accent); }
.audience-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.audience-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* CTA */
.cta-block {
  background: var(--gradient-hero);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }

.cta-inner h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-inner p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 42rem;
}

.contact-info .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.methods { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }

.method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
}

.method-icon { color: var(--accent); flex-shrink: 0; }

.method-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.method-value { font-size: 0.9375rem; font-weight: 500; }

/* Footer */
footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 1rem 0;
  max-width: 320px;
}

.footer-partner { font-size: 0.8125rem !important; }
.footer-partner a { color: var(--accent); }
.footer-partner a:hover { text-decoration: underline; }

.footer-logo { height: 36px; width: auto; filter: var(--logo-filter); }

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.footer-col ul li { margin-bottom: 0.625rem; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.875rem; }
.footer-col ul li a:hover { color: var(--accent); }

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.contact-list li svg { color: var(--accent); flex-shrink: 0; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.footer-bottom p { color: var(--text-faint); font-size: 0.8125rem; }
.footer-proprietary {
  flex: 1 1 100%;
  max-width: 42rem;
  line-height: 1.45;
}
.footer-proprietary a { color: var(--text-muted); text-decoration: underline; }
.footer-proprietary a:hover { color: var(--accent); }
.photo-credit a { color: var(--text-muted); }
.photo-credit a:hover { color: var(--accent); }

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  nav {
    position: fixed;
    inset: 0;
    background: var(--bg);
    padding: calc(var(--header-height) + 2rem) 2rem 2rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 999;
  }

  nav.open { transform: translateX(0); }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  nav ul li { width: 100%; border-bottom: 1px solid var(--border); }
  nav ul li a { display: block; padding: 1rem 0; font-size: 1.125rem; }

  .mobile-toggle { display: flex; }
  .header-cta-secondary { display: none; }

  .timeline::before { left: 1.5rem; }

  .step {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .step-left .step-card,
  .step-right .step-card {
    grid-column: 2;
    text-align: left;
  }

  .step-left .node,
  .step-right .node { grid-column: 1; grid-row: 1; }

  .node { width: 2.5rem; height: 2.5rem; font-size: 0.75rem; }

  .scroll-hint { display: none; }
}

/* Diagrams page */
.nav-link-active { color: var(--text) !important; }
.nav-link-active::after { width: 100%; }

.diagrams-hero {
  position: relative;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 2.5rem;
  overflow: hidden;
}

.diagrams-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.diagrams-hero-inner {
  position: relative;
  z-index: 1;
}

.diagram-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  max-width: 36rem;
}

.diagram-stat {
  padding: 1.25rem 1rem;
  text-align: center;
  border-color: var(--border-hover);
}

.diagram-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.diagram-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.diagrams-section {
  padding-top: 0;
  margin-top: -1rem;
}

.diagrams-layout {
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.diagram-tip {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-subtle), var(--bg-card));
  border-color: var(--border-hover);
}

.diagram-tip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--accent);
  flex-shrink: 0;
}

.diagram-tip p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.diagram-tip kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-family: var(--font-body);
  font-size: 0.8em;
  color: var(--text);
}

.diagram-workspace {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  padding: 0;
}

.diagram-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.diagram-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  flex: 1 1 9.5rem;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.diagram-tab-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.3;
}

.diagram-tab-hint {
  font-size: 0.6875rem;
  font-weight: 500;
  opacity: 0.8;
  line-height: 1.35;
}

.diagram-tab:hover {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}

.diagram-tab.active {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-hover);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.diagram-tab.active .diagram-tab-label { color: var(--accent); }
.diagram-tab.active .diagram-tab-hint { color: var(--text-muted); opacity: 1; }

.diagram-stage {
  position: relative;
  z-index: 1;
  grid-row: 2;
  padding: 1.5rem 1.75rem 1.75rem;
  background: var(--bg-card);
}

.diagram-panel {
  display: none;
}

.diagram-panel.active {
  display: block;
  animation: diagram-fade-in 0.35s ease forwards;
}

@keyframes diagram-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.diagram-panel-head {
  position: static;
  margin: 0 0 1.25rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--border);
}

.diagram-kicker {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.diagram-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
  line-height: 1.35;
}

.diagram-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 48rem;
  margin: 0;
}

.diagram-canvas {
  --dg-accent: var(--accent);
  --dg-accent-fill: var(--accent-subtle);
  --dg-accent-fill-strong: rgba(206, 24, 30, 0.16);
  --dg-surface: var(--bg-card);
  --dg-surface-muted: var(--bg-elevated);
  --dg-text: var(--text);
  --dg-text-muted: var(--text-muted);
  --dg-text-faint: var(--text-faint);
  --dg-border: var(--border);
  --dg-border-accent: var(--border-hover);
  --dg-line: var(--text-muted);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .diagram-canvas {
  --dg-accent-fill-strong: rgba(232, 53, 59, 0.22);
}

.diagram-canvas svg {
  width: 100%;
  min-width: 560px;
  height: auto;
  display: block;
  margin: 0 auto;
  font-family: var(--font-body);
}

.diagram-canvas .dg-arrow { stroke: var(--dg-line); }
.diagram-canvas .dg-line { stroke: var(--dg-line); fill: none; }
.diagram-canvas .dg-divider { stroke: var(--dg-border); }

.diagram-canvas .dg-hub,
.diagram-canvas .dg-card {
  fill: var(--dg-surface);
  stroke: var(--dg-border-accent);
  stroke-width: 1;
}

.diagram-canvas .dg-card-strong {
  fill: var(--dg-accent-fill-strong);
  stroke: var(--dg-accent);
  stroke-width: 1;
}

.diagram-canvas .dg-card-soft {
  fill: var(--dg-accent-fill);
  stroke: var(--dg-border-accent);
  stroke-width: 1;
}

.diagram-canvas .dg-zone {
  fill: none;
  stroke: var(--dg-border);
  stroke-width: 0.5;
  stroke-dasharray: 3 3;
  opacity: 0.65;
}

.diagram-canvas .dg-foot {
  fill: var(--dg-accent-fill);
  stroke: var(--dg-border-accent);
  stroke-width: 0.5;
  stroke-dasharray: 3 4;
}

.diagram-canvas .dg-pill {
  fill: var(--dg-surface-muted);
  stroke: var(--dg-border);
  stroke-width: 0.5;
  stroke-dasharray: 3 3;
}

.diagram-canvas .dg-bar {
  fill: var(--dg-surface-muted);
}

.diagram-canvas .dg-h,
.diagram-canvas .dg-t { fill: var(--dg-text); font-weight: 600; }
.diagram-canvas .dg-a { fill: var(--dg-accent); font-weight: 600; }
.diagram-canvas .dg-s { fill: var(--dg-text-muted); }
.diagram-canvas .dg-m { fill: var(--dg-text-faint); }
.diagram-canvas .dg-zone-label { fill: var(--dg-text-faint); font-weight: 600; }

.diagrams-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding-top: 0.5rem;
}

@media (max-width: 768px) {
  .diagram-hero-stats { grid-template-columns: 1fr; max-width: 14rem; }
  .diagram-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .diagram-tab {
    flex: 0 0 auto;
    min-width: 8.5rem;
    align-items: stretch;
  }
  .diagram-stage { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .scroll-line { animation: none; }
  .diagram-panel.active { animation: none; }
}

/* Roadmap page */
.roadmap-hero {
  position: relative;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 2rem;
  overflow: hidden;
}

.roadmap-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.roadmap-hero-inner { position: relative; z-index: 1; }

.roadmap-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  max-width: 36rem;
}

.roadmap-section { padding-top: 0; margin-top: -0.5rem; }

.roadmap-layout {
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.roadmap-updated {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.roadmap-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 52rem;
}

.roadmap-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.roadmap-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
}

.roadmap-legend-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-full);
}

.roadmap-legend-badge--shipped {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.roadmap-legend-badge--next {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.roadmap-legend-badge--later {
  background: rgba(107, 114, 128, 0.15);
  color: #4b5563;
}

[data-theme="dark"] .roadmap-legend-badge--shipped { color: #6ee7b7; }
[data-theme="dark"] .roadmap-legend-badge--next { color: #93c5fd; }
[data-theme="dark"] .roadmap-legend-badge--later { color: #d1d5db; }

.roadmap-legend-copy strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.roadmap-legend-copy span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.roadmap-horizon { margin-bottom: 2.5rem; }

.roadmap-horizon-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.roadmap-horizon-header h2 {
  font-size: 1.35rem;
  margin: 0;
}

.roadmap-horizon-period {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.roadmap-horizon-summary {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.roadmap-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem 1.35rem;
  height: 100%;
}

.roadmap-card--shipped { border-left: 4px solid #10b981; }
.roadmap-card--planned { border-left: 4px solid #3b82f6; }

.roadmap-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.roadmap-card-top h3 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.35;
}

.roadmap-status {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.roadmap-status--shipped {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.roadmap-status--planned {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

[data-theme="dark"] .roadmap-status--shipped { color: #6ee7b7; }
[data-theme="dark"] .roadmap-status--planned { color: #93c5fd; }

.roadmap-card-summary {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
}

.roadmap-card-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  font-style: italic;
}

.roadmap-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: auto;
}

.roadmap-tag {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-faint);
}

.roadmap-issue {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-faint);
}

.roadmap-feedback {
  padding: 1.35rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-subtle), var(--bg-card));
  border-color: var(--border-hover);
}

.roadmap-feedback h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.roadmap-feedback p {
  margin: 0;
  color: var(--text-muted);
}

.roadmap-feedback a {
  color: var(--accent);
  font-weight: 600;
}

.roadmap-loading,
.roadmap-error {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

.roadmap-error { color: var(--accent); }

@media (max-width: 768px) {
  .roadmap-hero-stats { grid-template-columns: 1fr; max-width: 14rem; }
}
