:root {
  --bg-canvas: #0b0717; /* Even darker edge for the outside frame */
  --bg-frame: #160f2e; /* Midnight purple base */
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-surface-hover: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --accent-primary: #e0409b; /* Magenta */
  --accent-secondary: #10b981; /* Emerald */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.4);
  --glow-accent: 0 0 24px -4px var(--accent-primary);
  --radius-panel: 20px;
  --radius-pill: 50px;
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: 'Charter', 'Cambria', serif;
  line-height: 1.6;
  padding: 2vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.75rem); }
p { margin-bottom: 1.5rem; color: var(--text-muted); }
a { color: var(--text-primary); text-decoration: none; transition: color 0.3s var(--ease-kinetic); }
a:hover { color: var(--accent-primary); }

.utility-label {
  font-variant: small-caps;
  text-transform: lowercase;
  font-size: 0.9em;
  letter-spacing: 1px;
  color: var(--accent-secondary);
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

/* Inset Framing Line */
.page-frame {
  background-color: var(--bg-frame);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* Pill Header */
.pill-header {
  position: relative;
  margin: 24px auto;
  width: calc(100% - 48px);
  max-width: 1200px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 10px;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  font-variant: small-caps;
  font-size: 1.1rem;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.main-nav a:hover {
  background: var(--bg-surface-hover);
}

/* Button */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

/* Main Layout Constraints */
main {
  flex: 1;
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.copy-container {
  max-width: 72ch;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 60px 0;
  margin-bottom: 60px;
}

.hero-collage {
  position: relative;
  height: 400px;
  width: 100%;
}

.hero-collage img {
  position: absolute;
  border-radius: var(--radius-panel);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
  object-fit: cover;
  transition: transform 0.5s var(--ease-kinetic);
}

.hero-collage .img-1 {
  width: 60%;
  height: 250px;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-collage .img-2 {
  width: 55%;
  height: 220px;
  bottom: 20px;
  right: 0;
  z-index: 2;
}

.hero-collage .img-3 {
  width: 45%;
  height: 180px;
  top: 50%;
  left: 20%;
  transform: translateY(-50%);
  z-index: 3;
}

.hero-collage:hover .img-1 { transform: translate(-10px, -10px); }
.hero-collage:hover .img-2 { transform: translate(10px, 10px); }
.hero-collage:hover .img-3 { transform: translate(0, -50%) scale(1.05); }

/* Dense Compact Panels */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  padding: 32px;
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
}

.panel:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-elevation);
  background: var(--bg-surface-hover);
}

.panel-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
}

/* Statistical Strips */
.stat-strip {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--accent-secondary);
  border-radius: 0 var(--radius-panel) var(--radius-panel) 0;
  margin: 40px 0;
  align-items: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-secondary);
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Minimalist List Rows */
.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.list-row:last-child {
  border-bottom: none;
}

.list-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Tabs System */
.tabs-container {
  margin: 40px 0;
  background: var(--bg-surface);
  border-radius: var(--radius-panel);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.2);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 16px;
  font-family: inherit;
  font-variant: small-caps;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  color: var(--accent-primary);
  background: var(--bg-surface);
  box-shadow: inset 0 2px 0 var(--accent-primary);
}

.tab-content {
  display: none;
  padding: 32px;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s var(--ease-kinetic);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 40px 0;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: rgba(0,0,0,0.2);
  font-variant: small-caps;
  color: var(--accent-secondary);
}

tr:hover td {
  background: var(--bg-surface);
}

/* Contact Form */
.audit-form {
  display: grid;
  gap: 24px;
  background: var(--bg-surface);
  padding: 40px;
  border-radius: var(--radius-panel);
  border: 1px solid var(--border-subtle);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-variant: small-caps;
  color: var(--accent-secondary);
}

.form-group input, .form-group textarea {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-kinetic), transform 0.8s var(--ease-kinetic);
}
.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-frame);
    flex-direction: column;
    padding: 24px;
    border-radius: var(--radius-panel);
    border: 1px solid var(--border-subtle);
    gap: 16px;
    box-shadow: var(--shadow-elevation);
  }
  .main-nav.nav-open {
    display: flex;
  }
  .pill-header {
    width: 100%;
    border-radius: 20px;
    margin: 0;
    padding: 16px 20px;
  }
  .page-frame {
    margin: 0;
    border-radius: 0;
    border: none;
  }
  body {
    padding: 0;
  }
  footer {
    flex-direction: column;
    text-align: center;
  }
  .tabs-header {
    flex-direction: column;
  }
  .stat-strip {
    flex-direction: column;
    text-align: center;
    border-left: none;
    border-top: 4px solid var(--accent-secondary);
    border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  }
}

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