/* ============ Base ============ */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #0b0b10;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-inv: #f5f5f7;
  --text-inv-muted: rgba(245, 245, 247, 0.62);
  --accent: #0071e3;
  --accent-dark: #0058b0;
  --purple: #7b3ff2;
  --teal: #0097a7;
  --pink: #ff375f;
  --orange: #f28b00;
  --green: #1e9e46;
  --indigo: #5e5ce6;
  --card-border: rgba(0, 0, 0, 0.06);
  --line: rgba(0, 0, 0, 0.1);
  --radius: 20px;
  --nav-height: 60px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 16px); }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { letter-spacing: -0.022em; line-height: 1.12; text-wrap: balance; }

h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

a { color: var(--accent); text-decoration: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  border-radius: 980px;
  padding: 12px 26px;
  font-size: 1.0625rem;
  font-weight: 500;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--purple));
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(120deg, var(--accent-dark), #6429d6);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(90, 80, 235, 0.35);
}

.btn-ghost {
  color: var(--accent);
}
.btn-ghost:hover { background: rgba(0, 113, 227, 0.08); }

.btn-light {
  background: #fff;
  color: #14141a;
  padding: 16px 36px;
  font-size: 1.1875rem;
  font-weight: 600;
}
.btn-light:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }

.btn-small { padding: 7px 18px; font-size: 0.9375rem; }

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--card-border); }

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  color: var(--text);
  font-size: 0.9375rem;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.nav-links a:not(.btn):hover { opacity: 1; color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + 96px) 0 128px;
  text-align: center;
  overflow: hidden;
}
.hero .container { position: relative; }

/* ============ Animated background orbs ============ */
.orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
.orb-1 {
  width: 480px; height: 480px;
  left: 6%; top: -140px;
  background: radial-gradient(circle at 35% 35%, rgba(0, 113, 227, 0.30), transparent 70%);
  animation: drift-1 22s ease-in-out infinite alternate;
}
.orb-2 {
  width: 440px; height: 440px;
  right: 4%; top: -80px;
  background: radial-gradient(circle at 60% 40%, rgba(123, 63, 242, 0.26), transparent 70%);
  animation: drift-2 28s ease-in-out infinite alternate;
}
.orb-3 {
  width: 400px; height: 400px;
  left: 42%; top: 140px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 55, 95, 0.14), transparent 70%);
  animation: drift-3 25s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(90px, 50px, 0) scale(1.18); }
}
@keyframes drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-80px, 70px, 0) scale(0.92); }
}
@keyframes drift-3 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(70px, -60px, 0) scale(1.22); }
}

/* Animated gradient headline text */
.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--pink));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: grad-shift 7s ease-in-out infinite alternate;
}
@keyframes grad-shift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

.hero h1 {
  max-width: 820px;
  margin: 16px auto 0;
}
.hero-sub {
  max-width: 620px;
  margin: 24px auto 0;
  font-size: 1.1875rem;
  color: var(--text-muted);
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
#industries .eyebrow { color: #a78bfa; }
#solutions .eyebrow { color: var(--teal); }

/* ============ Sections ============ */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); }

.section h2 { max-width: 720px; }
.section-sub {
  max-width: 560px;
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* ============ Marquee ============ */
.marquee {
  margin-top: 72px;
  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; width: max-content; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  animation: marquee 50s linear infinite;
}
.marquee:hover .marquee-group { animation-play-state: paused; }
.marquee-group span {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(29, 29, 31, 0.32);
  white-space: nowrap;
}
.marquee-group i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.marquee-group i:nth-of-type(6n+1) { background: var(--accent); }
.marquee-group i:nth-of-type(6n+2) { background: var(--pink); }
.marquee-group i:nth-of-type(6n+3) { background: var(--orange); }
.marquee-group i:nth-of-type(6n+4) { background: var(--purple); }
.marquee-group i:nth-of-type(6n+5) { background: var(--green); }
.marquee-group i:nth-of-type(6n)   { background: var(--teal); }

@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* ============ Industries: dark glass ============ */
.section-dark {
  background: var(--bg-dark);
  color: var(--text-inv);
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: "";
  position: absolute;
  top: -300px;
  right: -200px;
  width: 800px;
  height: 700px;
  background: radial-gradient(circle at 50% 50%, rgba(123, 63, 242, 0.14), transparent 65%);
  pointer-events: none;
}
.section-dark .container { position: relative; }
.section-dark .section-sub { color: var(--text-inv-muted); }

.ind-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.ind-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.4s ease, transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.ind-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}
/* mouse-tracking spotlight */
.ind-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(133, 118, 255, 0.16), transparent 65%);
  pointer-events: none;
}
.ind-card:hover::before { opacity: 1; }

