:root {
  --bg-canvas: #1e1612;
  --bg-surface: #2a201a;
  --bg-darker: #150f0c;
  --accent-primary: #f59e0b;
  --text-primary: #f5ecdf;
  --text-muted: #c2b5a3;
  --border-width: 1px;
  --font-main: 'Trebuchet MS', 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

a:hover {
  color: var(--text-primary);
}

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

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; color: var(--accent-primary); }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1.5rem; }

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

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

/* Header & Nav */
.top-bar {
  background-color: var(--accent-primary);
  color: var(--bg-canvas);
  text-align: center;
  padding: 0.25rem 1rem;
  font-size: 0.875rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}

header {
  background-color: var(--bg-darker);
  border-bottom: var(--border-width) solid var(--accent-primary);
  position: relative;
  z-index: 100;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.desktop-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;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--bg-surface);
  border-bottom: var(--border-width) solid var(--accent-primary);
  flex-direction: column;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--text-primary);
  text-transform: uppercase;
}

/* Hero */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg-darker);
  overflow: hidden;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  background: rgba(30, 22, 18, 0.8);
  border: var(--border-width) solid var(--accent-primary);
  max-width: 800px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: transparent;
  color: var(--accent-primary);
  border: var(--border-width) solid var(--accent-primary);
  padding: 0.75rem 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border-radius: 0;
  text-align: center;
}

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

/* Layout Elements */
.section-pad {
  padding: 5rem 0;
}

.clip-section {
  background-color: var(--bg-surface);
  clip-path: polygon(0 3vw, 100% 0, 100% calc(100% - 3vw), 0 100%);
  padding: 8rem 0;
  margin: -3vw 0;
  position: relative;
  z-index: 10;
}

/* Timeline Flow */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 3rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background-color: var(--accent-primary);
}

.timeline-step {
  position: relative;
  margin-bottom: 4rem;
}

.timeline-step::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: -3.8rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  background-color: var(--bg-canvas);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.timeline-container { counter-reset: step-counter; }

/* Cards & Components */
.card {
  background-color: var(--bg-darker);
  border: var(--border-width) solid var(--accent-primary);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 0;
  box-shadow: none !important;
}

.horizontal-split {
  display: flex;
  flex-direction: column;
  border: var(--border-width) solid var(--accent-primary);
  margin-bottom: 2rem;
  background-color: var(--bg-darker);
}

.horizontal-split-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: var(--border-width) solid var(--accent-primary);
}

.horizontal-split-content {
  padding: 2rem;
}

@media (min-width: 769px) {
  .horizontal-split {
    flex-direction: row;
  }
  .horizontal-split-img {
    width: 40%;
    height: auto;
    border-bottom: none;
    border-right: var(--border-width) solid var(--accent-primary);
  }
  .horizontal-split-content {
    width: 60%;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
  border: var(--border-width) solid var(--accent-primary);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: var(--border-width) solid rgba(245, 158, 11, 0.3);
}

th {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

label {
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  font-size: 0.9rem;
}

input, select, textarea {
  background-color: var(--bg-darker);
  border: var(--border-width) solid var(--accent-primary);
  color: var(--text-primary);
  padding: 1rem;
  font-family: var(--font-main);
  border-radius: 0;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  background-color: var(--bg-surface);
}

.tool-output {
  background-color: #111;
  border: var(--border-width) solid var(--accent-primary);
  padding: 1rem;
  font-family: monospace;
  white-space: pre-wrap;
  margin-top: 1rem;
  color: var(--text-muted);
  display: none;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

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

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

/* Footer */
footer {
  background-color: var(--bg-darker);
  border-top: var(--border-width) solid var(--accent-primary);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

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

@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-col h4 {
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: block; }
  h1 { font-size: 2rem; }
  .clip-section { padding: 5rem 0; clip-path: polygon(0 5vw, 100% 0, 100% calc(100% - 5vw), 0 100%); margin: -5vw 0; }
  .timeline-container { padding-left: 2rem; }
  .timeline-step::before { left: -2.8rem; width: 1.5rem; height: 1.5rem; font-size: 0.8rem; }
}

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