/* =========================================================
   Scorpion AI Tooling — Core Design System
   (Animations live separately in animations.css — do not merge)
   ========================================================= */

:root {
  /* Brand palette */
  --bg: #08080a;
  --surface: #0d0d10;
  --surface-alt: #141418;
  --border: #2a1114;
  --border-2: #3a1418;
  --text: #f0e9ea;
  --text-muted: #8a7a7c;
  --accent: #ff2a3a;
  --accent-dark: #b3121f;
  --brand-red: #C0102A;
  --glow: rgba(255, 42, 58, 0.55);
  --radius: 12px;

  /* Feedback colours (not in brand palette; needed for form status states) */
  --success: #3ed69b;
  --error: #ff6b6b;

  /* Type */
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container-w: 1180px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
a { color: inherit; }

/* ---------- Base ---------- */
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 42, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 42, 58, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse 900px 600px at 8% -8%, rgba(255, 42, 58, 0.16), transparent 60%),
    radial-gradient(ellipse 900px 700px at 100% 108%, rgba(179, 18, 31, 0.20), transparent 60%);
  background-size: 42px 42px, 42px 42px, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

p { color: var(--text); }
p + p { margin-top: var(--space-2); }

a { text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--space-5) 0;
}
.section + .section { border-top: 1px solid var(--border); }

.section-title {
  margin-bottom: var(--space-4);
  text-align: center;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto var(--space-4);
  text-align: center;
  color: var(--text-muted);
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent);
}

.grid {
  display: grid;
  gap: var(--space-3);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 10, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand-logo { border-radius: 6px; }
.brand-name {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0;
}

.nav-cta {
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 0.5rem 1rem !important;
  background: var(--surface-alt);
}
.nav-cta:hover { border-color: var(--accent); }

[data-auth="in"] { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 250ms var(--ease-standard, ease),
                padding 250ms var(--ease-standard, ease);
  }
  .site-nav.is-open { max-height: 420px; padding: 0.5rem 24px 1.25rem; }
  .site-nav .nav-link { width: 100%; padding: 0.75rem 0; }
  .nav-cta { width: 100%; text-align: left; margin-top: 0.5rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 1.05rem 2.2rem; font-size: 0.95rem; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.72rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.card h3 {
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.card-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero { padding: var(--space-6) 0 var(--space-5); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}
.hero-content h1 { margin: 0.9rem 0 0.6rem; }
.hero-subheading {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--font-sans);
  margin-bottom: 0.75rem;
}
.hero-desc { color: var(--text-muted); max-width: 46ch; }
.hero-cta { display: flex; gap: 1rem; margin-top: 1.75rem; flex-wrap: wrap; }
.hero-banner {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 42, 58, 0.12);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}

/* ---------- Why choose us ---------- */
.why-list { }
.why-item { color: var(--text-muted); }
.why-item strong { color: var(--text); }

/* ---------- Case study ---------- */
.case-study-card { text-align: left; }
.case-study-quote {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0.5rem 0 1rem;
}
.case-study-quote footer,
.case-study-attribution {
  margin-top: 0.6rem;
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  font-style: normal;
}
.case-study-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.case-study-grid { align-items: stretch; }

/* ---------- Pricing ---------- */
.pricing-card { display: flex; flex-direction: column; }
.pricing-card.is-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pricing-card .price {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--text);
  margin: 0.5rem 0 0.1rem;
}
.pricing-card .price span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pricing-card .price-alt {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.pricing-card .price-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--surface-alt);
  border: 1px solid var(--border-2);
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.pricing-specs {
  margin: 1rem 0;
  border-top: 1px solid var(--border);
}
.pricing-specs div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.pricing-specs dt { color: var(--text-muted); }
.pricing-specs dd { text-align: right; }
.pricing-card .btn { margin-top: auto; }

.pricing-note {
  max-width: 720px;
  margin: var(--space-3) auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.addon-grid { margin-top: var(--space-4); }
.addon-card h3 { color: var(--text); }

.founding-offer {
  margin-top: var(--space-4);
  text-align: center;
  background: var(--surface-alt);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.founding-offer h3 { color: var(--accent); margin-bottom: 0.75rem; }
.founding-offer p { max-width: 640px; margin-left: auto; margin-right: auto; color: var(--text-muted); }
.founding-offer .btn { margin-top: 1.25rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  background: var(--surface);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.92rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
  margin-left: 1rem;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  padding: 0 1.4rem 1.25rem;
  color: var(--text-muted);
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
input[type="text"],
input[type="email"],
input[type="file"],
select,
textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 42, 58, 0.15);
}
.form-row { margin-bottom: 1.25rem; }
.hidden-field { position: absolute; left: -9999px; top: -9999px; }

.form-status {
  min-height: 1.3rem;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 150ms ease;
}
.form-status:empty { opacity: 0; }
.form-status.success, .form-status.error { opacity: 1; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }

.contact-form { max-width: 640px; }
.contact-fallback {
  margin-top: var(--space-3);
  color: var(--text-muted);
}
.contact-fallback a { color: var(--accent); }

/* ---------- Dropzone content ---------- */
.dropzone {
  position: relative;
  padding: 1.5rem;
  text-align: center;
}
.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.dropzone-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.dropzone-hint { font-size: 0.78rem; color: var(--text-muted); opacity: 0.75; }
.dropzone-filename {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  word-break: break-all;
}

/* ---------- Progress bar ---------- */
.form-progress {
  margin-top: 1rem;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-alt);
  overflow: hidden;
}
.form-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 400ms var(--ease-standard, ease);
}

/* ---------- Portal / legal documents ---------- */
.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: var(--space-4);
  align-items: start;
}
@media (max-width: 900px) {
  .portal-grid { grid-template-columns: 1fr; }
}

.upload-form { }

.upload-list { display: flex; flex-direction: column; gap: 1rem; }
.upload-list-empty {
  color: var(--text-muted);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.upload-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.upload-item-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.upload-item-header h3 {
  color: var(--text);
  text-transform: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: normal;
}
.upload-item-date {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
}
.upload-item-note {
  margin-top: 0.5rem;
  color: var(--text-muted);
  white-space: pre-wrap;
}
.upload-item-file { margin-top: 0.85rem; }

/* Legal documents: calm, archival tone — no hover-lift, no glow */
.upload-item-calm {
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
  background: var(--surface);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand-name {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}
.footer-tagline {
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}
.footer-contact a { color: var(--text-muted); }
.footer-contact a:hover { color: var(--accent); }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.footer-nav a {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-nav a:hover { color: var(--accent); }
.footer-copyright {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* ---------- 404 ---------- */
.not-found-section { text-align: center; }
.not-found-section h1 { margin-bottom: 0.75rem; }
.not-found-section p { color: var(--text-muted); margin-bottom: var(--space-4); }

/* ---------- Thank you ---------- */
.thank-you-section { text-align: center; }
.thank-you-section h1 { margin-bottom: 0.75rem; }
.thank-you-section p { color: var(--text-muted); margin-bottom: var(--space-3); }
.thank-you-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: var(--space-3); }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta p { color: var(--text-muted); max-width: 560px; margin: 0.75rem auto var(--space-3); }
