:root {
  --bg-canvas: #150826;
  --bg-surface: #22103d;
  --bg-surface-alt: #1a0a30;
  --text-primary: #ffffff;
  --text-muted: #dfd2f5;
  --accent-primary: #c084fc;
  --accent-hover: #d8b4fe;
  --accent-btn: #7e22ce;
  --border-subtle: #3d1c69;
  --badge-bg: #7e22ce;
  --badge-text: #ffffff;
  --max-w: 1100px;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  border: 1px solid var(--border-subtle);
  margin: clamp(0.5rem, 1.5vw, 1.25rem);
}

.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  background: var(--accent-primary);
  color: var(--bg-canvas);
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Slim & Proper Header */
.site-header {
  position: relative;
  margin: 0.65rem auto 1.25rem auto;
  max-width: var(--max-w);
  width: calc(100% - 1.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.35rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 100;
  box-shadow: 0 4px 18px rgba(12, 4, 22, 0.45);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand span {
  color: var(--accent-primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  list-style: none;
}
.nav-desktop a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--accent-primary);
}

.nav-cta {
  display: inline-block;
  border: 1px solid var(--accent-primary);
  background: var(--accent-btn);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--bg-canvas);
  border-color: var(--accent-hover);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 0.15rem 0.55rem;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.menu-toggle:hover {
  background: var(--bg-surface-alt);
  border-color: var(--accent-primary);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
  flex-direction: column;
  gap: 0.4rem;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  z-index: 101;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-menu a:hover {
  color: var(--accent-primary);
}
.mobile-menu a:last-child {
  border-bottom: none;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Main Content & Bands */
main {
  flex: 1;
  width: 100%;
}

.band {
  width: 100%;
  padding: clamp(2rem, 5vw, 4.5rem) 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.band-alt {
  background-color: var(--bg-surface-alt);
}
.band-highlight {
  background-color: var(--bg-surface);
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-bottom: 1.25rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 1rem;
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 0.75rem;
}
p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 72ch;
}
p:last-child {
  margin-bottom: 0;
}
.lede {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Buttons */
.btn-outline {
  display: inline-block;
  border: 1px solid var(--accent-primary);
  color: #ffffff;
  background: var(--accent-btn);
  padding: 0.65rem 1.35rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-top: 1rem;
}
.btn-outline:hover {
  background: var(--accent-hover);
  color: var(--bg-canvas);
  border-color: var(--accent-hover);
}

/* Hero Section */
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-text .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.hero-photos {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img {
  position: absolute;
  border: 2px solid var(--border-subtle);
  box-shadow: 0 12px 28px rgba(0,0,0,0.55);
  object-fit: cover;
  background-color: #241142;
  border-radius: 4px;
}
.hero-img-1 {
  width: 65%;
  height: 250px;
  top: 0;
  left: 0;
  z-index: 1;
}
.hero-img-2 {
  width: 70%;
  height: 260px;
  bottom: 0;
  right: 0;
  z-index: 2;
  border-color: var(--accent-primary);
}
.hero-img-3 {
  width: 45%;
  height: 170px;
  top: 25%;
  left: 28%;
  z-index: 3;
}

/* Project Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}
.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #17092c;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-badge {
  position: absolute;
  bottom: -0.65rem;
  right: 1.25rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--accent-primary);
  z-index: 2;
}
.card-body {
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 {
  margin-bottom: 0.5rem;
}
.card-meta {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
}

/* Process & Step Sequence */
.steps-sequence {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.step-item {
  border-top: 2px solid var(--accent-primary);
  padding-top: 1rem;
}
.step-number {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

/* Material Checklist & Comparison Table */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.check-item {
  background: var(--bg-surface-alt);
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-primary);
}
.check-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 2rem;
  border: 1px solid var(--border-subtle);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}
th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  background: var(--bg-surface);
  color: var(--accent-primary);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
td {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FAQ Details */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
details.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  border-radius: 4px;
}
details.faq-item summary {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent-primary);
  margin-left: 1rem;
}
details.faq-item[open] summary::after {
  content: "–";
}
details.faq-item p {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* Contact & Drafting Tool */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2rem;
  border-radius: 4px;
}
.form-group {
  margin-bottom: 1.25rem;
}
label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border-radius: 4px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}
.tool-preview-box {
  background: var(--bg-canvas);
  border: 1px dashed var(--border-subtle);
  padding: 1.25rem;
  margin-top: 1.5rem;
  min-height: 120px;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: 4px;
}
.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Legal text formatting */
.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}
.legal-content p, .legal-content ul {
  margin-bottom: 1.25rem;
}
.legal-content ul {
  padding-left: 1.5rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  padding: 3rem 1.25rem 2rem;
  margin-top: auto;
}
.footer-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-col h4 {
  color: var(--accent-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-nav a:hover {
  color: var(--accent-primary);
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-bottom a {
  color: var(--accent-primary);
  text-decoration: none;
}

/* Accessibility & Focus States */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Responsive queries */
@media (max-width: 860px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
  .hero-photos {
    min-height: 280px;
    margin-top: 1.5rem;
  }
  .footer-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-cta {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .hero-photos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: auto;
  }
  .hero-img {
    position: static;
    width: 100%;
    height: 200px;
  }
}

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