/* ==========================================================================
   AIGenesis — corporate site
   Layout vocabulary: Techex (pill buttons, circular icons, illustrated hero,
   skill bars, services grid, dark stat band, soft blobs).
   Art direction: ui-ux-pro-max (AI purple accent, neutral tones,
   Space Grotesk + DM Sans). Static, no build step.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f6f5fb;
  --bg-alt: #eeebf8;
  --navy: #18142e;
  --navy-soft: #221c44;
  --border: #e9e6f3;
  --border-strong: #d8d3ea;

  /* Text */
  --text: #1b1733;
  --text-muted: #595470;
  --text-dim: #6b6685;

  /* Brand — AI purple */
  --brand: #7c3aed;
  --brand-dark: #6d28d9;
  --brand-soft: #f3eefe;
  --brand-2: #a78bfa;
  --accent: #06b6d4;
  --coral: #fb7185;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --space: clamp(1rem, 4vw, 2rem);

  --shadow-sm: 0 1px 2px rgba(27, 23, 51, 0.04), 0 4px 12px rgba(27, 23, 51, 0.05);
  --shadow-md: 0 12px 30px rgba(27, 23, 51, 0.08);
  --shadow-brand: 0 14px 30px -10px rgba(124, 58, 237, 0.5);

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Space Grotesk", var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space);
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.14; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.5em; color: var(--text); }
h1 { font-size: clamp(2rem, 7vw, 4rem); overflow-wrap: break-word; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1rem;
}
.brand-text { color: var(--brand); }
.lead { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--text-muted); max-width: 60ch; }

/* ---------- Buttons (pill — Techex) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; border-color: var(--border-strong); color: var(--brand); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--text); }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand);
  display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 1.05rem;
}
.nav-links { display: flex; align-items: center; gap: 0.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { padding: 0.5rem 0.9rem; border-radius: 8px; font-size: 0.95rem; font-weight: 500; color: var(--text-muted); transition: color 0.15s ease, background 0.15s ease; }
.nav-links a:not(.btn):hover { color: var(--text); background: var(--bg-soft); }
.nav-links a.active { color: var(--brand); }
.nav-cta { margin-left: 0.5rem; }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; width: 42px; height: 42px; color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

/* Keyboard focus visibility (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn-primary:focus-visible, .band-dark a:focus-visible, .cta-band a:focus-visible, .cta-band .btn:focus-visible {
  outline-color: #fff;
}

/* ---------- Sections ---------- */
section { padding: clamp(3.2rem, 8vw, 6rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 62ch; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead, .cta-band .lead { margin-inline: auto; }

/* ---------- Hero (illustrated + blobs) ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(3rem, 6vw, 5rem); }
.hero::before {
  content: ""; position: absolute; z-index: 0;
  width: 620px; height: 620px; border-radius: 50%;
  left: -260px; top: 40px;
  background: radial-gradient(circle, var(--brand-soft) 0%, rgba(243, 238, 254, 0) 70%);
}
.hero::after {
  content: ""; position: absolute; z-index: 0;
  top: 0; right: -10%; width: 55%; height: 100%;
  background: linear-gradient(160deg, var(--bg-soft) 0%, rgba(246, 245, 251, 0) 60%);
  transform: skewX(-12deg);
  transform-origin: top right;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.hero-single { position: relative; z-index: 1; max-width: 60ch; }

/* Illustration container */
.illus { width: 100%; }
.illus svg { width: 100%; height: auto; }

/* ---------- Cards / Grids (Techex feature/service cards) ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-bottom: 3px solid transparent;
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-bottom-color: var(--brand); }
/* Circular outline icon (Techex) */
.card .icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 1.3rem;
  background: var(--brand-soft);
  border: 1px solid var(--border-strong);
  color: var(--brand);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.card:hover .icon { background: var(--brand); border-color: var(--brand); color: #fff; }
.card .icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; font-size: 0.95rem; }
.card .more { display: inline-block; margin-top: 1rem; font-weight: 600; font-size: 0.9rem; color: var(--brand); }
.card .more:hover { text-decoration: underline; }

/* ---------- About / skill bars (Techex) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

.skills { margin-top: 1.8rem; display: grid; gap: 1.2rem; }
.skill-top { display: flex; justify-content: space-between; font-size: 0.92rem; font-weight: 600; }
.skill-top .pct { color: var(--brand); }
.skill-track { height: 7px; border-radius: 999px; background: var(--bg-alt); margin-top: 0.5rem; overflow: hidden; }
.skill-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1); }

/* Visual blob (for illustrations beside text) */
.blob-visual { position: relative; }
.blob-visual::before {
  content: ""; position: absolute; inset: 6% 6%;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: var(--brand-soft);
  z-index: 0;
}
.blob-visual.coral::before { background: #ffe9ec; }
.blob-visual .illus { position: relative; z-index: 1; }

/* ---------- Why-choose list (icon-left) ---------- */
.why-list { display: grid; gap: 1.6rem; }
.why-item { display: flex; gap: 1.1rem; align-items: flex-start; }
.icon-circle {
  width: 56px; height: 56px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft);
  border: 1px solid var(--border-strong);
  color: var(--brand);
}
.icon-circle svg { width: 24px; height: 24px; }
.why-item h3 { margin: 0 0 0.25rem; }
.why-item p { margin: 0; font-size: 0.95rem; }

/* ---------- Dark principles band (Techex stat band) ---------- */
.band-dark {
  background: var(--navy);
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 45% 80%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,0.25), transparent),
    radial-gradient(60% 120% at 80% 0%, rgba(124,58,237,0.4), transparent 70%);
  color: #fff;
}
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.principle .p-ico { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); color: var(--brand-2); }
.principle .p-ico svg { width: 26px; height: 26px; }
.principle strong { display: block; font-family: var(--font-heading); font-size: 1.05rem; color: #fff; }
.principle span { font-size: 0.9rem; color: rgba(255,255,255,0.65); }

/* ---------- Product detail blocks ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(2.5rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--border); }
.feature-row:last-child { border-bottom: none; }
.tag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 0.35rem 0.85rem; border-radius: 999px; margin-bottom: 1rem; }
.feature-visual {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(60% 60% at 50% 45%, var(--brand-soft), rgba(243, 238, 254, 0) 70%),
    linear-gradient(160deg, #fbfaff, var(--bg-soft));
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
  color: var(--brand); padding: 2rem; overflow: hidden;
}
.feature-visual::before { content: ""; position: absolute; width: 128px; height: 128px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }
.feature-visual::after { content: ""; position: absolute; right: 17%; top: 19%; width: 14px; height: 14px; border-radius: 50%; background: var(--coral); }
.feature-visual svg { position: relative; width: 72px; height: 72px; opacity: 0.95; }
.feature-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.7rem; }
.feature-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--text-muted); font-size: 0.97rem; }
.feature-list li svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }

/* ---------- About: values ---------- */
.values { margin-top: 1rem; }
.value-item { padding: 1.5rem 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; }
.value-item h3 { margin: 0; }
.value-item p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); }
.contact-card .role { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand); font-weight: 700; }
.contact-card .email { font-size: 1.18rem; font-weight: 600; margin-top: 0.3rem; color: var(--text); }
.contact-card .email a { border-bottom: 2px solid var(--brand-soft); transition: border-color 0.15s ease; }
.contact-card .email a:hover { border-color: var(--brand); }
.contact-card .desc { font-size: 0.9rem; color: var(--text-dim); margin: 0.4rem 0 0; }

