:root {
  --bg-canvas: #f3e9d8;
  --bg-surface: #ffffff;
  --text-primary: #262626;
  --accent-primary: #D97706;
  --radius-standard: 4px;
  --radius-pill: 9999px;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(38, 38, 38, 0.15);
  --font-serif: Charter, Cambria, Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-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-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

a:hover {
  opacity: 0.8;
}

a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.small-caps {
  font-variant: small-caps;
  text-transform: lowercase;
  font-size: 1.1em;
  font-weight: bold;
  letter-spacing: 0.05em;
}

/* Header & Nav */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background-color: var(--bg-canvas);
  position: relative;
  z-index: 100;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.nav-links a {
  color: var(--text-primary);
  font-weight: 600;
}

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

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

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

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

.lead-block {
  margin-bottom: 3rem;
  font-size: 1.25rem;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 769px) {
  .grid-2col {
    grid-template-columns: 1fr 1fr;
  }
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  margin-bottom: 3rem;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-standard);
  filter: contrast(1.2) grayscale(0.2);
}

.hero-card {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  padding: 2rem;
  border-radius: var(--radius-standard);
  box-shadow: var(--shadow-elevation);
  max-width: 350px;
}

.hero-card ul {
  list-style: none;
  margin-top: 1rem;
}

.hero-card li {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(38, 38, 38, 0.1);
  padding-bottom: 0.5rem;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-standard);
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
}

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

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-standard);
  margin-bottom: 1rem;
  filter: grayscale(0.4) contrast(1.1);
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--bg-surface) !important;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s var(--ease-kinetic), opacity 0.3s ease;
}

.btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Masonry Grid */
.masonry {
  column-count: 1;
  column-gap: 2rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 2rem;
}

.masonry-item img {
  width: 100%;
  border-radius: var(--radius-standard);
  display: block;
}

@media (min-width: 481px) {
  .masonry { column-count: 2; }
}

@media (min-width: 769px) {
  .masonry { column-count: 3; }
}

/* Side-by-Side Panels */
.panel-split {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
  background: var(--bg-surface);
  border-radius: var(--radius-standard);
  overflow: hidden;
  box-shadow: var(--shadow-elevation);
}

.panel-split img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.panel-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 769px) {
  .panel-split {
    flex-direction: row;
  }
  .panel-split > * {
    flex: 1;
  }
  .panel-split img {
    height: 100%;
  }
  .panel-split.reverse {
    flex-direction: row-reverse;
  }
}

/* Accordions */
.accordion {
  border-bottom: 1px solid rgba(38, 38, 38, 0.2);
  margin-bottom: 1rem;
}

.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  color: var(--text-primary);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-kinetic);
}

.accordion-content-inner {
  padding-bottom: 1.5rem;
}

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

.form-group input, .form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(38, 38, 38, 0.3);
  border-radius: var(--radius-standard);
  font-family: var(--font-serif);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

#summary-box {
  display: none;
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius-standard);
  border: 1px solid var(--accent-primary);
}

#summary-text {
  white-space: pre-wrap;
  font-family: monospace;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: var(--bg-surface);
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-top: 2px solid var(--accent-primary);
  text-align: center;
}

.footer-nav {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Animations */
.reveal-hidden {
  opacity: 0;
  transform: translateY(20px);
}
.reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.7s var(--ease-kinetic);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-card {
    position: static;
    max-width: 100%;
    margin-top: 1rem;
  }
  .hero {
    height: auto;
    margin-bottom: 5rem;
  }
}

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