/* =========================================================
   AdevioSystems — Landing page
   ========================================================= */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-soft: rgba(16, 185, 129, 0.1);
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-mute: #94a3b8;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-line: #1e293b;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.15);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.45);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  background: var(--bg-alt);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #eef2f7; }

.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.95rem 1.8rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  background: var(--primary);
  color: #fff;
}
.brand-icon svg { width: 1.2rem; height: 1.2rem; }
.brand-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.main-nav > a:not(.btn) {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.main-nav > a:not(.btn):hover { color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.6rem 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-copy .lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0 2.4rem;
}
.hero-stats {
  display: flex;
  gap: 2.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.hero-stats span { font-size: 0.85rem; color: var(--ink-mute); }

/* Code card visual */
.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -1.2rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.25), rgba(52,211,153,0.08));
  border-radius: 1.6rem;
  filter: blur(24px);
  z-index: 0;
}
.code-card {
  position: relative;
  z-index: 1;
  background: var(--dark);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.code-card-bar {
  display: flex;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--dark-line);
}
.code-card-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #334155;
}
.code-card-bar i:first-child { background: #f87171; }
.code-card-bar i:nth-child(2) { background: #fbbf24; }
.code-card-bar i:nth-child(3) { background: #34d399; }
.code-card pre {
  margin: 0;
  padding: 1.4rem 1.5rem 1.6rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
}
.code-card code {
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  color: #cbd5e1;
}
.c-kw  { color: #c084fc; }
.c-var { color: #7dd3fc; }
.c-fn  { color: #34d399; }
.c-str { color: #fcd34d; }
.c-cm  { color: #64748b; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto clamp(2.2rem, 5vw, 3.6rem);
}
.section-head p { color: var(--ink-soft); }

.eyebrow {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.eyebrow-light { color: #6ee7b7; }

/* ---------- Service cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 1.2rem;
  border-radius: 0.85rem;
  background: var(--primary-soft);
  color: var(--primary);
  transition: background 0.25s, color 0.25s;
}
.card-icon svg { width: 1.7rem; height: 1.7rem; }
.card:hover .card-icon { background: var(--primary); color: #fff; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

.check-list {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 0.62rem no-repeat;
}

/* ---------- IA section ---------- */
.ia-section {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(16, 185, 129, 0.18), transparent 60%),
    var(--dark);
  color: #e2e8f0;
}
.ia-section h2 { color: #fff; }
.ia-section p { color: #94a3b8; }
.ia-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.ia-grid .btn-primary { margin-top: 1.6rem; }
.check-list-light li { color: #cbd5e1; }
.check-list-light li::before {
  background-color: rgba(16, 185, 129, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.ia-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.8rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
}
.chat-bubble {
  max-width: 85%;
  padding: 0.8rem 1.1rem;
  border-radius: 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
}
.chat-bubble.bot {
  align-self: flex-start;
  background: #1e293b;
  color: #e2e8f0;
  border-bottom-left-radius: 0.25rem;
}
.chat-bubble.user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}
.chat-bubble strong { color: #6ee7b7; }
.chat-bubble.user strong { color: #fff; }

/* ---------- Steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.8rem 1.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.step-num {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.85;
}
.step h3 { font-size: 1.1rem; }
.step p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ---------- Contact ---------- */
.contact-wrap { max-width: 56rem; }
.contact-card {
  background: var(--bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 1.5rem;
  padding: clamp(1.8rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-lg);
}
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}
.optional { color: var(--ink-mute); font-weight: 500; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  min-height: 1.3em;
}
.form-status.error { color: #dc2626; }
.form-status.ok { color: var(--primary-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 3rem 0 2rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--dark-line);
}
.brand-light { color: #fff; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.footer-nav a {
  color: #94a3b8;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--primary); }
.footer-bottom { padding-top: 1.6rem; font-size: 0.82rem; color: #64748b; }
.footer-bottom p { margin: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot::after { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 62rem) {
  .hero-grid,
  .ia-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 44rem) {
  .cards-grid,
  .steps-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem 1.25rem 1.2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav > a:not(.btn) {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .main-nav .btn { margin-top: 1rem; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