.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text); margin-bottom: 0.4rem; }
.field input, .field textarea { width: 100%; background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); padding: 0.78rem 1rem; font-family: inherit; font-size: 0.95rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-note { font-size: 0.82rem; color: var(--text-dim); }

/* ---------- Notice / info ---------- */
.notice { border: 1px solid var(--border-strong); border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 2rem; }
.notice strong { color: var(--text); }
.notice code { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 0.05rem 0.35rem; font-size: 0.85em; }
.info-list { border-top: 1px solid var(--border); }
.info-row { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--border); }
.info-row dt { font-weight: 600; color: var(--text); margin: 0; }
.info-row dd { margin: 0; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand); border-radius: var(--radius); padding: clamp(2.5rem, 6vw, 3.8rem); text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; right: -120px; top: -160px; background: rgba(255,255,255,0.08); }
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: rgba(255, 255, 255, 0.88); position: relative; }
.cta-band .eyebrow { color: rgba(255, 255, 255, 0.78); }
.cta-band .btn { margin-top: 1.4rem; background: #fff; color: var(--brand); box-shadow: none; position: relative; }
.cta-band .btn:hover { background: #f1ecff; transform: translateY(-2px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 3rem 0 2rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.footer-top p { font-size: 0.9rem; }
.footer-cols { display: flex; flex-wrap: wrap; gap: clamp(2rem, 6vw, 4rem); }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin: 0 0 0.9rem; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.92rem; padding: 0.25rem 0; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Motion: scroll reveal (AOS-style) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.r-left { transform: translateX(-42px); }
.reveal.r-right { transform: translateX(42px); }
.reveal.r-zoom { transform: scale(0.9); }
.reveal.visible { opacity: 1; transform: none; }

/* Continuous gentle float on illustrations (Techex hero feel) */
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.illus svg { animation: float-y 6s ease-in-out infinite; }
.hero .illus svg { animation-duration: 7s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero .illus { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}
/* Mobile nav appears before the horizontal nav overflows (~tablet portrait) */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
    padding: 0.5rem var(--space) 1rem;
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 480px; }
  .nav-links a:not(.btn) { padding: 0.85rem 0.5rem; }
  .nav-cta { margin: 0.5rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}
@media (max-width: 760px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-visual { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .value-item, .info-row { grid-template-columns: 1fr; gap: 0.4rem; }
}
@media (max-width: 460px) {
  .principles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; transition-delay: 0s !important; }
  .skill-fill { transition: none; }
  .illus svg { animation: none; }
}
