/* ===== Theme ===== */
:root {
  --bg: #0b0c0f;
  --fg: #e8eaf0;
  --muted: #9aa4b2;
  --brand: #7c5cff;
  --accent: #22c55e;
  --card: #11131a;
  --border: #242736;
  --ring: rgba(124, 92, 255, 0.5);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

:root.light {
  --bg: #fff;
  --fg: #0b1220;
  --muted: #475569;
  --brand: #5b34ff;
  --accent: #16a34a;
  --card: #f8fafc;
  --border: #e2e8f0;
  --ring: rgba(91, 52, 255, 0.25);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}

/* ===== Reset / Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    Noto Sans,
    sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background:
    radial-gradient(
      1200px 600px at 80% -10%,
      rgba(124, 92, 255, 0.25),
      transparent
    ),
    radial-gradient(
      900px 500px at -10% 10%,
      rgba(34, 197, 94, 0.18),
      transparent
    ),
    var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: 1180px;
  margin-inline: auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== UI ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 12, 15, 0.6);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

:root.light .nav {
  background: rgba(255, 255, 255, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand svg {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.brand .wordmark {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.2px;
  line-height: 1;
  transform: translateY(1px);
  font-optical-sizing: auto;
}

@media (max-width: 480px) {
  .brand svg {
    width: 28px;
    height: 28px;
  }

  .brand .wordmark {
    font-size: 19px;
  }
}

.brand,
.brand:link,
.brand:visited,
.brand:hover,
.brand:focus,
.brand:active {
  text-decoration: none;
}

.links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.links a:hover {
  color: var(--fg);
}

:root.light .links a {
  color: #111827;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition:
    transform 0.1s ease,
    border-color 0.2s ease;
}

.btn:hover {
  border-color: var(--fg);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
  padding: 10px 16px;
}

.btn.ghost {
  background: transparent;
}

.theme-toggle {
  padding: 8px 10px;
}

.hero {
  padding: 110px 0 70px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.08;
  margin: 14px 0 12px;
}

p.lead {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--muted);
  max-width: 65ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.feature svg {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-top: 2px;
}

.feature > div {
  flex: 1;
}

.feature h3 {
  margin: 0 0 6px;
  line-height: 1.25;
}

.feature p {
  margin: 0;
}

.feature ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent);
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  text-align: center;
}

.section-intro {
  max-width: 70ch;
  margin: 6px auto 22px;
  text-align: center;
}

.section-intro-wide {
  max-width: 72ch;
}

.section-grid,
.section-cta {
  margin-top: 18px;
}

.section-cta {
  text-align: center;
}

.hero-industries {
  margin-top: 18px;
}

.card-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.case-impact,
.tech-stack,
.contact-actions {
  margin-top: 10px;
}

.stack-card {
  margin-top: 16px;
}

footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

/* Theme icon visibility */
.icon-sun {
  display: none;
}

:root.light .icon-sun {
  display: inline;
}

:root.light .icon-moon {
  display: none;
}

/* Glossy FAQ cards */
details {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
}

:root.light details {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
}

details + details {
  margin-top: 12px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

/* ===== Responsive tweaks ===== */
.hero .grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.hero .card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  max-width: min(860px, 92vw);
  margin: 32px auto 0;
}

@media (min-width: 1100px) {
  .hero .grid {
    grid-template-columns: 1fr;
  }
}

section {
  padding: clamp(56px, 8vw, 80px) 0;
}

.container {
  padding: 0 clamp(14px, 3vw, 20px);
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
}

@media (max-width: 720px) {
  .links a {
    font-size: 14px;
  }

  .actions {
    margin-top: 8px;
  }
}

#stack .card {
  padding: 14px 16px;
}

#stack .stack {
  justify-content: center;
}

#stack .pill {
  margin: 4px 0;
}

#faq details {
  max-width: 900px;
  margin: 12px auto;
}

#faq h2 {
  margin-bottom: 16px;
}

#contact .container {
  max-width: 1120px;
}

#contact .grid {
  align-items: start;
  gap: 24px;
}

@media (min-width: 901px) {
  #contact .grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

#faq {
  padding-bottom: 48px;
}

#contact {
  padding-top: 56px;
}

#contact form.card {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#contact form .row {
  display: flex;
  gap: 10px;
}

#contact input#email {
  height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
}

.copy-status[hidden] {
  display: none;
}

#contact button.btn {
  height: 44px;
  align-self: flex-start;
}

#contact h2 {
  margin: 0 0 8px;
}

#contact p.muted {
  margin: 0 0 14px;
  max-width: 48ch;
}

/* Icon-only social buttons */
.socials {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  transition:
    transform 0.1s ease,
    border-color 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--fg);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== Mobile-friendly navbar ===== */
.desktop-nav,
.desktop-cta {
  display: flex;
}

.desktop-nav {
  flex: 1 1 auto;
}

.hamburger {
  display: none;
}

@media (max-width: 1040px) {
  .desktop-nav,
  .desktop-cta {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }

  .mobile-menu {
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    background: rgba(11, 12, 15, 0.9);
    backdrop-filter: saturate(180%) blur(10px);
    animation: menuSlide 0.18s ease-out;
  }

  :root.light .mobile-menu {
    background: rgba(255, 255, 255, 0.96);
  }

  .mobile-menu a {
    text-decoration: none;
    font-weight: 600;
    color: var(--fg);
    padding: 10px 8px;
    border-radius: 10px;
  }

  .mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  :root.light .mobile-menu a:hover {
    background: rgba(2, 6, 23, 0.06);
  }

  .mobile-cta {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 12px;
  }
}

@keyframes menuSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hamburger-box {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-inner {
  align-items: center;
}

/* Ensure elements with [hidden] never render (safety) */
:where([hidden]) {
  display: none !important;
}

/* Show/hide mobile menu via [hidden] — only on mobile widths */
@media (max-width: 1040px) {
  .mobile-menu[hidden] {
    display: none !important;
  }

  .mobile-menu:not([hidden]) {
    display: grid;
  }
}
