/* ========== Base ========== */
html { scroll-behavior: smooth; }
body { background: #070b14; }

.grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
}

/* ========== Navbar ========== */
#navbar.scrolled {
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.9rem;
  color: #cbd5e1;
  border-radius: 9999px;
  transition: color .2s;
}
.nav-link:hover { color: #fff; }
.nav-link.active {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
}
.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: #cbd5e1;
}
.mobile-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

/* ========== Section helpers ========== */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #67e8f9;
}
.section-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, transparent);
  border-radius: 2px;
}

.section-title {
  margin-top: 0.75rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(1.875rem, 1.4rem + 2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

/* ========== About / Value Cards ========== */
.value-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform .3s, border-color .3s, background .3s;
}
.value-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.04);
}
.value-card h3 {
  margin-top: 1rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
}
.value-card p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
}
.value-icon {
  display: inline-flex;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #0e7490);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(34, 211, 238, 0.6);
}

/* ========== Service Cards ========== */
.service-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform .3s, border-color .3s;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, transparent, rgba(34,211,238,.3), transparent);
  opacity: 0;
  border-radius: inherit;
  transition: opacity .35s;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 1px;
}
.service-card:hover { transform: translateY(-6px); }
.service-card:hover::before { opacity: 1; }

.service-num {
  position: absolute;
  top: 1rem; right: 1.25rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 2.75rem;
  background: linear-gradient(180deg, rgba(34,211,238,.18), transparent);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.service-icon {
  display: inline-flex;
  width: 56px; height: 56px;
  align-items: center; justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(34,211,238,.05));
  color: #67e8f9;
  font-size: 1.5rem;
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.service-card h3 {
  margin-top: 1.25rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
}
.service-card > p {
  margin-top: 0.5rem;
  color: #94a3b8;
  font-size: 0.92rem;
}
.service-card ul {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(255,255,255,.08);
  space-y: 0.6rem;
}
.service-card ul li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: #cbd5e1;
}
.service-card ul li i {
  color: #22d3ee;
  font-size: 0.7rem;
  width: 1rem;
  text-align: center;
}

/* ========== Capability Cards ========== */
.cap-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color .3s, transform .3s;
}
.cap-card:hover { border-color: rgba(34, 211, 238, 0.35); transform: translateY(-3px); }
.cap-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cap-card ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cap-card li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}
.cap-card li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34,211,238,.7);
}

/* ========== Industry Cards ========== */
.industry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.75rem 1rem;
  border-radius: 1.25rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  text-align: center;
  transition: all .3s;
}
.industry-card i {
  font-size: 1.75rem;
  color: #67e8f9;
  transition: transform .3s;
}
.industry-card span {
  font-weight: 600;
  font-size: 0.9rem;
  color: #e2e8f0;
}
.industry-card:hover {
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(34,211,238,.08), rgba(255,255,255,.02));
  border-color: rgba(34, 211, 238, 0.4);
}
.industry-card:hover i { transform: scale(1.15); color: #22d3ee; }

/* ========== Project Cards ========== */
.project-card {
  border-radius: 1.25rem;
  overflow: hidden;
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .3s, border-color .3s;
}
.project-card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.35); }
.project-img {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: 4rem;
  position: relative;
}
.project-img::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.5));
}
.project-body { padding: 1.25rem 1.5rem 1.5rem; }
.project-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #67e8f9;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.project-card h3 {
  margin-top: 0.75rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.project-card p {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: #94a3b8;
}

