/* ========== CSS Custom Properties (dark only) ========== */
:root {
  --bg-primary: #0A0D14;
  --bg-secondary: #111521;
  --bg-card: #161B2C;
  --surface: #1C2236;
  --border: #252D45;
  --text-primary: #E8EAF2;
  --text-secondary: #9BA3BF;
  --text-muted: #5A6280;
  --accent: #3B7EFF;
  --accent-hover: #5B94FF;
  --accent-light: #1A2540;
  --accent-secondary: #00D4FF;
  --success: #10C97F;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Fira Sans', sans-serif;
  --font-mono: 'Courier New', monospace;
  --header-h: 72px;
  --container-w: min(100% - 2rem, 1200px);
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}
.container { width: var(--container-w); margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
img { max-width: 100%; height: auto; display: block; }

/* ========== Typography ========== */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 0.5em; color: var(--text-primary); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hover); }

/* ========== Header & Nav ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: var(--container-w);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}
.logo-link:hover { color: var(--accent); }
.logo-img { max-height: 54px; width: auto; }
.main-nav { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius);
}
.nav-toggle:hover { background: var(--surface); }
.icon-close { display: none; }
.nav-overlay.open .icon-menu { display: none; }
.nav-overlay.open .icon-close { display: block; }
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-overlay.open { opacity: 1; visibility: visible; }
.nav-list-mobile { flex-direction: column; gap: 0; text-align: center; }
.nav-list-mobile .nav-link { font-size: 1.25rem; padding: 1rem; display: block; }

@media (min-width: 768px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
}

@media (min-width: 1024px) {
  .nav-list { gap: 2rem; }
}

/* ========== Sections common ========== */
.section {
  padding: 4rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }
.section-inner { margin: 0 auto; }
.section-title {
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: normal;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.section-subtitle { font-size: 1.1rem; margin-bottom: 2rem; color: var(--text-muted); }

/* ========== Hero ========== */
/* Use optimized PNG; when background.webp is available, script in HTML sets html.webp and this is overridden.
   Use lowercase filename (background.png) so it works on case-sensitive hosts. */
.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  position: relative;
  background-color: var(--bg-primary);
  background-image: url('background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
html.webp .section-hero { background-image: url('background.webp'); }
.hero-pattern {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.section-hero .section-inner { position: relative; z-index: 1; text-align: center; }
.hero-title {
  margin-bottom: 1rem;
  max-width: 22em;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-body);
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: normal;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.hero-subhead {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 24px rgba(0, 0, 0, 0.6);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.hero-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}
.section-hero .pill {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}
@media (max-width: 768px) {
  .section-hero .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  .section-hero .hero-pills {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 0.5rem;
    padding-left: 0;
    padding-right: 0;
  }
  .section-hero .pill {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}
@media (max-width: 480px) {
  .section-hero .pill {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 1.5rem; }
.section-hero .hero-ctas .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.4);
}
.section-hero .hero-ctas .btn-secondary:hover {
  background: rgba(59, 126, 255, 0.9);
  border-color: #3B7EFF;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.hero-badge .icon-inline { color: rgba(255, 255, 255, 0.95); }
.icon-inline { flex-shrink: 0; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: scale(1.02); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-hover); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-light); }
.btn-block { width: 100%; }

/* ========== About ========== */
.about-grid { display: block; }
.about-content { margin-bottom: 2rem; }
.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.highlight-icon { color: var(--accent); }
.highlight-label { font-size: 0.9rem; color: var(--text-muted); }
@media (min-width: 768px) {
  .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
  .about-content { margin-bottom: 0; }
}
@media (min-width: 1024px) {
  .about-highlights { grid-template-columns: 1fr; }
}

/* ========== Services ========== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.service-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}
.service-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.service-card-title {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: normal;
}
.service-card ul { margin: 0; padding-left: 1.25rem; color: var(--text-secondary); font-size: 0.95rem; }
.service-card li { margin-bottom: 0.35rem; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

/* ========== Why Us ========== */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.why-icon { color: var(--accent); margin-bottom: 0.75rem; }
.why-card-title {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: normal;
}
.why-card p { margin: 0; font-size: 0.95rem; }
@media (min-width: 768px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .why-card-wide { grid-column: span 2; }
}

/* ========== FAQ ========== */
.faq-inner { max-width: 800px; margin-left: auto; margin-right: auto; }
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.faq-question:hover { color: var(--accent); }
.faq-question:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-chevron { flex-shrink: 0; color: var(--text-muted); transition: transform 0.3s ease; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p { padding: 0 0 1.25rem; margin: 0; }

/* ========== Contact ========== */
.contact-grid { display: block; }
.contact-info { margin-bottom: 2rem; }
.contact-details { list-style: none; margin: 0; padding: 0; }
.contact-details li { margin-bottom: 1rem; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}
.contact-link:hover { color: var(--accent); }
.contact-link-text { cursor: default; }
.contact-link-text:hover { color: var(--text-secondary); }
.contact-icon { flex-shrink: 0; color: var(--accent); }
@media (min-width: 768px) {
  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
  .contact-info { margin-bottom: 0; }
}

.contact-form-wrap { position: relative; }
.form-success {
  padding: 1.5rem;
  background: var(--success);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
  margin-bottom: 1rem;
}
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-weight: 500; color: var(--text-primary); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.65rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-error { font-size: 0.85rem; color: #fc8181; }

/* ========== Footer ========== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
  margin-top: 2rem;
  font-family: var(--font-body);
  font-stretch: normal;
  font-size: 1rem;
  line-height: 1.6;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-brand .footer-logo-link { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; color: var(--text-primary); font-family: var(--font-display); font-weight: 700; font-stretch: normal; }
.footer-logo { max-height: 46px; width: auto; }
.footer-tagline { font-size: 0.9rem; color: var(--text-muted); margin: 0; font-family: var(--font-body); font-stretch: normal; }
.footer-heading { font-size: 1rem; margin-bottom: 0.75rem; font-family: var(--font-display); font-weight: 700; font-stretch: normal; }
.footer-links ul, .footer-contact > p { margin: 0 0 0.5rem; padding: 0; list-style: none; font-family: var(--font-body); font-stretch: normal; }
.footer-links a, .footer-contact a { color: var(--text-secondary); font-family: var(--font-body); font-stretch: normal; }
.footer-links a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-bottom {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-stretch: normal;
}
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: var(--container-w);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr; }
}
