/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #1f2937;
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.1rem; color: #374151; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #d97706;
  margin-bottom: 0.75rem;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
}

.btn-outline {
  background: transparent;
  color: #d97706;
  border: 2px solid #d97706;
}
.btn-outline:hover {
  background: #d97706;
  color: #fff;
}

.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.9rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a2332 0%, #0f172a 100%);
  color: #d97706;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.logo-text {
  font-size: 1rem;
  color: #0f172a;
}
.logo-text em {
  font-style: normal;
  color: #d97706;
}

.main-nav {
  display: flex;
  gap: 2rem;
}
.main-nav a {
  font-weight: 500;
  color: #4b5563;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: #d97706;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.main-nav a:hover { color: #0f172a; }
.main-nav a:hover::after { transform: scaleX(1); }

.header-cta { padding: 0.6rem 1.2rem; font-size: 0.85rem; }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: #0f172a;
  transition: transform .3s ease, opacity .3s ease;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1a2332 100%);
  color: #fff;
  padding: 5rem 0 6rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(217,119,6,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59,130,246,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
}
.hero h1 .highlight { color: #fbbf24; }

.hero-lead {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbbf24;
}
.hero-stats span { font-size: 0.85rem; color: #94a3b8; }

.hero-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 1.75rem;
}
.hero-card h3 { color: #fff; margin-bottom: 1rem; }
.hero-card ul { list-style: none; margin-bottom: 1.5rem; }
.hero-card li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.95rem;
  color: #cbd5e1;
}
.hero-card li:last-child { border-bottom: none; }
.hero-card li strong { display: block; font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; }
.hero-card li a { color: #fbbf24; }
.hero-card li a:hover { color: #fff; }

/* =========================================
   BREADCRUMBS
   ========================================= */
.breadcrumbs {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.85rem 0;
  font-size: 0.85rem;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6b7280;
}
.breadcrumbs ol li + li::before { content: "›"; margin-right: 0.5rem; color: #9ca3af; }
.breadcrumbs ol a:hover { color: #d97706; }

/* =========================================
   ARTICLE
   ========================================= */
.article {
  padding: 3rem 0 5rem;
}

.article-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: flex-start;
}

/* TOC */
.toc {
  position: sticky;
  top: 100px;
}
.toc-inner {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
}
.toc-inner h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #d97706;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
}
.toc li {
  counter-increment: toc;
  margin-bottom: 0.4rem;
}
.toc a {
  display: block;
  padding: 0.4rem 0.5rem;
  font-size: 0.88rem;
  color: #4b5563;
  border-radius: 4px;
  position: relative;
  padding-left: 2rem;
}
.toc a::before {
  content: counter(toc);
  position: absolute;
  left: 0.5rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
}
.toc a:hover {
  background: #fef3c7;
  color: #b45309;
}
.toc a.active {
  background: #fef3c7;
  color: #b45309;
  font-weight: 600;
}
.toc-cta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}
.toc-cta p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: #6b7280;
}
.toc-cta .btn { width: 100%; font-size: 0.85rem; padding: 0.7rem; }

/* Article body */
.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}
.article-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #6b7280;
}
.article-intro {
  font-size: 1.1rem;
  color: #374151;
  margin-top: 1.25rem;
}

.article-body section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 100px;
}
.article-body section:last-of-type { margin-bottom: 0; }

.article-body h2 {
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #fbbf24;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.article-body p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.article-body a strong {
  color: #b45309;
  border-bottom: 2px solid #fcd34d;
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.article-body a:hover strong {
  color: #92400e;
  border-color: #d97706;
}

.summary-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
  border-left: 5px solid #d97706;
  padding: 2rem;
  border-radius: 10px;
  margin-top: 3rem;
}
.summary-box h2 {
  border-bottom: none;
  margin-top: 0;
  color: #92400e;
}

/* =========================================
   SERVICES TEASER
   ========================================= */
.services-teaser {
  background: #f1f5f9;
  padding: 4rem 0;
}
.services-teaser h2 { text-align: center; }
.services-sub {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
  color: #475569;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  border-color: #fcd34d;
}
.service-card h3 {
  color: #0f172a;
  margin-bottom: 0.75rem;
}
.service-card p {
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0;
}

/* =========================================
   CONTACT
   ========================================= */
.contact {
  padding: 5rem 0;
  background: #fff;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h2 { margin-bottom: 1rem; }
.contact-info > p { margin-bottom: 2rem; color: #4b5563; }

.contact-list { list-style: none; margin-bottom: 2rem; }
.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-list strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.contact-list a { color: #0f172a; font-weight: 500; }
.contact-list a:hover { color: #d97706; }

.contact-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Contact Form */
.contact-form {
  background: linear-gradient(135deg, #1a2332 0%, #0f172a 100%);
  color: #fff;
  padding: 2.5rem;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}
.contact-form h3 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}
.contact-form label {
  display: block;
  margin-bottom: 1.2rem;
}
.contact-form label span {
  display: block;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  transition: border-color .2s ease, background .2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #64748b; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #fbbf24;
  background: rgba(255,255,255,0.09);
}
.contact-form .btn { width: 100%; margin-top: 0.5rem; }
.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
}
.form-status.success { color: #4ade80; }
.form-status.error { color: #f87171; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: #0a0f1c;
  color: #cbd5e1;
  padding-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand p {
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 340px;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li {
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  color: #94a3b8;
}
.footer-col a:hover { color: #fbbf24; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

/* =========================================
   BACK TO TOP
   ========================================= */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all .3s ease;
  z-index: 50;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: 1fr; }
  .toc {
    position: static;
    order: -1;
    margin-bottom: 2rem;
  }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .header-cta { display: none; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
  }
  .main-nav a:last-child { border-bottom: none; }

  .hero { padding: 3rem 0 4rem; }
  .hero-stats { gap: 1.5rem; }

  .article-grid { gap: 1.5rem; }
  .summary-box { padding: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom .container { flex-direction: column; text-align: center; }

  .contact-form { padding: 1.75rem; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 1rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .contact-ctas { flex-direction: column; align-items: stretch; }
  .contact-ctas .btn { width: 100%; }
}

/* Accessibility */
:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}