:root {
  --bg-canvas: #f3e9d8;
  --bg-surface: #fff9ee;
  --bg-surface-hover: #fdf4e3;
  --text-primary: #262626;
  --text-muted: #525252;
  --accent-primary: #8a4b24;
  --accent-secondary: #6b3a1c;
  --border-subtle: rgba(138, 75, 36, 0.15);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.15);
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

/* Header & Nav */
.header-wrapper {
  padding: 1.5rem;
}

.main-header {
  background: var(--bg-surface);
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 100;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text-primary);
  text-decoration: none;
}

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

.main-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

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

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

/* Layout Bands & Containers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.band-sand {
  background-color: var(--bg-canvas);
  padding: 5rem 0;
}

.band-ivory {
  background-color: var(--bg-surface);
  padding: 5rem 0;
}

.band-clip-diag {
  clip-path: polygon(0 0, 100% 3%, 100% 100%, 0 97%);
  margin: -2rem 0;
  position: relative;
  z-index: 10;
}

.band-clip-curve {
  clip-path: ellipse(150% 100% at 50% 100%);
  padding-bottom: 7rem;
}

/* Hero Section */
.hero-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
}

.hero-img-container {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 450px;
  background-color: #d8cec0; 
  border-radius: 0;
}

.hero-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  opacity: 0.85;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 3rem;
  transform: translateY(-50%);
  background: var(--bg-surface);
  padding: 2.5rem;
  max-width: 450px;
  border-radius: 0;
  box-shadow: var(--shadow-elevation);
}

.fact-panel {
  margin: 1.5rem 0 2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-primary);
}

.fact-panel p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.fact-panel p:last-child {
  margin-bottom: 0;
}

/* Buttons */
.pill-btn {
  display: inline-block;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s var(--ease-kinetic);
  border: none;
  cursor: pointer;
  text-align: center;
}

.pill-btn:hover {
  background: var(--accent-secondary);
  color: #fff;
  transform: translateY(-2px);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-surface);
  border-radius: 0;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.band-ivory .card {
  background: var(--bg-canvas);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elevation);
}

.card h3 {
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-muted);
  flex-grow: 1;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 1.5rem;
}

/* Forms & Inputs */
.tool-composer {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: 0;
  box-shadow: var(--shadow-soft);
  margin-bottom: 3rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

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

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

.composer-preview {
  background: #fff;
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  white-space: pre-wrap;
  min-height: 150px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  border-radius: 0;
}

.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* FAQ Accordion Look (CSS only via details/summary) */
details.faq-item {
  background: var(--bg-surface);
  margin-bottom: 1rem;
  border-radius: 0;
  box-shadow: var(--shadow-soft);
}

.band-ivory details.faq-item {
  background: var(--bg-canvas);
}

summary.faq-question {
  padding: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  font-family: Georgia, serif;
  font-size: 1.1rem;
}

summary.faq-question::-webkit-details-marker {
  display: none;
}

details.faq-item[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-answer {
  padding: 1.5rem;
  color: var(--text-muted);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
}

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

th {
  font-family: Georgia, serif;
  background: var(--bg-canvas);
}

/* Footer */
.site-footer {
  background: #1a1614;
  color: #d8cec0;
  padding: 5rem 0 2rem;
  margin-top: auto;
}

.site-footer a {
  color: #d8cec0;
}

.site-footer a:hover {
  color: #fff;
}

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

.footer-col h4 {
  color: #fff;
  margin-bottom: 1.5rem;
}

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

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

.footer-scope {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #a39a8f;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #8c8479;
}

.legal-links {
  display: flex;
  gap: 1.5rem;
}

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

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

/* Media Queries */
@media (max-width: 1024px) {
  .hero-overlay {
    left: 1.5rem;
    right: 1.5rem;
    max-width: calc(100% - 3rem);
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 0 0 1rem 1rem;
    box-shadow: var(--shadow-elevation);
    margin-top: 10px;
    align-items: flex-start;
  }
  
  .main-nav.nav-open {
    display: flex;
  }
  
  .hero-img-container {
    height: auto;
    min-height: 400px;
  }
  
  .hero-overlay {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    margin: -3rem auto 0;
    width: 90%;
    max-width: none;
  }
  
  .band-sand, .band-ivory {
    padding: 3rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card, .pill-btn {
    transition: none;
  }
  .card:hover, .pill-btn:hover {
    transform: none;
  }
}