/* ============================================================
   CONFIEN — Digital Transformation, Engineered
   Modern dark-tech static site. No build step, no dependencies.
   ============================================================ */

:root {
  --bg:        #070b14;
  --bg-soft:   #0c1322;
  --panel:     #0f1828;
  --panel-2:   #131f33;
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.14);
  --text:      #e8edf6;
  --muted:     #97a3b8;
  --muted-2:   #6c7a92;

  --brand:     #4f8cff;
  --brand-2:   #7c5cff;
  --accent:    #2fe6c8;
  --grad:      linear-gradient(120deg, #4f8cff 0%, #7c5cff 50%, #2fe6c8 100%);

  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1160px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);

  --shadow:    0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .brand-text, .stat-num, .step-num {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

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

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

/* ---------- Background layers ---------- */
.bg-mesh {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(50% 50% at 15% 10%, rgba(79, 140, 255, 0.18), transparent 60%),
    radial-gradient(45% 45% at 85% 5%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(60% 60% at 75% 85%, rgba(47, 230, 200, 0.10), transparent 60%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 35%, transparent 80%);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.brand-text { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 6px 18px -6px rgba(79,140,255,0.7);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px;
  border-radius: 3px; background: var(--bg);
}

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { color: var(--muted); font-size: 0.94rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--border-2);
  padding: 9px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.03);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.nav-cta:hover { border-color: var(--brand); background: rgba(79,140,255,0.12); transform: translateY(-1px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--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); }

.mobile-menu[hidden] { display: none; }
.mobile-menu {
  display: flex; flex-direction: column;
  background: rgba(9, 14, 25, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 22px;
}
.mobile-menu a { padding: 13px 4px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: 0; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.97rem; padding: 13px 26px;
  border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--grad); color: #08111f;
  box-shadow: 0 10px 30px -10px rgba(79,140,255,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(124,92,255,0.7); }
.btn-ghost { background: rgba(255,255,255,0.03); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); background: rgba(79,140,255,0.1); }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem;
  font-weight: 600; color: var(--accent); margin-bottom: 14px;
}
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; }
.section-lead { color: var(--muted); font-size: 1.05rem; }
.section-lead.center { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { padding: 168px 0 90px; position: relative; }
.hero-inner { max-width: 880px; }
.hero-title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; margin-bottom: 24px; }
.hero-title .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 660px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-pills li {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.9rem; color: var(--muted);
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,0.02);
}
.hero-pills .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

/* ---------- Stats ---------- */
.stats { padding: 30px 0 70px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stat {
  padding: 26px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
}
.stat-num {
  display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; margin-bottom: 6px;
}
.stat-label { color: var(--muted); font-size: 0.92rem; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-tight { padding: 70px 0; }

/* ---------- Capability cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  position: relative; padding: 30px 28px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 12px; font-size: 1.3rem; color: var(--accent);
  background: rgba(47,230,200,0.08); border: 1px solid rgba(47,230,200,0.18);
  margin-bottom: 20px;
}
.card h3 { font-size: 1.22rem; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 18px; }
.card-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags li {
  font-size: 0.78rem; color: var(--muted-2); padding: 5px 11px;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.02);
}

/* ---------- Marquee ---------- */
.marquee {
  margin-top: 30px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; gap: 18px; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  white-space: nowrap; font-family: 'Space Grotesk', sans-serif; font-weight: 500;
  font-size: 1.05rem; color: var(--muted);
  padding: 12px 24px; border: 1px solid var(--border); border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Steps ---------- */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
  counter-reset: step;
}
.step {
  padding: 26px 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  position: relative; transition: transform 0.3s var(--ease), border-color 0.3s;
}
.step:hover { transform: translateY(-4px); border-color: var(--border-2); }
.step-num {
  display: inline-block; font-size: 1.6rem; font-weight: 700; margin-bottom: 14px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.about-copy h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 8px 0 18px; }
.about-copy p { color: var(--muted); margin-bottom: 16px; }
.about-copy strong { color: var(--text); }
.about-copy .btn { margin-top: 14px; }
.about-points { list-style: none; display: grid; gap: 14px; }
.about-points li {
  padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
}
.about-points h3 { font-size: 1.02rem; margin-bottom: 5px; }
.about-points p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- Contact ---------- */
.section-contact {
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(79,140,255,0.12), transparent 70%);
  border-top: 1px solid var(--border);
}
.contact-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.contact-inner h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  text-align: left; margin: 40px 0 26px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  font-family: inherit; font-size: 0.97rem; color: var(--text);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px; resize: vertical;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  background: rgba(79,140,255,0.06); box-shadow: 0 0 0 3px rgba(79,140,255,0.15);
}
.field input:invalid:not(:placeholder-shown) { border-color: rgba(255,110,110,0.6); }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-note { font-size: 0.9rem; color: var(--accent); margin: 0; }
.form-note.error { color: #ff8a8a; }
.contact-alt { color: var(--muted); font-size: 0.95rem; }
.contact-alt a { color: var(--text); border-bottom: 1px solid var(--border-2); }
.contact-alt a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding-top: 54px; }
.footer-inner {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding-bottom: 40px; border-bottom: 1px solid var(--border);
}
.footer-brand { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; max-width: 420px; }
.footer-tag { flex-basis: 100%; color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer-links a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 0 30px; color: var(--muted-2); font-size: 0.85rem;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 132px 0 70px; }
  .section { padding: 68px 0; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}

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