:root {
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --teal: #0d9488;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -12px rgba(15, 23, 42, .18);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.logo {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 22px; font-weight: 700; line-height: 1;
}
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #fff; color: var(--blue-dark); }
.btn-primary:hover { background: #eff6ff; }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-small { padding: 8px 14px; font-size: 14px; background: #eff6ff; color: var(--blue-dark); border-color: #dbeafe; }
.btn-small:hover { background: #dbeafe; }

/* Hero */
.hero {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 55%, var(--teal) 100%);
  padding: 80px 0 0;
  overflow: hidden;
}
.hero .eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.08; margin: 14px 0 18px; letter-spacing: -.02em; max-width: 820px; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); max-width: 680px; opacity: .92; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-shot {
  margin-top: 56px; border-radius: 14px 14px 0 0; overflow: hidden;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .25); border-bottom: 0;
  cursor: zoom-in;
}

/* Stats strip */
.stats { border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.stat strong { display: block; font-size: 30px; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 15px; }

/* Sections */
section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .eyebrow { color: var(--teal); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; margin: 10px 0 14px; letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
.alt { background: var(--bg-soft); }

/* Module overview grid */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.module-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.module-card:hover { text-decoration: none; border-color: #bfdbfe; box-shadow: var(--shadow); transform: translateY(-2px); }
.icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: #eff6ff; color: var(--blue); }
.icon svg { width: 22px; height: 22px; }
.card .icon { background: #f0fdfa; color: var(--teal); }
.module-card h3 { margin: 12px 0 4px; font-size: 17px; }
.module-card p { margin: 0; color: var(--muted); font-size: 14px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); margin-left: 6px; vertical-align: middle; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; padding: 56px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature.flip .feature-text { order: 2; }
.feature-text .kicker { font-size: 13px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .1em; }
.feature-text h3 { font-size: 28px; line-height: 1.2; margin: 8px 0 12px; letter-spacing: -.01em; }
.feature-text > p { color: var(--muted); margin: 0 0 18px; }
.feature-text ul { list-style: none; padding: 0; margin: 0 0 22px; }
.feature-text li { position: relative; padding-left: 28px; margin: 9px 0; font-size: 15px; }
.feature-text li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: #ccfbf1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230d9488'%3E%3Cpath d='M8.2 13.6 4.7 10l-1.2 1.2 4.7 4.7 9-9-1.2-1.2z'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.feature-text code { font-size: 13px; background: #f1f5f9; padding: 1px 6px; border-radius: 5px; }

.gallery .main {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: #fff; cursor: zoom-in; aspect-ratio: 16 / 9;
}
.gallery .main img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.gallery .caption { color: var(--muted); font-size: 14px; margin: 12px 2px 0; min-height: 1.6em; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer;
  width: 104px; aspect-ratio: 16 / 9; background: #fff; box-shadow: 0 0 0 1px var(--line);
}
.thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.thumbs button[aria-pressed="true"] { border-color: var(--blue); box-shadow: none; }
.thumbs button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Portal special layout */
.phone {
  width: 260px; border-radius: 34px; padding: 10px; background: #0f172a; box-shadow: var(--shadow);
  margin: 0 auto;
}
.phone img { border-radius: 26px; height: 520px; width: 100%; object-fit: cover; object-position: top; }
.portal-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }

/* Cards (security, PH) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .icon { margin-bottom: 12px; }

/* Roles table */
.roles { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.roles th, .roles td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.roles th { background: var(--bg-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.roles tr:last-child td { border-bottom: 0; }
.roles td:first-child { font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }

/* Guides */
.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.guide {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-align: left; padding: 0; cursor: pointer; font: inherit; color: inherit; transition: box-shadow .15s, transform .15s;
}
.guide:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.guide:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.guide .poster { position: relative; aspect-ratio: 16 / 9; background: #e2e8f0; }
.guide .poster img { width: 100%; height: 100%; object-fit: cover; }
.guide .poster::after {
  content: "▶"; position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(15, 23, 42, .7); color: #fff; font-size: 18px; padding-left: 3px;
}
.guide .meta { padding: 14px 16px 16px; }
.guide .meta strong { display: block; font-size: 15px; }
.guide .meta span { color: var(--muted); font-size: 13px; }

/* Stack */
.stack { display: flex; flex-wrap: wrap; gap: 10px; }
.stack span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 500; }

/* CTA + footer */
.cta { background: linear-gradient(135deg, var(--blue-dark), var(--teal)); color: #fff; text-align: center; padding: 80px 0; }
.cta h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 12px; letter-spacing: -.02em; }
.cta p { opacity: .9; font-size: 18px; margin: 0 auto 28px; max-width: 600px; }
.cta .actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
footer { padding: 32px 0; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Modals */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(2, 6, 23, .86); padding: 24px;
}
.modal.open { display: flex; }
.modal img, .modal video { max-width: min(1400px, 100%); max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #000; }
.modal figure { margin: 0; text-align: center; }
.modal figcaption { color: #cbd5e1; margin-top: 12px; font-size: 15px; }
.modal .close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 24px; cursor: pointer;
}
.modal .close:hover { background: rgba(255, 255, 255, .28); }

/* Responsive */
@media (max-width: 960px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-text { order: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .menu-btn { display: block; }
  section { padding: 64px 0; }
  .hero { padding-top: 56px; }
  .cards { grid-template-columns: 1fr; }
  .thumbs button { width: 76px; }
  .phone { width: 220px; }
  .phone img { height: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .module-card, .guide { transition: none; }
}