/* ========== Team ========== */
.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .3s, border-color .3s;
}
.team-card:hover { transform: translateY(-5px); border-color: rgba(34, 211, 238, 0.35); }
.team-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  box-shadow: 0 12px 30px -8px rgba(34, 211, 238, 0.4);
  overflow: hidden;
}
.team-avatar.has-photo { background: #0f172a; }
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-card h3 {
  margin-top: 1.25rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.team-card .role {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #67e8f9;
  font-weight: 500;
}
.team-socials {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}
.team-socials a {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  color: #cbd5e1;
  transition: all .25s;
  font-size: 0.85rem;
}
.team-socials a:hover { background: #22d3ee; color: #070b14; }

/* ========== Contact ========== */
.contact-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: background .3s, border-color .3s;
}
.contact-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,211,238,.2), rgba(34,211,238,.05));
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.contact-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #67e8f9;
}
.contact-value {
  margin-top: 0.25rem;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.form-input::placeholder { color: #64748b; }
.form-input:focus {
  outline: none;
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}

/* ========== Footer ========== */
.footer-title {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: #94a3b8;
}
.footer-links a:hover { color: #22d3ee; }
.footer-social {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: #cbd5e1;
  transition: all .25s;
}
.footer-social:hover { background: #22d3ee; color: #070b14; transform: translateY(-2px); }

/* Center the eyebrow when justify is required */
.section-eyebrow.justify-center { justify-content: center; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ========== Gallery ========== */
.gallery-chip {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: #cbd5e1;
  transition: all .2s;
}
.gallery-chip:hover { background: rgba(255,255,255,.1); color: #fff; }
.gallery-chip.active {
  background: #22d3ee;
  color: #070b14;
  border-color: #22d3ee;
  box-shadow: 0 8px 22px -6px rgba(34,211,238,.55);
}

.gallery-item {
  position: relative;
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(7,11,20,.6);
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
  transition: transform .35s, border-color .3s;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gallery-item:hover { border-color: rgba(34,211,238,.45); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item.hide { display: none; }

/* Icon-card style (no <img>, uses data-grad + injected icon/title) */
.gallery-item .g-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.25rem;
  color: #fff;
  background: linear-gradient(135deg, var(--g-from, #0e7490), var(--g-to, #1e1b4b));
  transition: transform .6s ease;
}
.gallery-item:hover .g-card { transform: scale(1.05); }
.gallery-item .g-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.gallery-item .g-card i {
  font-size: 3.25rem;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.35));
  opacity: .95;
}
.gallery-item .g-card span {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.gallery-item.col-span-2.row-span-2 .g-card i { font-size: 5rem; }
.gallery-item.col-span-2.row-span-2 .g-card span { font-size: 1.35rem; }

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.75));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity .3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay i {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(34,211,238,.9);
  color: #070b14;
  font-size: 0.75rem;
}

/* ========== Lightbox ========== */
#lightbox.is-open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#lightbox-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.22), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 18px);
  mix-blend-mode: overlay;
  pointer-events: none;
}
#lightbox-stage i {
  font-size: clamp(4rem, 12vw, 9rem);
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.45));
  position: relative;
}
#lightbox-stage span {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  letter-spacing: 0.01em;
  text-shadow: 0 4px 20px rgba(0,0,0,.5);
  position: relative;
}

/* ========== Light Mode Overrides ========== */
html.light { color-scheme: light; }
html.light body {
  background: #f4f7fb;
  color: #1e293b;
}
html.light .fixed.inset-0.-z-10 > div { opacity: .35; }
html.light .grid-pattern {
  background-image:
    linear-gradient(rgba(15,23,42,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.06) 1px, transparent 1px);
}

/* Navbar */
html.light #navbar.scrolled {
  background: rgba(255,255,255,.85);
  border-bottom-color: rgba(15,23,42,.08);
}
html.light .nav-link { color: #475569; }
html.light .nav-link:hover { color: #0f172a; }
html.light .nav-link.active { color: #0e7490; background: rgba(14,116,144,.1); }
html.light .mobile-link { color: #475569; }
html.light #mobile-menu { background: rgba(255,255,255,.97); border-color: rgba(15,23,42,.08); }
html.light #menu-btn, html.light #theme-toggle {
  background: rgba(15,23,42,.05);
  border-color: rgba(15,23,42,.1);
  color: #0f172a;
}
html.light .font-display.text-white,
html.light h1, html.light h2, html.light h3, html.light h4 { color: #0f172a; }
html.light .text-white { color: #0f172a; }
html.light .text-slate-300 { color: #334155; }
html.light .text-slate-400 { color: #64748b; }
html.light .text-slate-200 { color: #1e293b; }

/* Sections */
html.light .section-title { color: #0f172a; }
html.light .value-card,
html.light .cap-card,
html.light .industry-card,
html.light .project-card,
html.light .team-card,
html.light .contact-item,
html.light .service-card,
html.light #contact-form,
html.light #clients,
html.light #testing > div > div {
  background: #ffffff;
  border-color: rgba(15,23,42,.08);
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px -15px rgba(15,23,42,.15);
}
html.light .value-card p,
html.light .service-card > p,
html.light .project-card p { color: #475569; }
html.light .service-card ul li,
html.light .cap-card li,
html.light .industry-card span { color: #334155; }
html.light .cap-card h3 { color: #0f172a; border-bottom-color: rgba(15,23,42,.08); }
html.light .service-card ul { border-top-color: rgba(15,23,42,.08); }

/* Testing wrapper */
html.light #testing > div > div { background: linear-gradient(180deg, #ffffff, #f8fafc); }

/* Table */
html.light table thead { background: #f1f5f9; color: #334155; }
html.light table tbody tr { border-color: rgba(15,23,42,.06); }
html.light table td.text-white { color: #0f172a; }
html.light table td.text-slate-300 { color: #475569; }
html.light table td.text-slate-400 { color: #64748b; }

/* Forms */
html.light .form-input {
  background: #f8fafc;
  border-color: rgba(15,23,42,.12);
  color: #0f172a;
}
html.light .form-input::placeholder { color: #94a3b8; }
html.light .form-input:focus { background: #fff; }
html.light .form-label { color: #334155; }

/* Hero card */
html.light .relative.rounded-3xl.border.border-white\/10.bg-ink-800\/80 {
  background: #ffffff;
  border-color: rgba(15,23,42,.08);
}
html.light .rounded-xl.bg-white\/5 { background: #f1f5f9 !important; border-color: rgba(15,23,42,.05) !important; }

/* Buttons */
html.light .bg-white\/5.hover\:bg-white\/10 {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.1) !important;
}

/* Gallery chips */
html.light .gallery-chip {
  background: #fff;
  border-color: rgba(15,23,42,.1);
  color: #475569;
}
html.light .gallery-chip:hover { background: #f1f5f9; color: #0f172a; }
html.light .gallery-chip.active { background: #0891b2; color: #fff; border-color: #0891b2; }

/* Footer */
html.light footer {
  background: rgba(255,255,255,.9);
  border-color: rgba(15,23,42,.08);
}
html.light .footer-social {
  background: #f1f5f9;
  color: #334155;
}
html.light .footer-title { color: #0f172a; }
html.light .footer-links { color: #64748b; }
html.light .footer-links a:hover { color: #0e7490; }

/* Stats */
html.light dt.text-white { color: #0f172a; }

/* Eyebrow stays bright accent in both */
html.light .section-eyebrow { color: #0e7490; }
html.light .section-eyebrow::before { background: linear-gradient(90deg, #0e7490, transparent); }

/* Project tag */
html.light .project-tag { color: #0e7490; background: rgba(14,116,144,.08); border-color: rgba(14,116,144,.2); }

/* Team role */
html.light .team-card .role { color: #0e7490; }

/* Contact label */
html.light .contact-label { color: #0e7490; }
html.light .contact-value { color: #1e293b; }

/* Maps iframe — invert slight */
html.light iframe { filter: none; }

/* Borders general */
html.light .border-white\/10,
html.light .border-white\/15,
html.light .border-white\/5 { border-color: rgba(15,23,42,.08) !important; }

