/* Extender corporate site styles - premium revision */
:root {
  --bg: #0b0d10;
  --bg-light: #f4f6fa;
  --surface: #11151c;
  --surface-2: #171c25;
  --text: #f7f9fc;
  --text-dark: #0f1720;
  --muted: #a9b3c2;
  --muted-dark: #4b5662;
  --accent: #2f7bff;
  --accent-strong: #1152c7;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: #e2e6ef;
  --shadow: 0 24px 60px rgba(5, 8, 14, 0.45);
  --shadow-soft: 0 20px 40px rgba(15, 23, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  padding-top: 84px;
}

.section {
  padding: 96px 0;
  position: relative;
  scroll-margin-top: 96px;
}

.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section-light .section-title,
.section-light .card-title,
.section-light .step-number,
.section-light .cap-toggle,
.section-light .case-details strong {
  color: var(--text-dark);
}

.section-light .section-subtitle,
.section-light .card-text,
.section-light .case-details,
.section-light .cap-content,
.section-light .footer-meta {
  color: var(--muted-dark);
}

.section-title {
  margin: 0 0 16px;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 0 0 32px;
  color: var(--muted);
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(9, 11, 14, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47, 123, 255, 0.9), rgba(13, 25, 40, 0.9));
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(17, 82, 199, 0.35);
}

.nav {
  flex: 1;
  order: 3;
  width: 100%;
}

.nav-menu {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition: max-height 0.3s ease, padding 0.2s ease;
}

.site-header.open .nav-menu {
  max-height: 420px;
  padding: 8px 0 16px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-link {
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  order: 2;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 21, 28, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 123, 255, 0.6);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--text);
  left: 0;
  transition: transform 0.2s ease;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.site-header.open .nav-toggle span {
  background: transparent;
}

.site-header.open .nav-toggle span::before {
  transform: translateY(6px) rotate(45deg);
}

