/* ============================================================
   Maxentis — Design System & Styles
   Light + minimal. Plain CSS, no build step.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --bg:            #ffffff;
  --bg-soft:       #f7f8fb;
  --bg-alt:        #f4f5fa;
  --surface:       #ffffff;
  --border:        #e6e8ef;
  --text:          #14161d;
  --text-soft:     #51566b;
  --text-mut:      #8a90a6;

  --accent:        #4f46e5;
  --accent-2:      #7c3aed;
  --accent-soft:   #eef0fe;
  --accent-ring:   rgba(79, 70, 229, .35);

  --grad:          linear-gradient(120deg, #4f46e5 0%, #7c3aed 100%);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(20, 22, 29, .04), 0 1px 3px rgba(20, 22, 29, .06);
  --sh-md: 0 6px 24px rgba(20, 22, 29, .07);
  --sh-lg: 0 24px 60px rgba(40, 38, 90, .12);

  /* Layout */
  --container: 1140px;
  --gutter: 24px;
  --section-y: clamp(64px, 9vw, 120px);

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Sora", var(--font-body);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -.02em; }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px var(--accent-ring); }
.btn-primary:hover { box-shadow: 0 12px 28px var(--accent-ring); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); box-shadow: var(--sh-sm); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--sh-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-mark { display: inline-flex; }
.brand-name { color: var(--text); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav > a:not(.btn) { color: var(--text-soft); font-weight: 500; font-size: .96rem; position: relative; }
.nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); border-radius: 2px; transition: width .25s ease;
}
.nav > a:not(.btn):hover { color: var(--text); }
.nav > a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: none; border: none;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.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); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(72px, 12vw, 150px) clamp(56px, 9vw, 110px); }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 78% 8%, rgba(124, 58, 237, .14), transparent 60%),
    radial-gradient(50% 45% at 12% 0%, rgba(79, 70, 229, .12), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 70%);
}
.hero-inner { max-width: 840px; }
.hero-title { font-size: clamp(2.3rem, 6vw, 4.1rem); font-weight: 800; margin: 18px 0 0; }
.hero-sub { margin-top: 22px; font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--text-soft); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-platforms { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 44px; color: var(--text-mut); font-size: .9rem; }
.hero-platforms > span { font-weight: 500; }
.hero-platforms ul { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-platforms li {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--r-pill);
  background: #fff; color: var(--text-soft); font-weight: 600; font-size: .85rem; box-shadow: var(--sh-sm);
}

/* ---------- Stats ---------- */
.stats { padding-block: clamp(40px, 6vw, 64px); border-block: 1px solid var(--border); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4.5vw, 3rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat-label { margin-top: 10px; color: var(--text-soft); font-weight: 500; font-size: .95rem; }
.stats-note { text-align: center; margin-top: 26px; color: var(--text-mut); font-size: .82rem; }

/* ---------- Section head ---------- */
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; margin-top: 12px; }
.section-lead { margin-top: 16px; color: var(--text-soft); font-size: 1.08rem; }

/* ---------- Cards (services) ---------- */
.cards { display: grid; gap: 24px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 40px); box-shadow: var(--sh-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: transparent; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 20px;
}
.card h3 { font-size: 1.4rem; }
.card > p { margin-top: 12px; color: var(--text-soft); }
.card-list { margin-top: 20px; display: grid; gap: 10px; }
.card-list li { position: relative; padding-left: 28px; color: var(--text-soft); font-size: .96rem; }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px;
  background: var(--accent-soft); border-radius: 50%;
}
.card-list li::after {
  content: ""; position: absolute; left: 5px; top: 11px; width: 6px; height: 3px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Platforms ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.platform {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px 24px; text-align: center; box-shadow: var(--sh-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.platform:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.platform-icon {
  --pc: var(--accent);
  width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 16px;
  display: grid; place-items: center; color: var(--pc);
  background: color-mix(in srgb, var(--pc) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--pc) 24%, var(--border));
}
.platform h3 { font-size: 1.12rem; }
.platform p { margin-top: 8px; color: var(--text-soft); font-size: .92rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.about-intro h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin-top: 12px; }
.about-intro .btn { margin-top: 26px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 24px; box-shadow: var(--sh-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.feature h3 { font-size: 1.1rem; }
.feature h3::before { content: ""; display: block; width: 36px; height: 3px; background: var(--grad); border-radius: 3px; margin-bottom: 14px; }
.feature p { margin-top: 10px; color: var(--text-soft); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 72px); align-items: start; }
.contact-info h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin-top: 12px; }
.contact-details { margin-top: 32px; display: grid; gap: 20px; }
.contact-details li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-soft); }
.ci-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.contact-details a { color: var(--accent); font-weight: 600; }
.contact-details a:hover { text-decoration: underline; }

.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px); box-shadow: var(--sh-md);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.field .opt { color: var(--text-mut); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-soft); color: var(--text); font: inherit; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 120px; }
.field.invalid input, .field.invalid textarea { border-color: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .12); }
.error { display: block; color: #d93a3f; font-size: .82rem; margin-top: 6px; min-height: 1em; }
.form-status { margin-top: 14px; font-weight: 600; font-size: .95rem; text-align: center; }
.form-status.ok { color: #14844b; }
.form-status.err { color: #d93a3f; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1118; color: #c3c7d4; padding-top: clamp(48px, 7vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.brand--footer .brand-name { color: #fff; }
.footer-tag { margin-top: 16px; color: #8a90a6; max-width: 320px; font-size: .95rem; }
.footer-nav h4, .footer-address h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: #c3c7d4; font-size: .95rem; width: fit-content; transition: color .2s ease; }
.footer-nav a:hover { color: #fff; }
.footer-address p { color: #c3c7d4; font-size: .95rem; line-height: 1.8; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .88rem; color: #8a90a6;
}
.footer-legal { display: flex; gap: 22px; }
.footer-legal a:hover { color: #fff; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    padding: 16px var(--gutter) 24px; border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav > a:not(.btn) { padding: 12px 6px; border-bottom: 1px solid var(--border); }
  .nav > a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 12px; text-align: center; }
  .cards.two { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .platform-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
