:root {
  --bg-canvas: #faf6ef;
  --bg-surface: #ffffff;
  --text-primary: #2b211a;
  --text-muted: #5e4c3e;
  --accent-primary: #c2562e;
  --accent-secondary: #a04221;
  --border-color: #2b211a;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  overflow-x: hidden;
}

.data {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-weight: 700;
  color: var(--accent-primary);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 1rem;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: var(--bg-surface);
  border-bottom: 2px solid var(--text-primary);
  position: relative;
  z-index: 100;
}

.brand-logo {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  position: relative;
}

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

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

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

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

/* Kinetic UI & Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 800;
  text-transform: uppercase;
  border: 2px solid var(--text-primary);
  box-shadow: 6px 6px 0 var(--accent-primary);
  transition: all 0.2s var(--ease-kinetic);
  cursor: pointer;
  font-family: inherit;
  margin-top: 1.5rem;
}

.btn:hover, .btn:focus {
  transform: translate(6px, 6px);
  box-shadow: 0px 0px 0 var(--accent-primary);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-surface);
}

/* Layout: Timeline Masonry Flow */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 5%;
}

.timeline-flow {
  position: relative;
  padding-left: 2rem;
}

.timeline-flow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--text-primary);
}

.timeline-node {
  position: relative;
  margin-bottom: 6rem;
  padding-left: 2rem;
}

.node-number {
  position: absolute;
  top: 0;
  left: -3.25rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-primary);
  color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: bold;
  font-size: 1.25rem;
  border: 2px solid var(--text-primary);
}

/* Masonry Stream */
.masonry-stream {
  column-count: 3;
  column-gap: 2rem;
  margin-top: 2rem;
}

.card {
  break-inside: avoid;
  margin-bottom: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  position: relative;
  transition: transform 0.4s var(--ease-kinetic);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Background Gradients */
.bg-terracotta-glow {
  position: relative;
}
.bg-terracotta-glow::before {
  content: '';
  position: absolute;
  top: -10%; left: -10%; right: -10%; bottom: -10%;
  background: radial-gradient(circle at 50% 50%, rgba(194, 86, 46, 0.08) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

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

/* Long-form Content & Reading Widths */
.content-wrapper {
  max-width: 72ch;
  margin: 0 auto;
  font-size: 1.125rem;
}
.content-wrapper p {
  margin-bottom: 1.5rem;
}
.content-wrapper h2, .content-wrapper h3 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}
.content-wrapper ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
th {
  background: var(--text-primary);
  color: var(--bg-surface);
  text-transform: uppercase;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  background: var(--bg-surface);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  color: var(--text-primary);
}
.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-kinetic), padding 0.4s var(--ease-kinetic);
}
.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  max-height: 500px;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}
label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
input, textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--text-primary);
  background: var(--bg-canvas);
  font-family: inherit;
  color: var(--text-primary);
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-surface);
}

/* Footer */
footer {
  background: var(--accent-secondary);
  color: var(--bg-surface);
  padding: 4rem 5%;
  border-top: 4px solid var(--text-primary);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  display: block;
  text-transform: uppercase;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  text-align: left;
  font-size: 0.875rem;
}

/* Media Queries */
@media (max-width: 1024px) {
  .masonry-stream { column-count: 2; }
}

@media (max-width: 768px) {
  .masonry-stream { column-count: 1; }
  .menu-toggle { display: block; }
  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--text-primary);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-kinetic);
  }
  nav ul.active {
    max-height: 400px;
    border-bottom: 2px solid var(--accent-primary);
  }
  nav ul li a {
    color: var(--bg-surface);
    display: block;
    padding: 1.5rem 5%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  nav ul li a:hover {
    background: var(--accent-secondary);
  }
  .timeline-flow::before { left: -1rem; }
  .timeline-node { padding-left: 1rem; }
  .node-number { left: -2.25rem; width: 2rem; height: 2rem; font-size: 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}}
