:root {
  color-scheme: light;
  --header-height: 180px;
  --header-glass: rgba(255, 255, 255, 0.82);
  --header-solid: #ffffff;
  --logo-filter: brightness(0.15);
  --faq-accent: #4318e6;
  --bg-page: #ffffff;
  --bg-surface: #f7f8fc;
  --bg-card: #ffffff;
  --text-primary: #18181b;
  --text-secondary: #4a4a57;
  --text-on-hero: #ffffff;
  --text-on-hero-muted: #e9e6ff;
  --brand-start: #1d14b8;
  --brand-mid: #4318e6;
  --brand-end: #7c14ff;
  --accent-cta: #f5c842;
  --accent-cta-hover: #e4b52d;
  --accent-cta-text: #18181b;
  --border-subtle: #e4e4ec;
  --focus-ring: #f5c842;
  --focus-ring-light: #4318e6;
  --radius-md: 0.75rem;
  --radius-pill: 9999px;
  --container-max: 1140px;
  --shadow-card: 0 4px 20px rgba(24, 24, 27, 0.05);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --header-glass: rgba(15, 16, 22, 0.82);
  --header-solid: #0f1016;
  --logo-filter: none;
  --faq-accent: #f5c842;
  --bg-page: #0f1016;
  --bg-surface: #171822;
  --bg-card: #1d1f2b;
  --text-primary: #f4f4f8;
  --text-secondary: #c5c6d4;
  --brand-start: #140e82;
  --brand-mid: #2f12a8;
  --brand-end: #5812bf;
  --border-subtle: #2e3144;
  --focus-ring-light: #a78bfa;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .icon-svg {
  filter: brightness(1.35) saturate(1.1);
}

:root[data-theme="dark"] .illustration-frame {
  background-color: #f4f4f8;
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --header-glass: rgba(15, 16, 22, 0.82);
    --header-solid: #0f1016;
    --logo-filter: none;
    --faq-accent: #f5c842;
    --bg-page: #0f1016;
    --bg-surface: #171822;
    --bg-card: #1d1f2b;
    --text-primary: #f4f4f8;
    --text-secondary: #c5c6d4;
    --brand-start: #140e82;
    --brand-mid: #2f12a8;
    --brand-end: #5812bf;
    --border-subtle: #2e3144;
    --focus-ring-light: #a78bfa;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  }

  :root:not([data-theme]) .icon-svg {
    filter: brightness(1.35) saturate(1.1);
  }

  :root:not([data-theme]) .illustration-frame {
    background-color: #f4f4f8;
    border-radius: var(--radius-md);
    padding: 0.75rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring-light);
  outline-offset: 3px;
}

.hero-wrapper :focus-visible,
.site-header:not(.is-scrolled) :focus-visible {
  outline-color: var(--focus-ring);
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background-color: var(--accent-cta);
  color: var(--accent-cta-text);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header & Hero */
.hero-wrapper {
  background: linear-gradient(125deg, var(--brand-start) 0%, var(--brand-mid) 52%, var(--brand-end) 100%);
  color: var(--text-on-hero);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 1rem;
  color: var(--text-on-hero);
  background: var(--brand-start);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.site-header.is-scrolled {
  color: var(--text-primary);
  background: var(--header-solid);
  border-color: var(--border-subtle);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .site-header {
    background: linear-gradient(125deg, rgba(29, 20, 184, 0.88), rgba(67, 24, 230, 0.82));
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
  }

  .site-header.is-scrolled {
    background: var(--header-glass);
  }
}

.site-header.is-scrolled .brand-link img {
  filter: var(--logo-filter);
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-switcher[hidden],
.theme-switcher svg {
  display: none;
}

.theme-switcher[data-mode="light"] [data-theme-icon="light"],
.theme-switcher[data-mode="dark"] [data-theme-icon="dark"],
.theme-switcher[data-mode="system"] [data-theme-icon="system"] {
  display: block;
}

.theme-switcher:hover {
  color: var(--accent-cta-hover);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  border-bottom-color: var(--accent-cta);
}

.hero-section {
  padding-block: 2.5rem 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  color: var(--text-on-hero-muted);
  max-width: 58ch;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 2rem;
  background-color: var(--accent-cta);
  color: var(--accent-cta-text);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-btn:hover {
  background-color: var(--accent-cta-hover);
  transform: translateY(-1px);
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-media img {
  width: 100%;
  max-width: 440px;
}

/* Sections */
.section {
  padding-block: 4rem;
}

.section-alt {
  background-color: var(--bg-surface);
}

.section-heading {
  margin: 0 0 2.25rem;
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

/* Industries Grid */
.industries-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.industry-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.icon-svg {
  width: 32px;
  height: 32px;
  margin-bottom: 0.25rem;
}

.industry-card h3,
.service-card h3,
.feature-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-primary);
}

.industry-card p,
.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.service-media img {
  width: 100%;
  max-width: 280px;
  max-height: 230px;
  object-fit: contain;
}

.service-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.service-list li {
  margin-bottom: 0.4rem;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-copy p {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-media {
  display: flex;
  justify-content: center;
}

.about-media img {
  width: 100%;
  max-width: 460px;
}

/* Why Choose Us */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* FAQ Section */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 820px;
  margin-inline: auto;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.25rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  color: var(--faq-accent);
}


.faq-item[open] summary::after {
  content: "-";
}

.faq-answer {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-meta {
  margin: 0;
}

.back-to-top {
  position: fixed;
  z-index: 110;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--brand-start);
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.375rem;
  font-weight: 700;
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top:hover {
  background-color: var(--brand-mid);
}

/* Responsive Breakpoints (Mobile-First) */
@media (min-width: 640px) {
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .hero-section {
    padding-block: 3.5rem 5rem;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }

  .industries-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 899px) {
  .theme-switcher {
    position: fixed;
    z-index: 110;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    color: var(--text-primary);
    filter: drop-shadow(0 1px 2px var(--bg-page));
  }

  .theme-switcher:hover {
    color: var(--focus-ring-light);
  }

  .back-to-top {
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 60px);
  }

  .site-footer {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
  }

  .site-nav ul {
    justify-content: center;
    column-gap: 1rem;
  }
}

@media (max-width: 479px) {
  .site-nav ul {
    column-gap: 0.7rem;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .header-inner {
    justify-content: center;
    gap: 0.5rem;
  }

  .site-header {
    padding-block: 0.75rem;
  }
}
