:root {
  --bg-canvas: #1e1612;
  --bg-surface: #2a1f1a;
  --bg-surface-hover: #33251e;
  --text-primary: #f5ecdf;
  --text-muted: #b8a99a;
  --accent-primary: #f59e0b;
  --accent-secondary: #d97706;
  --border-subtle: #4a362c;
  
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --bg-dot: radial-gradient(var(--border-subtle) 1px, transparent 1px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: Charter, Cambria, Georgia, serif;
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.75rem; }

p { margin: 0 0 1.5rem 0; color: var(--text-muted); }

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

.label {
  display: block;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Links & Buttons */
.text-link {
  position: relative;
  display: inline-block;
  color: var(--accent-primary);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.text-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s var(--ease-kinetic);
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.btn-main {
  background: var(--accent-primary);
  color: var(--bg-canvas);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: inline-block;
  font-size: 1rem;
  transition: background 0.2s;
  text-align: center;
}

.btn-main:hover {
  background: var(--accent-secondary);
}

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

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

/* Header */
.site-header {
  position: static;
  padding: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  font-size: 1.5rem;
  font-variant: small-caps;
  color: var(--text-primary);
  letter-spacing: 0.1em;
}

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

.main-nav a {
  font-variant: small-caps;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

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

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

/* Hero Section */
.hero {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background-image: var(--bg-dot);
  background-size: 24px 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

/* Blueprint Flow Layout */
.schematic-flow {
  position: relative;
  padding: 4rem 0 4rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.schematic-flow::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--accent-primary);
}

.flow-step {
  position: relative;
  margin-bottom: 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.flow-step::before {
  content: attr(data-step);
  position: absolute;
  left: -4rem;
  top: 0;
  background: var(--bg-canvas);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant: small-caps;
  font-size: 0.9rem;
}

.step-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

/* Cards */
.card {
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  background: transparent;
  border-radius: 0;
}

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

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

.form-group label {
  display: block;
  font-variant: small-caps;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

input, textarea, select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.75rem;
  font-family: inherit;
  border-radius: 0;
}

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

/* Tools Section */
.tool-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border-subtle);
  background-image: var(--bg-dot);
  background-size: 24px 24px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 3rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-variant: small-caps;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

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

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

.footer-col a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.company-info {
  font-variant: small-caps;
}

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

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

/* Overflows for tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
}

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

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  font-variant: small-caps;
  color: var(--accent-primary);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .hero-grid, .flow-step {
    grid-template-columns: 1fr;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
  }
  
  .main-nav.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .schematic-flow {
    padding-left: 2rem;
  }
  
  .flow-step::before {
    left: -2.5rem;
  }
  
  .hero {
    padding: 3rem 0;
  }
}

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