:root {
  --bg-canvas: #1e1612; /* Espresso brown base */
  --bg-surface: #2a1f1a;
  --bg-surface-hover: #362a24;
  --text-primary: #f5ecdf; /* Warm cream */
  --text-muted: #bdae93;
  --accent-primary: #f59e0b; /* Amber */
  --accent-hover: #d97706;
  --border-subtle: rgba(245, 158, 11, 0.3);
  
  --radius-sm: 4px;
  --radius-pill: 9999px;
  
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.4);
  --glow-accent: 0 0 24px -4px rgba(245, 158, 11, 0.5);
  
  --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 1.5rem;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 1.125rem;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Outer Frame Wrapper */
.site-frame {
  max-width: 1400px;
  margin: 0 auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-canvas);
  position: relative;
  overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-top: 0;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 { font-size: 3.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.2rem; }
h3 { font-size: 1.75rem; margin-bottom: 1rem; }
p { margin-top: 0; margin-bottom: 1.5rem; }
a { color: var(--accent-primary); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

/* Buttons */
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background-color: var(--accent-primary);
  color: var(--bg-canvas);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease-kinetic);
  font-size: 1rem;
}

.btn:hover, button:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  position: static;
  border-bottom: 1px solid rgba(245, 236, 223, 0.1);
  background: var(--bg-canvas);
}

.brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.desktop-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav a {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

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

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

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  padding: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

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

.mobile-nav a {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(245, 236, 223, 0.1);
  color: var(--text-primary);
  font-weight: 700;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 2.5rem;
}

.hero-img-wrapper {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 500px;
}

.hero-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 3rem;
  transform: translateY(-50%);
  max-width: 600px;
  z-index: 2;
}

.hero-content h1 {
  text-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

.hero-floating-card {
  position: absolute;
  bottom: -2rem;
  right: 3rem;
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
  z-index: 3;
  width: 320px;
}

.hero-floating-card h3 {
  font-size: 1.25rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.hero-floating-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-floating-card li {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  display: flex;
  gap: 0.5rem;
}

.hero-floating-card li::before {
  content: '•';
  color: var(--accent-primary);
  font-weight: bold;
}

/* Bento Grid */
.bento-section {
  padding: 5rem 2.5rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.bento-card {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
  border: 1px solid rgba(245, 236, 223, 0.05);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
  border-color: var(--border-subtle);
  z-index: 2;
}

.bento-card.span-2 { grid-column: span 2; }
.bento-card.span-3 { grid-column: span 3; }
.bento-card.row-2 { grid-row: span 2; }

.card-img {
  position: relative;
  width: 100%;
  height: 240px;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.card-badge {
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  transform: translateY(50%);
  background: var(--accent-primary);
  color: var(--bg-canvas);
  padding: 0.25rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  z-index: 2;
}

.card-content {
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.5rem;
}

.card-content p {
  color: var(--text-muted);
  font-size: 1rem;
  flex: 1;
}

/* Interior Pages Content Wrapper */
.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2.5rem;
}

.content-header {
  text-align: center;
  margin-bottom: 4rem;
}

.content-header img {
  width: 100%;
  height: 40vh;
  object-fit: cover;
  margin-top: 2rem;
  border-radius: var(--radius-sm);
}

.prose h2, .prose h3 {
  margin-top: 3rem;
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.5rem;
}

.highlight-box {
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

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

th {
  background: var(--bg-surface);
  font-weight: 800;
  color: var(--accent-primary);
}

/* Tool Form */
.tool-panel {
  background: var(--bg-surface);
  padding: 2.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

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

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

input, select, textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-canvas);
  border: 1px solid rgba(245, 236, 223, 0.2);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s;
}

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

.tool-output {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-canvas);
  border: 1px dashed var(--accent-primary);
  border-radius: var(--radius-sm);
  display: none;
}

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

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

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

/* FAQ */
.faq-item {
  background: var(--bg-surface);
  margin-bottom: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 236, 223, 0.05);
}

.faq-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--accent-primary);
}

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

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

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

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

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

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

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 236, 223, 0.1);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-legal-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card.span-3 { grid-column: span 2; }
}

@media (max-width: 768px) {
  body { padding: 0.5rem; }
  .desktop-nav { display: none; }
  .mobile-toggle { display: block; }
  .hero { padding: 1rem; }
  .hero-img-wrapper { height: 70vh; }
  .hero-content { left: 1.5rem; right: 1.5rem; top: 30%; transform: translateY(0); }
  .hero-floating-card { position: relative; bottom: 0; right: 0; width: 100%; margin-top: -3rem; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.span-2, .bento-card.span-3 { grid-column: span 1; }
  .content-wrapper { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .site-header { padding: 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}}
