/* MachineSafe Compliance Suite — shared site theme.
   Aligned with the ISO 12100 tool dark theme (styles.css):
   bg #05070f/#0b0f1a, panels #0f172a/#0b1220, borders #1f2937,
   accent #38bdf8, success #22c55e, text #e5e7eb / #94a3b8. */

:root {
  --bg0: #05070f;
  --bg1: #0b0f1a;
  --bg2: #0b1220;
  --panel: #0f172a;
  --panel2: #111827;
  --border: #1f2937;
  --border-soft: #243142;
  --text: #e5e7eb;
  --heading: #e2e8f0;
  --muted: #94a3b8;
  --muted2: #cbd5f5;
  --accent: #38bdf8;
  --accent-deep: #2563eb;
  --accent2: #3b82f6;
  --success: #22c55e;
  --success-soft: #86efac;
  --amber: #fbbf24;
  --danger: #f87171;
  --radius: 12px;
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.6);
  --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: radial-gradient(1200px 800px at 20% 10%, #111827 0%, var(--bg1) 55%, var(--bg0) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); }

.site-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(5, 7, 15, 0.82);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #06121f; font-size: 1.1em;
}
.brand-name { color: var(--heading); font-weight: 700; line-height: 1.1; }
.brand-name small { display: block; font-weight: 400; color: var(--muted); font-size: 0.72em; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 18px; margin-left: 18px; }
.nav-links a { color: var(--muted2); text-decoration: none; font-size: 0.92em; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.nav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ---------- Buttons (match tool) ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  border: 1px solid #334155; background: #1f2937; color: var(--heading);
  font-weight: 600; font-size: 0.92em; letter-spacing: 0.03em; text-decoration: none;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-transform: uppercase;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: linear-gradient(135deg, var(--accent-deep), var(--accent2)); border-color: #1d4ed8; color: #fff; }
.btn-accent { background: linear-gradient(135deg, #0ea5e9, #22d3ee); border-color: #0284c7; color: #001018; }
.btn-ghost { background: transparent; border-color: var(--border-soft); color: var(--heading); }
.btn-sm { padding: 8px 16px; font-size: 0.8em; }
.btn-lg { padding: 15px 30px; font-size: 1em; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* auth pills (same as tool header) */
.btn-auth-login, .btn-auth-register {
  padding: 8px 18px; font-size: 0.85em; font-weight: 600; border-radius: 999px; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-auth-login { background: transparent; border: 2px solid rgba(255,255,255,0.35); color: var(--heading); }
.btn-auth-login:hover { background: rgba(255,255,255,0.12); }
.btn-auth-register { background: #fff; border: 2px solid #fff; color: var(--accent-deep); }
.btn-auth-register:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.auth-email {
  font-weight: 600; color: #fff; background: rgba(255,255,255,0.12);
  padding: 7px 13px; border-radius: 999px; font-size: 0.82em; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hidden { display: none !important; }
.auth-row { display: flex; gap: 10px; align-items: center; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 30px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.78em; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
  background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.35);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: 3em; line-height: 1.05; color: var(--heading); margin-bottom: 16px; letter-spacing: -0.02em; }
.hero h1 .grad {
  background: linear-gradient(135deg, #38bdf8, #818cf8 60%, #22c55e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.12em; max-width: 34em; margin-bottom: 24px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 0.9em; }
.hero-meta strong { color: var(--heading); display: block; font-size: 1.25em; }

.hero-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden;
}
.hero-card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #0b1220, #111827);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.hero-card-head span.title { color: var(--heading); font-weight: 600; font-size: 0.92em; }
.hero-live {
  margin-left: auto; font-size: 0.72em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--success-soft); border: 1px solid rgba(34,197,94,0.5); background: rgba(34,197,94,0.12);
  padding: 4px 10px; border-radius: 999px;
}
.hero-steps { padding: 8px 20px 20px; }
.hero-step {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border);
  font-size: 0.92em;
}
.hero-step:last-child { border-bottom: none; }
.hero-step b { color: var(--heading); }
.hero-step p { color: var(--muted); font-size: 0.92em; }
.step-n {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #06121f; font-weight: 800; font-size: 0.85em;
  display: flex; align-items: center; justify-content: center;
}
.step-n.dim { background: var(--border); color: var(--muted2); }
.hero-card .hero-step { padding: 10px 0; }
.ai-glow-text {
  background: linear-gradient(90deg, #38bdf8, #818cf8 50%, #22d3ee);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800; letter-spacing: 0.02em;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.45));
  animation: ai-glow-shift 4s ease-in-out infinite alternate;
}
@keyframes ai-glow-shift {
  from { background-position: 0% center; }
  to { background-position: 100% center; }
}
.hero-card-foot { padding: 16px 20px; background: var(--bg2); border-top: 1px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Compliance strip ---------- */
.strip {
  margin: 26px 0 0; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.strip-label { font-size: 0.75em; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.strip-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  font-size: 0.82em; font-weight: 600; color: var(--muted2);
  border: 1px solid var(--border-soft); background: var(--panel2);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.badge.hot { color: var(--accent); border-color: rgba(56,189,248,0.45); background: rgba(56,189,248,0.08); }

/* ---------- Sections ---------- */
.section { padding: 56px 0 8px; }
.section h2 { color: var(--heading); font-size: 2em; margin-bottom: 8px; letter-spacing: -0.01em; }
.section .lede { color: var(--muted); max-width: 62em; margin-bottom: 26px; font-size: 1.05em; }

/* ---------- Tools grid ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-soft); }
.tool-card.live { border-color: rgba(34,197,94,0.5); }
.tool-card-icon { font-size: 1.7em; }
.tool-card h3 { color: var(--heading); font-size: 1.12em; line-height: 1.3; }
.tool-card p { color: var(--muted); font-size: 0.93em; flex-grow: 1; }
.tool-standards { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-standards code {
  font-size: 0.75em; color: var(--accent); background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.3); padding: 3px 9px; border-radius: 999px; font-family: inherit;
}
.status {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.75em; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.live { color: var(--success-soft); }
.status.soon { color: var(--amber); }
.tool-card-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }

/* ---------- Split / feature panels ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
}
.panel h3 { color: var(--heading); margin-bottom: 10px; font-size: 1.25em; }
.panel p, .panel li { color: var(--muted); font-size: 0.95em; }
.panel ul { margin: 12px 0 0 18px; display: grid; gap: 8px; }
.panel li::marker { color: var(--accent); }
.panel li strong { color: var(--heading); }
.ai-glow-btn {
  border: 2px solid var(--accent) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.35), inset 0 0 20px rgba(56,189,248,0.08);
}

/* journey */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: j; }
.j-step { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; font-size: 0.88em; }
.j-step b { display: block; color: var(--heading); margin-bottom: 6px; }
.j-step b::before { counter-increment: j; content: counter(j) ". "; color: var(--accent); }
.j-step span { color: var(--muted); }
.j-step.done { border-color: rgba(34,197,94,0.5); }
.j-step .mini { display: inline-block; margin-top: 8px; font-size: 0.75em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mini.live { color: var(--success-soft); } .mini.soon { color: var(--amber); }

/* faq */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.faq summary { cursor: pointer; color: var(--heading); font-weight: 600; }
.faq details p { color: var(--muted); margin-top: 10px; font-size: 0.93em; }

/* cta + footer */
.cta {
  margin: 48px 0 30px; background: linear-gradient(135deg, #0b1220, #13233f);
  border: 1px solid rgba(56,189,248,0.4); border-radius: 16px; padding: 40px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: center;
}
.cta h2 { color: #fff; font-size: 1.9em; margin-bottom: 10px; }
.cta p { color: var(--muted2); margin-bottom: 18px; }
footer { border-top: 1px solid var(--border); padding: 26px 0 40px; color: var(--muted); font-size: 0.85em; }
.foot-grid { display: flex; gap: 26px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted2); text-decoration: none; } footer a:hover { color: var(--accent); }
.disclaimer { margin-top: 16px; font-size: 0.82em; color: #7c8aa0; max-width: 75em; }

/* ---------- Placeholder tool pages ---------- */
.crumb { padding: 22px 0 0; font-size: 0.85em; color: var(--muted); }
.crumb a { text-decoration: none; } .crumb a:hover { text-decoration: underline; }
.ph-hero { padding: 26px 0 10px; display: grid; gap: 14px; }
.ph-hero h1 { color: var(--heading); font-size: 2.4em; letter-spacing: -0.01em; }
.ph-hero .lede { color: var(--muted); font-size: 1.08em; max-width: 60em; }
.ph-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; margin: 22px 0 40px; }
.check-list { list-style: none; margin: 14px 0 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; color: var(--muted); font-size: 0.93em; }
.check-list li::before { content: '✓'; color: var(--success-soft); font-weight: 800; }
.notify-box { display: flex; gap: 10px; margin-top: 14px; }
.notify-box input {
  flex: 1; padding: 12px; border-radius: 8px; border: 1px solid var(--border-soft);
  background: var(--bg2); color: var(--text); font-size: 0.95em; font-family: inherit;
}
.notify-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,0.2); }

/* ---------- Auth modal (mirrors tool) ---------- */
.modal { position: fixed; inset: 0; background: rgba(2,6,23,0.8); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-content { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 420px; overflow: hidden; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #0b1220, #111827); color: var(--heading);
}
.modal-header h2 { margin: 0; font-size: 1.2em; }
.modal-close { background: none; border: none; font-size: 1.8em; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--heading); }
.modal-body { padding: 20px; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.88em; color: var(--heading); }
.auth-field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 8px;
  background: var(--bg2); color: var(--text); font-size: 1em; font-family: inherit;
}
.btn-block { width: 100%; }
.auth-error { color: #fca5a5; font-size: 0.88em; margin: 0 0 12px; }
.auth-info { color: #93c5fd; font-size: 0.88em; margin: 0 0 12px; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 0.88em; color: var(--muted); }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--border-soft); color: var(--heading);
  padding: 12px 20px; border-radius: 999px; font-size: 0.9em; z-index: 200;
  box-shadow: var(--shadow);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero, .split, .ph-grid, .cta { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .journey { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2em; }
}
@media (max-width: 620px) {
  .tools-grid, .journey { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .cta { padding: 26px; }
}

/* ---------- Futuristic aurora background (homepage preview) ---------- */
.bg-aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
  background: var(--bg0);
}
.bg-aurora .blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.5;
  will-change: transform;
}
.bg-aurora .b1 {
  width: 55vw; height: 55vw; left: -15vw; top: -20vw;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.55), transparent 65%);
  animation: aurora-drift-1 28s ease-in-out infinite alternate;
}
.bg-aurora .b2 {
  width: 48vw; height: 48vw; right: -14vw; top: -12vw;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.4), rgba(129, 140, 248, 0.25) 45%, transparent 68%);
  animation: aurora-drift-2 32s ease-in-out infinite alternate;
}
.bg-aurora .b3 {
  width: 60vw; height: 40vw; left: 20vw; bottom: -18vw;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.22), transparent 65%);
  animation: aurora-drift-3 26s ease-in-out infinite alternate;
}
@keyframes aurora-drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6vw, 4vh) scale(1.15); }
}
@keyframes aurora-drift-2 {
  from { transform: translate(0, 0) scale(1.1); }
  to { transform: translate(-5vw, 6vh) scale(0.95); }
}
@keyframes aurora-drift-3 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4vw, -3vh) scale(1.1); }
}
.bg-aurora .grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.6;
}
.bg-aurora .grain {
  position: absolute; inset: 0; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
.site-wrap { position: relative; z-index: 1; }

/* ---------- Subtle scroll reveal ---------- */
.reveal { opacity: 0; translate: 0 18px; transition: opacity 0.7s ease, translate 0.7s ease; }
.reveal.visible { opacity: 1; translate: 0 0; }
.tools-grid .tool-card.reveal:nth-child(2) { transition-delay: 0.06s; }
.tools-grid .tool-card.reveal:nth-child(3) { transition-delay: 0.12s; }
.tools-grid .tool-card.reveal:nth-child(4) { transition-delay: 0.18s; }
.tools-grid .tool-card.reveal:nth-child(5) { transition-delay: 0.24s; }
.tools-grid .tool-card.reveal:nth-child(6) { transition-delay: 0.3s; }
.tools-grid .tool-card.reveal:nth-child(n+7) { transition-delay: 0.36s; }
.tool-card:hover { transform: translateY(-5px); border-color: rgba(56, 189, 248, 0.45); }
.hero-live { animation: live-pulse 2.4s ease-in-out infinite; }
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@media (max-width: 620px) {
  .bg-aurora .blob { filter: blur(60px); }
  .bg-aurora .b3, .bg-aurora .grain { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-aurora .blob, .hero-live, .ai-glow-text { animation: none; }
  .reveal { opacity: 1; translate: none; transition: none; }
}
