/* Dynamic Gravity Systems: single hand-written stylesheet, no framework. */
:root {
  --indigo-900: #1b1141;
  --indigo-700: #2e1d6b;
  --indigo-500: #4a35a0;
  --blue-600: #1a6aa5;
  --blue-500: #2384c6;
  --ink: #1d2233;
  --muted: #5a6178;
  --line: #dfe2ec;
  --bg: #ffffff;
  --bg-alt: #f4f5fa;
  --photo-bg: #a9a9a9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 15, 50, .06), 0 6px 20px rgba(20, 15, 50, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 1.0625rem; }
img { max-width: 100%; height: auto; }
a { color: var(--blue-600); }
a:hover { color: var(--indigo-700); }
h1, h2, h3 { line-height: 1.2; color: var(--indigo-900); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--indigo-900); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; font-weight: 650; letter-spacing: .01em; }
.brand img { border-radius: 50%; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a { color: #dcd8f2; text-decoration: none; padding: .5rem .85rem; border-radius: 6px; font-weight: 500; }
.site-nav a:hover, .site-nav a.active { color: #fff; background: rgba(255, 255, 255, .1); }
.site-nav a.btn { margin-left: .5rem; color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 24px; height: 2px; background: #fff; content: ""; position: relative; }
.nav-toggle-bars::before { top: -7px; position: absolute; }
.nav-toggle-bars::after { top: 7px; position: absolute; }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; inset: 64px 0 auto 0; background: var(--indigo-900); flex-direction: column; align-items: stretch; padding: .5rem 1rem 1rem; border-top: 1px solid rgba(255, 255, 255, .1); }
  .site-nav.open { display: flex; }
  .site-nav a.btn { margin: .5rem 0 0; text-align: center; }
}

/* Buttons */
.btn { display: inline-block; background: var(--blue-600); color: #fff; text-decoration: none; padding: .7rem 1.3rem; border-radius: 8px; font-weight: 600; border: 2px solid var(--blue-600); cursor: pointer; font: inherit; font-weight: 600; line-height: 1.3; }
.btn:hover { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.btn-small { padding: .45rem 1rem; }
.btn-ghost { background: transparent; color: var(--blue-600); }
.btn-ghost:hover { background: var(--blue-600); color: #fff; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .btn-ghost:hover { background: #fff; color: var(--indigo-900); border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }

/* Hero and page headers */
.hero { background: radial-gradient(1200px 500px at 85% 20%, #3b2a86 0%, transparent 60%), linear-gradient(135deg, var(--indigo-900), var(--indigo-700)); color: #fff; }
.hero h1 { color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; padding-block: 3.5rem; }
.hero .lead { color: #d8d3f3; }
.hero-media img { display: block; margin-inline: auto; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); background: var(--photo-bg); }
@media (max-width: 800px) { .hero-inner { grid-template-columns: 1fr; padding-block: 2.5rem; } }
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding-block: 2.5rem 2rem; }
.page-head h1 { font-size: clamp(1.8rem, 3vw + 1rem, 2.6rem); }
.page-head .lead { max-width: 52rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--blue-600); margin-bottom: .4rem; }
.hero .eyebrow { color: #8fc7ee; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }

/* Sections */
.section { padding-block: 3rem; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 1.75rem; }
.prose-wide { max-width: 52rem; }
.prose h2 { margin-top: 2rem; }
.prose h3, .prose h4, .prose h5 { margin: 1.5rem 0 .5rem; color: var(--indigo-900); }
.prose ul, .prose ol { padding-left: 1.25rem; }

/* Cards */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-link { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20, 15, 50, .08), 0 12px 28px rgba(20, 15, 50, .12); color: inherit; }
.card-body { padding: 1.25rem 1.4rem; }
.card-body p:last-child { margin-bottom: 0; }
.card-body h2 a { color: inherit; text-decoration: none; }
.card-body h2 a:hover { color: var(--blue-600); }
.card-image { background: var(--photo-bg); }
.card-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-row { flex-direction: row; }
.card-row .card-image { flex: 0 0 280px; }
.stack { display: grid; gap: 1.5rem; }
@media (max-width: 700px) { .card-row { flex-direction: column; } .card-row .card-image { flex-basis: auto; } }

.logos { list-style: none; display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: center; align-items: center; padding: 0; margin: 0; }
.logos img { height: 48px; width: auto; filter: grayscale(1); opacity: .75; transition: .2s; mix-blend-mode: multiply; }
.logos img:hover { filter: none; opacity: 1; }

/* Product page */
.product-layout { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 800px) { .product-layout { grid-template-columns: 1fr; } }
.product-image { border-radius: var(--radius); overflow: hidden; }
.doc-list h2 { font-size: 1.15rem; margin-top: 1.75rem; }
.doc-list ul { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.doc-list li + li { border-top: 1px solid var(--line); }
.doc-list a { display: flex; gap: .75rem; padding: .75rem 1rem; text-decoration: none; color: var(--ink); align-items: center; }
.doc-list a:hover { background: var(--bg-alt); }
.doc-list small { display: block; color: var(--muted); line-height: 1.35; }
.specs { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
.specs th { width: 38%; font-weight: 600; color: var(--indigo-900); background: var(--bg-alt); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; width: 100%; max-height: 520px; object-fit: contain; }

.service-layout { display: grid; grid-template-columns: 1fr minmax(200px, 340px); gap: 2.5rem; align-items: start; }
@media (max-width: 800px) { .service-layout { grid-template-columns: 1fr; } }
.service-image { margin: 0; }
.service-image img { border-radius: var(--radius); border: 1px solid var(--line); }
.news-image { margin: 0 0 1.5rem; }
.news-image img { border-radius: var(--radius); max-height: 420px; }

/* Publications */
.pub-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.pub-list li { display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.pub-list h2 { font-size: 1.15rem; margin-bottom: .25rem; }
.pub-list p { color: var(--muted); margin: 0; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-card { margin-bottom: 1rem; }
.contact-card h2 { font-size: 1.25rem; margin-bottom: .1rem; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], textarea { width: 100%; font: inherit; padding: .65rem .8rem; border: 1px solid #b9bdcf; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, textarea:focus { border-color: var(--blue-500); outline: 3px solid rgba(35, 132, 198, .25); }
[aria-invalid=true] { border-color: #b3261e !important; }
.field-error { color: #b3261e; font-size: .9rem; margin: .3rem 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-bottom: 1.1rem; min-height: 65px; }
.notice { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.notice p { margin: 0; }
.notice-success { background: #e6f5ec; border: 1px solid #9bd4b0; color: #14532d; }
.notice-error { background: #fdecea; border: 1px solid #f1aeb5; color: #7a1a14; }

/* Footer */
.site-footer { background: var(--indigo-900); color: #cfcae8; padding-top: 3rem; margin-top: 0; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer a { color: #cfcae8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2rem; padding-block: 1.25rem; font-size: .9rem; }
.footer-legal p { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
