:root {
  --bg-canvas: #f3e9d8;
  --bg-surface: #fbf6ee;
  --bg-surface-hover: #ffffff;
  --text-primary: #262626;
  --text-muted: #665f57;
  --accent-primary: #c2410c;
  --accent-secondary: #d97706;
  --accent-dark: #78350f;
  --border-subtle: #ded4c3;
  --border-strong: #c2410c;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 10px 24px -4px rgba(60, 40, 20, 0.08);
  --shadow-lift: 0 16px 32px -6px rgba(194, 65, 12, 0.12);
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

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

a:hover, a:focus {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Site Header */
.site-header {
  position: static;
  background-color: #ede2cf;
  border-bottom: 2px solid var(--border-subtle);
  padding: 1.25rem 2rem;
  width: 100%;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--accent-primary);
  text-decoration: none;
  text-transform: uppercase;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-glyph {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--accent-primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 2px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  line-height: 1;
}

/* Diagonal Background Clip Sections */
.diagonal-section-top {
  clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 100%);
  padding-top: 4rem;
}

.diagonal-section-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3vw), 0 100%);
  padding-bottom: 4rem;
}

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

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(243, 233, 216, 0.95), rgba(237, 226, 207, 0.85)), #f3e9d8;
  border-bottom: 2px solid var(--border-subtle);
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: left;
}

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

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 70ch;
  margin-bottom: 2rem;
}

.cta-btn {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--accent-primary);
  cursor: pointer;
  transition: all 0.2s var(--ease-kinetic);
}

.cta-btn:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
  text-decoration: none;
}

.cta-btn-outline {
  background-color: transparent;
  color: var(--accent-primary);
  margin-left: 1rem;
}

.cta-btn-outline:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
}

.bento-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  position: relative;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
  box-shadow: var(--shadow-elevation);
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.bento-card img {
  width: 100%;
  display: block;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
}

.img-16-9 { aspect-ratio: 16 / 9; }
.img-4-3 { aspect-ratio: 4 / 3; }
.img-1-1 { aspect-ratio: 1 / 1; }

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }

.bento-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 0.5rem;
}

.bento-card h2, .bento-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.bento-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

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

th {
  background-color: #ede2cf;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.6);
}

/* Estimator Tool Widget */
.tool-panel {
  background-color: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  padding: 2rem;
  margin: 3rem 0;
}

.tool-panel h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.tool-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  border-radius: 0;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: 2px solid var(--accent-primary);
  border-color: var(--accent-primary);
}

.tool-result-box {
  background-color: #ede2cf;
  padding: 1.25rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--accent-primary);
}

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

/* FAQ Accordion */
.faq-group {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
}

.faq-question {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.faq-answer {
  color: var(--text-muted);
  line-height: 1.65;
}

/* Scroll reveal helper */
.reveal-init {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

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

/* Site Footer */
.site-footer {
  background-color: #211c18;
  color: #dfd7cc;
  padding: 4rem 1.5rem 3rem;
  margin-top: 4rem;
  border-top: 4px solid var(--accent-primary);
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #423830;
  padding-bottom: 0.5rem;
}

.footer-col p {
  font-size: 0.88rem;
  color: #b0a597;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

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

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

.footer-col a {
  color: #dfd7cc;
  font-size: 0.88rem;
}

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

.footer-legal-bar {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #362e27;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: #8a7e71;
}

/* Responsive queries */
@media (max-width: 1024px) {
  .col-8, .col-7, .col-5, .col-4 {
    grid-column: span 6;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    background-color: #ede2cf;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 2px solid var(--accent-primary);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 100;
  }
  .main-nav.nav-open {
    display: flex;
  }
  .col-12, .col-8, .col-7, .col-6, .col-5, .col-4 {
    grid-column: span 12;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

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