.ind-card h3 { font-size: 1.375rem; }
.ind-card p {
  color: var(--text-inv-muted);
  margin-top: 10px;
  font-size: 0.9875rem;
}

.ind-featured {
  grid-column: span 3;
  padding: 56px 48px;
  /* glow painted directly into the background — no blurred layers,
     renders reliably on every mobile GPU */
  background-color: rgba(255, 255, 255, 0.03);
  background-image:
    radial-gradient(520px 380px at 0% 0%, rgba(123, 63, 242, 0.30), transparent 70%),
    radial-gradient(480px 360px at 100% 20%, rgba(0, 113, 227, 0.24), transparent 70%),
    radial-gradient(420px 320px at 55% 130%, rgba(255, 55, 95, 0.16), transparent 70%);
}
/* second glow arrangement crossfades in and out for ambient motion */
.ind-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 85% 0%, rgba(123, 63, 242, 0.26), transparent 70%),
    radial-gradient(500px 380px at 10% 110%, rgba(0, 113, 227, 0.20), transparent 70%);
  opacity: 0;
  animation: breathe 13s ease-in-out infinite alternate;
}
.ind-featured-content { position: relative; z-index: 1; }

@keyframes breathe {
  to { opacity: 1; }
}
.ind-featured h3 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  background: linear-gradient(100deg, #b18cff, #6aa7ff, #ff8fb3);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  animation: grad-shift 8s ease-in-out infinite alternate;
}
.ind-featured p {
  max-width: 600px;
  font-size: 1.0625rem;
}

.badge {
  display: block;
  width: fit-content;
  margin-bottom: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 980px;
  padding: 5px 12px;
}

.ind-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.ind-chips li {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-inv);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  padding: 6px 16px;
}

/* ============ Solutions: horizontal accordion ============ */
.sol-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.sol-acc {
  list-style: none;
  display: flex;
  gap: 14px;
  margin-top: 64px;
}
.sol-panel {
  flex: 1 1 0;
  min-width: 0;
  height: 320px;
  border-radius: 24px;
  overflow: hidden;
  transition: flex-grow 0.65s cubic-bezier(0.3, 0.7, 0, 1);
}
.sol-panel.is-open { flex-grow: 2.6; }

.sol-panel-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 26px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.4s ease;
}
.sol-panel:not(.is-open) .sol-panel-btn:hover { background: #ececef; }
.sol-panel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* tinted "open" face fades in over the flat base */
.sol-panel-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(155deg, var(--tint), rgba(255, 255, 255, 0) 65%), #fff;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.sol-panel.is-open .sol-panel-btn::before { opacity: 1; }
/* oversized ghost number fills the open panel's corner */
.sol-panel-btn::after {
  content: attr(data-num);
  position: absolute;
  top: -24px;
  right: 8px;
  font-size: 9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c1);
  opacity: 0;
  transition: opacity 0.6s ease 0.1s;
  pointer-events: none;
}
.sol-panel.is-open .sol-panel-btn::after { opacity: 0.08; }
.sol-panel-btn > * { position: relative; }

.sol-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: var(--text-muted);
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.sol-panel.is-open .sol-num {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px var(--tint);
}

