/*
 * Adaptive Impact — AI automation agency landing page
 * Standalone, light / premium theme. Plain HTML + CSS, no framework.
 */

/* ============================== Tokens ============================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5fb;
  --bg-ink: #0d0a16;

  --ink: #16131f; /* headings */
  --text: #4a4756; /* body */
  --muted: #7c7889;

  --line: #e9e7f0;
  --line-strong: #d8d4e4;

  --brand: #7c3aed;
  --brand-ink: #6d28d9; /* readable violet on white */
  --brand-soft: rgba(124, 58, 237, 0.08);
  --brand-grad: linear-gradient(135deg, #7c4dff 0%, #6d28d9 55%, #1a1430 100%);

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14, 17, 22, 0.04), 0 1px 3px rgba(14, 17, 22, 0.06);
  --shadow: 0 18px 50px -24px rgba(14, 17, 22, 0.25);
  --shadow-lg: 0 40px 80px -36px rgba(14, 17, 22, 0.4);
  --max: 1120px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}

.accent {
  color: var(--brand);
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-ink);
}

/* ============================== Buttons ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}
.btn-block {
  width: 100%;
}
.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(124, 58, 237, 0.6);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -12px rgba(124, 58, 237, 0.7);
}
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ============================== Header ============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(14, 17, 22, 0.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  flex: none;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand-name strong {
  font-weight: 800;
}
.brand-name .brand-light {
  font-weight: 400;
  color: var(--text);
}
.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav > a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s ease;
}
.nav > a:not(.btn):hover {
  color: var(--ink);
}

/* ============================== Hero ============================== */
.hero {
  position: relative;
  padding: 96px 0 84px;
  background:
    radial-gradient(820px 380px at 80% -10%, var(--brand-soft), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
/* faint dot grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(14, 17, 22, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
  mask-image: linear-gradient(180deg, #000, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.5rem);
  font-weight: 800;
  margin: 16px 0 0;
}
.hero .lead {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--text);
  max-width: 540px;
  margin: 20px 0 0;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.hero-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

/* Hero flow diagram card */
.flow-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  position: relative;
}
.flow-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.flow-head .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dfe3e9;
}
.flow-head .dot:first-child {
  background: var(--brand);
}
.flow-title {
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.flow-svg {
  width: 100%;
  height: auto;
}
.flow-node rect {
  fill: var(--bg-soft);
  stroke: var(--line-strong);
  stroke-width: 1;
}
.flow-node.out rect {
  fill: #fff;
  stroke: rgba(124, 58, 237, 0.35);
}
.flow-node text {
  fill: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-anchor: start;
  font-family: var(--font);
}
.flow-ico {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-node.out .flow-ico {
  stroke: var(--brand);
}
.flow-node.out .flow-ico path:first-child {
  fill: rgba(124, 58, 237, 0.12);
}

/* AI core */
.hex-label {
  fill: #fff;
  font-size: 15px;
  font-weight: 800;
  text-anchor: middle;
  font-family: var(--font);
  letter-spacing: 0.04em;
}
.hex-ring {
  fill: none;
  stroke: rgba(124, 58, 237, 0.3);
  stroke-width: 1.2;
}
.flow-halo {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.js .flow-halo {
  animation: flow-halo 4s ease-out infinite;
}
.js .flow-halo.halo-2 {
  animation-delay: 0.28s;
}
/* Ripple stays dormant, then blooms as the input packets converge (~75% of cycle). */
@keyframes flow-halo {
  0%,
  68% {
    opacity: 0;
    transform: scale(0.82);
  }
  76% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* connector tracks + traveling packets */
.flow-track path {
  opacity: 0.28;
}
.pkt {
  fill: var(--brand);
  opacity: 0;
  filter: drop-shadow(0 0 3.5px rgba(124, 58, 237, 0.65));
}
.pkt.out {
  fill: var(--brand-ink);
}
@media (prefers-reduced-motion: reduce) {
  .js .flow-halo {
    animation: none;
  }
}

/* ============================== Trust strip ============================== */
.trust {
  background: var(--bg-ink);
  color: #cfd5de;
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 36px;
  padding: 20px 24px;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.trust-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
}

/* ============================== Sections ============================== */
section {
  padding: 92px 0;
}
.section-head {
  max-width: 720px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin-top: 14px;
}
.section-sub {
  margin-top: 18px;
  font-size: 1.06rem;
  color: var(--text);
}

/* Problem stats */
.problem {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.stat-label {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 18px;
}
.card-icon svg {
  width: 24px;
  height: 24px;
}
.card h3 {
  font-size: 1.16rem;
  margin-bottom: 10px;
}
.card p {
  font-size: 0.96rem;
  color: var(--text);
}

/* How it works */
.how {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
}
/* connecting line behind the step numbers (desktop) */
.steps::before {
  content: '';
  position: absolute;
  top: 47px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 8px,
    transparent 8px 16px
  );
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px -8px rgba(124, 58, 237, 0.7);
}
.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.step p {
  font-size: 0.93rem;
  color: var(--text);
}

/* Security */
.security-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
}
.security-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 14px 0 16px;
}
.check-list {
  list-style: none;
  margin-top: 22px;
  display: grid;
  gap: 12px;
}
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1.5px solid var(--brand);
}
.check-list li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  width: 4px;
  height: 8px;
  border: solid var(--brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.security-card {
  background: var(--bg-ink);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  color: #e9edf3;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.security-card::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
  pointer-events: none;
}
.security-badge {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 12px 30px -16px rgba(124, 58, 237, 0.6);
}
.security-badge img {
  border-radius: 12px;
}
.security-quote {
  position: relative;
  font-size: 1.2rem;
  line-height: 1.5;
  font-weight: 500;
  color: #fff;
}

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 52px;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 14px 0 14px;
}
.contact-details {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 10px;
  font-size: 1.02rem;
}
.contact-details a:hover {
  color: var(--brand-ink);
}
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-group input,
.form-group textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-group textarea {
  resize: vertical;
}
.form-status {
  margin-top: 14px;
  font-size: 14px;
  display: none;
}
.form-status.show {
  display: block;
}
.form-status.pending {
  color: var(--muted);
}
.form-status.success {
  color: #137a3e;
}
.form-status.error {
  color: var(--brand-ink);
}

/* ============================== Footer ============================== */
.site-footer {
  background: var(--bg-ink);
  color: #aab2bf;
  padding: 48px 0;
}
.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-brand .brand-name {
  color: #fff;
  letter-spacing: 0.1em;
}
.footer-tag {
  font-size: 14px;
}
.footer-legal {
  font-size: 12.5px;
  color: #6b7380;
}

/* ============================== Reveal ============================== */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js .flow-halo {
    animation: none;
  }
  .pkt {
    display: none;
  }
}

/* ============================== Responsive ============================== */
@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero .lead {
    max-width: none;
  }
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps::before {
    display: none;
  }
  .security-inner,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
@media (max-width: 760px) {
  .nav {
    gap: 14px;
  }
  .nav > a:not(.btn) {
    display: none;
  }
  .brand-sub {
    display: none;
  }
  section {
    padding: 64px 0;
  }
  .hero {
    padding: 72px 0 60px;
  }
}
@media (max-width: 560px) {
  .service-grid,
  .steps,
  .stat-row,
  .form-row {
    grid-template-columns: 1fr;
  }
}