.site-header.open .nav-toggle span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 18px 36px rgba(47, 123, 255, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  background: var(--accent-strong);
  box-shadow: 0 22px 44px rgba(17, 82, 199, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

.section-light .btn-secondary {
  color: var(--text-dark);
  border-color: rgba(15, 23, 32, 0.18);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.btn:active {
  transform: translateY(0);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
  background-image: radial-gradient(circle at 20% 20%, rgba(47, 123, 255, 0.25), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(7, 15, 30, 0.6), transparent 55%),
    url("pattern.svg");
  background-size: cover, cover, 220px 220px;
  background-blend-mode: screen;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.92), rgba(11, 13, 16, 0.65));
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-content {
  max-width: 620px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: 2.9rem;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 24px;
  color: var(--muted);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tag {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  background: rgba(11, 13, 16, 0.5);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-stats {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-stat {
  padding: 16px;
  border-radius: 14px;
  background: rgba(17, 21, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat strong {
  font-size: 1.3rem;
  display: block;
}

.hero-stat span {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  border-radius: 28px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(17, 21, 28, 0.9), rgba(13, 18, 26, 0.6));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual img {
  border-radius: 20px;
}

.hero-metrics {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  background: rgba(8, 11, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  backdrop-filter: blur(8px);
}

.metric strong {
  display: block;
  font-size: 1.1rem;
}

.metric span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Cards & grids */
.services-grid,
.case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.section-light .card {
  background: #ffffff;
  border-color: var(--border-light);
  box-shadow: var(--shadow-soft);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(47, 123, 255, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(47, 123, 255, 0.4);
  box-shadow: var(--shadow);
}

.card:hover::before {
  opacity: 1;
}

.card-title {
  margin: 16px 0 8px;
  font-size: 1.15rem;
  position: relative;
  z-index: 1;
}

.card-text {
  margin: 0;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

/* Documents */
.doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.doc-toc a {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.doc-toc a:hover,
.doc-toc a:focus-visible {
  background: rgba(47, 123, 255, 0.16);
  border-color: rgba(47, 123, 255, 0.5);
}

.doc-note {
  margin-top: 24px;
  max-width: 760px;
  color: var(--muted);
}

.section-light .doc-toc a {
  color: var(--text-dark);
  border-color: var(--border-light);
}

.section-light .doc-note {
  color: var(--muted-dark);
}

.doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.doc-card {
  display: block;
}

.doc-link {
  margin-top: 16px;
  display: inline-flex;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-light .doc-link {
  color: var(--accent-strong);
}

.doc-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.doc-main {
  min-width: 0;
}

.doc-meta {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.section-light .doc-meta {
  color: var(--muted-dark);
}

.doc-subtitle {
  margin: 24px 0 12px;
  font-size: 1.1rem;
}

.doc-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
}

.section-light .doc-list {
  color: var(--muted-dark);
}

.doc-aside {
  align-self: start;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 18px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.section-light .faq-item {
  background: #ffffff;
  border-color: var(--border-light);
  box-shadow: var(--shadow-soft);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 600;
}

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

.faq-item p {
  margin: 12px 0 0;
  color: var(--muted);
}

.section-light .faq-item p {
  color: var(--muted-dark);
}

.icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  z-index: 1;
}

.section-light .icon {
  border-color: rgba(15, 23, 32, 0.15);
  color: var(--muted-dark);
}

/* Steps timeline */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
}

.step {
  position: relative;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.section-light .step {
  background: #ffffff;
  border-color: var(--border-light);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(47, 123, 255, 0.15);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

/* Architecture diagram */
.diagram {
  display: grid;
  gap: 18px;
  align-items: center;
}

.diagram-level {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.diagram-level.wide {
  position: relative;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.diagram-spread {
  position: absolute;
  top: 24px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.diagram-connector {
  width: 2px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto;
  position: relative;
}

.diagram-connector::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  transform: rotate(45deg);
}

.diagram-card {
  position: relative;
  z-index: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 22px;
  text-align: center;
  min-width: 140px;
}

.section-light .diagram-card {
  background: #ffffff;
  border-color: var(--border-light);
}

.section-light .diagram-spread,
.section-light .diagram-connector,
.section-light .diagram-connector::after {
  background: rgba(15, 23, 32, 0.12);
  border-color: rgba(15, 23, 32, 0.12);
}

/* Case cards */
.case-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.case-meta span {
  display: block;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(47, 123, 255, 0.12);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-light .tag {
  background: rgba(47, 123, 255, 0.08);
}

/* CTA section */
.cta-section {
  background: radial-gradient(circle at top, rgba(47, 123, 255, 0.2), transparent 55%),
    #090b10;
  color: var(--text);
}

.cta-section .section-subtitle {
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: #07090d;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 56px 0;
}

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

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Capabilities */
.cap-list {
  display: grid;
  gap: 18px;
}

.cap-item {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.section-light .cap-item {
  background: #ffffff;
  border-color: var(--border-light);
}

.cap-toggle {
  width: 100%;
  padding: 20px 24px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
}

.cap-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.section-light .cap-icon {
  border-color: rgba(15, 23, 32, 0.15);
  color: var(--muted-dark);
}

.cap-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 24px;
  color: var(--muted);
  transition: max-height 0.3s ease;
}

.cap-item.open .cap-content {
  padding-top: 4px;
  padding-bottom: 20px;
}

.cap-item.open .cap-icon {
  transform: rotate(45deg);
}

.cap-body {
  display: grid;
  gap: 18px;
  align-items: start;
}

.cap-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.8);
}

.section-light .cap-media {
  border-color: var(--border-light);
  background: #ffffff;
}

.cap-media img {
  width: 100%;
  height: auto;
  display: block;
}

.cap-points {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.section-light .cap-points {
  color: var(--muted-dark);
}

.cap-points li {
  margin-bottom: 6px;
}

.cap-meta {
  margin-top: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Cases page */
.case-card {
  display: grid;
  gap: 12px;
}

.case-details {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.case-details strong {
  color: var(--text);
  font-weight: 600;
}

/* Contact form */
.contact-grid {
  display: grid;
  gap: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #ffffff;
  color: var(--text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.15);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-message {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  display: none;
}

.form-message.success {
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
  display: block;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  display: block;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive breakpoints */
@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
  }

  .section-title {
    font-size: 2.6rem;
  }
}

@media (min-width: 768px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .nav {
    order: 0;
    width: auto;
  }

  .header-actions {
    order: 0;
  }

  .nav-menu {
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }

  .nav-toggle {
    display: none;
  }

  .hero h1 {
    font-size: 3.4rem;
  }

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

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

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

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

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

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

  .contact-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }

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

  .form-grid .span-2 {
    grid-column: span 2;
  }

  .cap-body {
    grid-template-columns: 1fr 1.2fr;
  }

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

@media (min-width: 1200px) {
  .hero h1 {
    font-size: 3.9rem;
  }

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

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

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
