:root {
  /* Strict Palette: Whiz Scandi Puzzle (No Blue) */
  --bg-canvas: #022c22; /* Deep emerald base */
  --bg-surface: #064032; /* Slightly elevated panel background */
  --bg-surface-hover: #095241;
  --text-primary: #f4f1ea; /* Off-white text */
  --text-muted: #c2baad;
  --accent-primary: #d4a84b; /* Warm gold */
  --border-subtle: rgba(212, 168, 75, 0.3); /* Gold tint border */
  
  /* Typography */
  --font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  
  /* UI Metrics & Physics */
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --section-padding: 6rem 5%;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Strict 0px radius rule */
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: normal;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); text-transform: uppercase; letter-spacing: 0.05em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1.5rem; }
a { color: var(--accent-primary); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--text-primary); }

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Header & Nav - Strict Left Alignment, Thin Bar */
header {
  position: relative; /* Not fixed/sticky per rules */
  width: 100%;
  z-index: 100;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.top-bar {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 5%;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.brand {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: auto; /* Strictly far left */
}

#main-nav {
  display: flex;
  gap: 2rem;
}

#main-nav a {
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

#main-nav a:hover {
  color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  height: 80vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5%;
  background: #000;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-gradient {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-canvas) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
}

/* Sections & Clip Paths */
section {
  padding: var(--section-padding);
  position: relative;
  background: var(--bg-canvas);
}

.section-alt {
  background: var(--bg-surface);
  clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
  padding: 8rem 5%;
  margin: -2rem 0;
  z-index: 2;
}

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

.copy-constrained {
  max-width: 72ch;
  margin: 0 auto 3rem auto;
  text-align: center;
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  grid-auto-flow: dense;
}

.bento-large { grid-column: span 2; }
.bento-tall { grid-row: span 2; }

/* Flat Panels/Cards (No shadow, 1px border, 0 radius) */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s var(--ease-kinetic);
}

.panel:hover {
  background: var(--bg-surface-hover);
}

.panel-img-wrapper {
  margin: -2rem -2rem 1.5rem -2rem;
  border-bottom: 1px solid var(--border-subtle);
  background: #000; /* Plain dark background for 3D renders */
  aspect-ratio: 4/3;
  overflow: hidden;
}

.panel-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keeps 3D render intact on dark background */
  padding: 1rem;
}

.panel-img-cover img {
  object-fit: cover;
  padding: 0;
}

/* Stat Strips */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 1px solid var(--accent-primary);
  border-bottom: 1px solid var(--accent-primary);
  padding: 0.75rem 0;
  margin: 2rem 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
}

.stat-val {
  font-size: 1.5rem;
  color: var(--accent-primary);
  font-weight: bold;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-block;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
  padding: 1rem 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-kinetic);
  text-align: center;
}

.btn:hover {
  background: var(--accent-primary);
  color: var(--bg-canvas);
}

/* Accordion for Timelines */
details {
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  background: var(--bg-surface);
}

summary {
  padding: 1.5rem;
  font-size: 1.2rem;
  color: var(--accent-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

.details-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: -1px;
}

/* Forms & Tools */
.contact-tool {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
}

input, textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 1rem;
  font-family: var(--font-family);
  transition: border-color 0.3s ease;
}

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

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

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

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  padding: 4rem 5% 2rem 5%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
  margin-top: 1rem;
}

.footer-links h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.footer-links a {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
th, td {
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  text-align: left;
}
th {
  background: var(--bg-surface);
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* Media Queries */
@media (max-width: 1024px) {
  .bento-large { grid-column: span 1; }
  .section-alt { clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%); }
}

@media (max-width: 768px) {
  #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 2rem 5%;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  #main-nav.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-strip {
    flex-direction: column;
    gap: 1rem;
  }
}

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