/* Public marketing site — tokens aligned with admin.css (Plus Jakarta, navy + sky) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --color-primary: #0f172a;
  --color-on-primary: #ffffff;
  --color-accent: #0369a1;
  --color-accent-hover: #0284c7;
  --color-background: #f8fafc;
  --color-foreground: #020617;
  --color-muted-fg: #64748b;
  --color-border: #e2e8f0;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 12px;
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --focus: 0 0 0 3px rgba(3, 105, 161, 0.28);
  --max: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 8px;
  z-index: 200;
}
.skip-link:focus { left: 8px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--color-foreground);
  background:
    radial-gradient(900px 480px at 0% -8%, rgba(3, 105, 161, 0.09), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(15, 23, 42, 0.04), transparent 50%),
    var(--color-background);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.site-header-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--color-primary);
  text-decoration: none;
}
.site-brand:hover { text-decoration: none; opacity: 0.92; }
.site-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #0f172a, #1e3a5f);
  display: grid;
  place-items: center;
  color: #7dd3fc;
}
.site-brand-mark svg { width: 20px; height: 20px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted-fg);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}
.site-nav a:hover { background: var(--color-surface-2); color: var(--color-foreground); text-decoration: none; }
.site-nav a.active { color: var(--color-foreground); background: var(--color-surface-2); font-weight: 600; }

.site-nav-actions { display: flex; align-items: center; gap: 8px; position: relative; }

.user-menu { position: relative; }
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(240px, 42vw);
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.user-menu-trigger:hover { border-color: #bae6fd; }
.user-menu-trigger:focus-visible { outline: none; box-shadow: var(--focus); }
.user-menu-trigger[aria-expanded="true"] {
  border-color: var(--color-accent);
  box-shadow: var(--focus);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0f172a, #0369a1);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.user-menu-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-muted-fg);
  text-transform: capitalize;
}
.user-chevron { flex-shrink: 0; color: var(--color-muted-fg); }
.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 60;
}
.user-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-foreground);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease;
}
.user-menu-item:hover {
  background: var(--color-surface-2);
  text-decoration: none;
}
.user-menu-item-danger { color: #b91c1c; }
.user-menu-item-danger:hover { background: #fef2f2; }

.site-menu-btn {
  display: none;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.site-menu-btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-accent-hover); }
.btn-secondary { background: #fff; border-color: var(--color-border); color: var(--color-primary); }
.btn-secondary:hover:not(:disabled) { background: var(--color-surface-2); }
.btn-ghost { background: transparent; color: var(--color-muted-fg); }
.btn-ghost:hover:not(:disabled) { background: var(--color-surface-2); color: var(--color-foreground); }
.btn-lg { padding: 12px 22px; font-size: 0.95rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

.site-main { padding: 0 0 64px; }

.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.hero-home {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero-home h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--color-primary);
}
.hero-accent {
  color: var(--color-accent);
  font-weight: 800;
}
.hero-home .lead {
  margin: 0 0 20px;
  font-size: 1.08rem;
  color: var(--color-muted-fg);
  max-width: 50ch;
  line-height: 1.6;
}
.hero-highlights {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.hero-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--color-foreground);
  font-weight: 500;
}
.hero-highlights svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-accent);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--color-border);
}
.hero-stats div { margin: 0; }
.hero-stats dt {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted-fg);
}
.hero-stats dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-visual {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: var(--shadow-md);
}
.hero-visual svg { width: 100%; height: auto; display: block; }
.hero-visual-cap {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--color-muted-fg);
  text-align: center;
  line-height: 1.45;
}

.section { padding: 48px 0; }
.section-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.section-sub { margin: 0 0 28px; color: var(--color-muted-fg); max-width: 52ch; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.feature-card:hover {
  border-color: #bae6fd;
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-surface-2);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1rem; }
.feature-card p { margin: 0; font-size: 0.9rem; color: var(--color-muted-fg); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  counter-reset: step;
}
.step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 0.95rem; }
.step p { margin: 0; font-size: 0.85rem; color: var(--color-muted-fg); }

.cta-band {
  margin-top: 24px;
  padding: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
a.cta-band:hover {
  text-decoration: none;
  border-color: rgba(125, 211, 252, 0.35);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
}
.cta-band h2 { margin: 0; color: #fff; font-size: 1.35rem; }
.cta-band p { margin: 6px 0 0; color: #94a3b8; font-size: 0.95rem; max-width: 42ch; }

.page-hero {
  padding: 48px 0 24px;
}
.page-hero h1 { margin: 0 0 12px; font-size: 2rem; letter-spacing: -0.02em; }
.page-hero p { margin: 0; color: var(--color-muted-fg); max-width: 60ch; }

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--color-muted-fg); font-size: 0.95rem; }
.prose ul { padding-left: 1.2rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: start;
}
.contact-card, .login-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.contact-card h2, .login-card h2 { margin: 0 0 22px; font-size: 1.35rem; letter-spacing: -0.02em; }
.contact-card p, .login-card .sub { margin: 0 0 20px; color: var(--color-muted-fg); font-size: 0.92rem; }
.login-fields { display: grid; gap: 0; }
.login-fields .field:last-of-type { margin-bottom: 20px; }
.login-fields .btn-block { margin-top: 4px; }
.login-dev-quick {
  margin-top: 16px;
  font-size: 0.85rem;
  border: 1px dashed var(--color-border);
}

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field label.req::after { content: " *"; color: #dc2626; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--focus);
}
.field-hint { font-size: 0.8rem; color: var(--color-muted-fg); margin-top: 12px; }

.login-wrap {
  min-height: calc(100vh - var(--header-h) - 120px);
  display: grid;
  place-items: center;
  padding: 40px 0;
}
.login-card { width: min(100%, 420px); }
.login-card .btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.login-mfa-fields input#otpCode {
  font-size: 1.35rem;
  letter-spacing: 0.22em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.login-mfa-actions { display: grid; gap: 8px; margin-top: 4px; }
.login-mfa-back { margin-top: 4px; font-size: 0.9rem; }


.toast-host {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: grid;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.toast.error { background: #7f1d1d; }
.toast.success { background: #065f46; }

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0 40px;
  background: #fff;
}
.site-footer-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
.site-footer p { margin: 0; font-size: 0.85rem; color: var(--color-muted-fg); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer nav a { font-size: 0.85rem; color: var(--color-muted-fg); }

@media (max-width: 900px) {
  .hero-home { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-menu-btn { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-header-inner { position: relative; }
  .steps { grid-template-columns: 1fr; }
}
