/* AquaSec — minimalist dark theme */

:root {
  --bg: #0b1220;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.6);
  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(94, 234, 212, 0.25);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --aqua: #5eead4;
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --gradient: linear-gradient(135deg, var(--aqua), var(--cyan), var(--sky));
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 10px;
  --max: 1080px;
  --header-h: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: calc(var(--max) + 48px);
  margin: 0 auto;
  background: rgba(11, 18, 32, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo img {
  height: 28px;
  width: auto;
}

.nav {
  display: none;
  gap: 32px;
}

.nav a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--aqua);
}

.header-cta {
  font-size: 13px;
  padding: 8px 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--aqua);
}

.btn-ghost {
  background: rgba(94, 234, 212, 0.08);
  color: var(--aqua);
  border: 1px solid rgba(94, 234, 212, 0.15);
}

.btn-ghost:hover {
  background: rgba(94, 234, 212, 0.14);
}

.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 80px) 24px 100px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aqua);
  background: rgba(94, 234, 212, 0.06);
  border: 1px solid rgba(94, 234, 212, 0.15);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(94, 234, 212, 0); }
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 64px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 16px;
  background: var(--bg-elevated);
}

.metric-value {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--aqua);
}

.metric-label {
  font-size: 12px;
  color: var(--text-dim);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  max-width: 520px;
  color: var(--text-muted);
  margin-bottom: 48px;
  line-height: 1.7;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aqua);
  margin-bottom: 16px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.capabilities {
  border-top: 1px solid var(--border);
}

.cap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cap-list li {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.cap-list li:first-child {
  border-top: 1px solid var(--border);
}

.cap-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  flex-shrink: 0;
  padding-top: 2px;
}

.cap-list strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

.cap-list span {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.pipeline {
  border-top: 1px solid var(--border);
}

.flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 48px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
  padding-left: 28px;
}

.flow-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.4);
}

.flow-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--aqua), transparent);
  margin-left: 4px;
  opacity: 0.4;
}

.flow-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--aqua);
}

.flow-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.contact {
  padding-bottom: 100px;
}

.contact-inner {
  text-align: center;
  padding: 64px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  position: relative;
  overflow: hidden;
}

.contact-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(34, 211, 238, 0.06), transparent 60%);
  pointer-events: none;
}

.contact-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
}

.contact-inner > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  position: relative;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.contact-form input {
  font-family: var(--font);
  font-size: 15px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input::placeholder {
  color: var(--text-dim);
}

.contact-form input:focus {
  border-color: var(--border-hover);
}

.contact-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 16px;
  position: relative;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer img {
  opacity: 0.7;
  height: 22px;
  width: auto;
}

.footer p {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--aqua);
}

.footer-links span {
  color: var(--text-dim);
}