/* collapsed panels: title reads vertically under the number */
.sol-vert {
  position: absolute;
  top: 96px;
  left: 38px;
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.sol-panel.is-open .sol-vert { opacity: 0; }

.sol-main {
  display: block;
  margin-top: auto;
  width: 340px;
  max-width: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.sol-panel.is-open .sol-main {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.18s;
}
.sol-title {
  display: block;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.sol-desc {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.9875rem;
}
.sol-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.sol-points span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--card-border);
  border-radius: 980px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* no-JS fallback: four equal panels, all content visible */
html:not(.js) .sol-panel { flex-grow: 1; height: auto; min-height: 340px; }
html:not(.js) .sol-vert { display: none; }
html:not(.js) .sol-main { opacity: 1; transform: none; width: auto; margin-top: 24px; }
html:not(.js) .sol-panel-btn::before { opacity: 1; }
html:not(.js) .sol-num {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  border-color: transparent;
  color: #fff;
}

/* ============ Contact: gradient panel ============ */
.contact { padding-bottom: 128px; }
.contact-panel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  /* glow layers painted straight into the background — no blur filters */
  background:
    radial-gradient(560px 420px at 85% 0%, rgba(123, 63, 242, 0.38), transparent 70%),
    radial-gradient(520px 400px at 8% 100%, rgba(0, 113, 227, 0.30), transparent 70%),
    radial-gradient(440px 340px at 55% 60%, rgba(255, 55, 95, 0.14), transparent 70%),
    linear-gradient(135deg, #12121f, #1c1030);
  padding: 112px 24px;
  text-align: center;
  color: var(--text-inv);
}
.contact-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(620px 460px at 12% 8%, rgba(123, 63, 242, 0.32), transparent 70%),
    radial-gradient(540px 420px at 92% 90%, rgba(0, 113, 227, 0.26), transparent 70%);
  opacity: 0;
  animation: breathe 11s ease-in-out infinite alternate;
}
.contact-content {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.contact-content h2 { color: #fff; }
.contact-content p {
  margin-top: 20px;
  font-size: 1.125rem;
  color: var(--text-inv-muted);
}
.contact-content .btn {
  margin-top: 40px;
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 32px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo { font-weight: 700; color: var(--text); margin-right: 12px; }
.footer-right { display: flex; gap: 24px; flex-wrap: wrap; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* ============ Reveal animation ============ */
/* Hidden initial state only when JS is available (html.js set in <head>),
   so content stays visible if scripts fail to load. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.js [data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .ind-card, .sol-panel, .sol-panel-btn, .sol-panel-btn::before,
  .sol-num, .sol-main, .sol-vert { transition: none; }
  .orb, .grad-text, .marquee-group, .ind-featured h3,
  .ind-featured::after, .contact-panel::before { animation: none; }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .ind-featured { grid-column: span 2; padding: 44px 36px; }

  /* accordion stacks vertically: every panel stays open */
  .sol-acc { flex-direction: column; gap: 16px; margin-top: 48px; }
  .sol-panel { flex: none; height: auto; }
  .sol-panel-btn { cursor: default; flex-direction: row; align-items: flex-start; gap: 18px; }
  .sol-panel-btn::before { opacity: 1; }
  .sol-panel-btn::after { display: none; }
  .sol-vert { display: none; }
  .sol-main {
    opacity: 1;
    transform: none;
    width: auto;
    margin-top: 0;
  }
  .sol-num {
    background: linear-gradient(135deg, var(--c1), var(--c2));
    border-color: transparent;
    color: #fff;
  }
}

@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .hero { padding: calc(var(--nav-height) + 64px) 0 96px; }
  .orb { opacity: 0.6; }

  .ind-grid { grid-template-columns: 1fr; }
  .ind-featured { grid-column: span 1; padding: 36px 28px; }

  .marquee { margin-top: 64px; }

  .sol-panel-btn { padding: 22px; }
  .sol-num { width: 40px; height: 40px; font-size: 0.8125rem; }

  .contact-panel { padding: 80px 20px; border-radius: 24px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 8px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) {
    padding: 14px 0;
    width: 100%;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--card-border);
  }
  .nav-links .btn { margin-top: 16px; }
}