@media (min-width: 640px) {
  .nav {
    display: flex;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .flow {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .flow-step {
    flex: 1;
    padding-left: 0;
    padding-top: 20px;
    align-items: center;
    text-align: center;
  }

  .flow-dot {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }

  .flow-line {
    width: auto;
    flex: 1;
    height: 1px;
    margin: 5px 0 0;
    background: linear-gradient(to right, var(--aqua), transparent);
    align-self: flex-start;
  }

  .contact-form {
    flex-direction: row;
  }

  .contact-form input {
    flex: 1;
  }
}

@media (min-width: 768px) {
  .header {
    padding: 0 32px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 120px);
  }
}

.contact-form.submitted .btn-primary {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Native cursor fallbacks ── */

a,
button,
.btn,
.card-link,
[role="button"] {
  cursor: pointer;
}

input,
textarea,
select {
  cursor: text;
}

/* ── Custom cursor ── */

.cursor,
.cursor-ring {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  will-change: transform;
  margin: 0;
}

body.custom-cursor .cursor,
body.custom-cursor .cursor-ring {
  display: block;
}

body.custom-cursor,
body.custom-cursor * {
  cursor: none !important;
}

.cursor {
  width: 6px;
  height: 6px;
  background: var(--aqua);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.6);
  opacity: 0;
  transition: opacity 0.25s, width 0.2s, height 0.2s, background 0.2s;
  transform: translate(calc(var(--x, 0px) - 50%), calc(var(--y, 0px) - 50%));
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  opacity: 0;
  transition: opacity 0.25s, width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
  transform: translate(calc(var(--x, 0px) - 50%), calc(var(--y, 0px) - 50%));
}

.cursor.is-visible,
.cursor-ring.is-visible {
  opacity: 1;
}

body[data-cursor="pointer"] .cursor {
  width: 8px;
  height: 8px;
  background: var(--cyan);
}

body[data-cursor="pointer"] .cursor-ring {
  width: 48px;
  height: 48px;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(94, 234, 212, 0.06);
}

body[data-cursor="text"] .cursor {
  width: 2px;
  height: 18px;
  border-radius: 1px;
  background: var(--aqua);
}

body[data-cursor="text"] .cursor-ring {
  width: 24px;
  height: 24px;
  opacity: 0.5;
}

body[data-cursor="click"] .cursor-ring {
  width: 32px;
  height: 32px;
  border-color: var(--aqua);
  background: rgba(94, 234, 212, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .cursor-ring {
    transition: none;
  }
}

/* ── Nav active state ── */

.nav a.is-active,
.nav a[aria-current="page"] {
  color: var(--aqua);
}

.nav a {
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:hover::after,
.nav a.is-active::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ── Link gestures ── */

.link-arrow,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--aqua);
  transition: gap 0.2s, color 0.2s;
}

.link-arrow::after {
  content: '→';
  transition: transform 0.2s;
}

.link-arrow:hover {
  gap: 10px;
  color: var(--cyan);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

.inline-link {
  text-decoration: underline;
  text-decoration-color: rgba(94, 234, 212, 0.35);
  text-underline-offset: 3px;
}

.inline-link:hover {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}

.footer-links a,
.nav a {
  transition: color 0.2s;
}

.section-cta {
  margin-top: 40px;
}

/* ── Card links ── */

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--aqua);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}

.card-link:hover .card-more {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sub-pages ── */

.page-sub main {
  padding-top: var(--header-h);
}

.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px 48px;
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-compact {
  padding-bottom: 24px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.page-hero-lead {
  max-width: 540px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

.detail-block {
  padding-top: 0;
  padding-bottom: 24px;
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s;
}

.detail-card:hover {
  border-color: var(--border-hover);
}

.detail-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aqua);
  flex-shrink: 0;
}

.detail-icon svg {
  width: 28px;
  height: 28px;
}

.detail-body h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.detail-body > p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.detail-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--aqua);
  opacity: 0.6;
}

.cta-banner {
  padding-top: 48px;
}

.cta-banner-inner {
  text-align: center;
  padding: 48px 32px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--bg-card);
}

.cta-banner-inner h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.cta-banner-inner > p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cap-list-expanded li span:last-child {
  display: block;
  margin-top: 8px;
}

/* ── Pipeline detail ── */

.pipeline-detail {
  padding-top: 0;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.pipeline-step-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s;
}

.pipeline-step-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.pipeline-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pipeline-step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--aqua);
  background: rgba(94, 234, 212, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
}

.pipeline-step-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.pipeline-step-card > p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.pipeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline-meta span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(148, 163, 184, 0.08);
  padding: 4px 10px;
  border-radius: 100px;
}

.pipeline-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Contact page ── */

.contact-page {
  padding-top: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.contact-form-wrap {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-form-full {
  max-width: none;
  flex-direction: column;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--border-hover);
}

.btn-full {
  width: 100%;
  margin-top: 8px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.contact-info-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--aqua);
}

.contact-info-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Legal pages ── */

.legal-content {
  padding-top: 0;
  padding-bottom: 100px;
}

.legal-prose {
  max-width: 680px;
}

.legal-prose h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.legal-prose h2:first-child {
  margin-top: 0;
}

.legal-prose p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-prose a {
  color: var(--aqua);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.legal-prose a:hover {
  color: var(--cyan);
}

@media (min-width: 640px) {
  .detail-card {
    flex-direction: row;
    align-items: flex-start;
  }

  .pipeline-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }

  .pipeline-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pipeline-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
