:root {
  --bg-canvas: #ffffff;
  --bg-surface: #f3f1ec;
  --bg-surface-hover: #ebe7df;
  --text-primary: #29251f;
  --text-muted: #5c5449;
  --accent-primary: #9a3412;
  --accent-secondary: #7c2d12;
  --border-subtle: rgba(41, 37, 31, 0.12);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(41, 37, 31, 0.12);
  --shadow-soft: 0 4px 16px rgba(41, 37, 31, 0.06);
  --glow-accent: 0 0 20px -4px rgba(154, 52, 18, 0.35);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

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

html, body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  object-fit: cover;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

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

:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}

.mono-label, .slide-count, h3.small-heading, .tag-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: 70ch;
  margin: 0 auto;
}

.prose p, .prose ul, .prose ol {
  margin-bottom: 1.25rem;
}

.prose h2 {
  margin: 2.25rem 0 0.85rem;
  font-size: 1.65rem;
  line-height: 1.25;
}

.prose h3 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.25rem;
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
}

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

/* Header: Inset rounded-end floating-style box in normal document flow */
.site-header-wrap {
  padding: 1.25rem 1.5rem 0.5rem;
  position: relative;
}

.site-header {
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  margin-right: auto;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background-color: var(--accent-primary);
  color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  background-color: var(--bg-surface-hover);
  color: var(--accent-primary);
}

.menu-dots-btn {
  display: none;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  width: 40px;
  height: 40px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 1.5rem;
  left: 1.5rem;
  background-color: var(--bg-surface);
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: var(--shadow-elevation);
  z-index: 50;
}

.mobile-nav-panel.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mobile-nav-list a {
  display: block;
  padding: 0.6rem 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  border-radius: 4px;
}

.mobile-nav-list a:hover {
  background-color: var(--bg-surface-hover);
  color: var(--accent-primary);
}

/* Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.8rem 1.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic), background-color 0.2s ease;
}

.btn-pill:hover {
  background-color: var(--accent-secondary);
  color: #ffffff;
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.btn-pill-secondary {
  background-color: #3f3931;
  color: #ffffff;
}

.btn-pill-secondary:hover {
  background-color: #29251f;
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.85rem;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-elevation);
}

.hero-caption {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Diagonal Section Bands */
.section-band {
  padding: 4.5rem 0;
  position: relative;
}

.section-band.surface-warm {
  background-color: var(--bg-surface);
  clip-path: polygon(0 28px, 100% 0, 100% calc(100% - 28px), 0 100%);
  padding: 5.5rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: 68ch;
}

.section-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Sequence Workshop Layout: 1 Large Working Example + 2-Column Grid of Smaller Lessons */
.lead-work-block {
  background-color: var(--bg-canvas);
  border-radius: 4px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 2rem;
  transition: transform 0.35s var(--ease-kinetic), box-shadow 0.35s var(--ease-kinetic);
}

.surface-warm .lead-work-block {
  background-color: var(--bg-canvas);
}

.lead-work-block.surface-card {
  background-color: var(--bg-surface);
}

.lesson-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.lesson-card {
  background-color: var(--bg-surface);
  border-radius: 4px;
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease-kinetic), box-shadow 0.35s var(--ease-kinetic), background-color 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.surface-warm .lesson-card {
  background-color: var(--bg-canvas);
}

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

.lesson-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.lesson-card p {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  font-size: 0.96rem;
}

.lesson-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1.15rem;
}

/* Interactive Manual Carousel Workshop Component */
.carousel-workshop {
  position: relative;
}

.carousel-top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.carousel-status {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-primary);
  background-color: var(--bg-surface);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.surface-card .carousel-status {
  background-color: var(--bg-canvas);
}

.carousel-controls {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.carousel-stage {
  position: relative;
}

.carousel-slide {
  display: none;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.carousel-slide.is-active {
  display: grid;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.slide-narrative h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.slide-narrative p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.slide-meta-box {
  background-color: var(--bg-canvas);
  padding: 1rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
}

.surface-warm .slide-meta-box {
  background-color: var(--bg-surface);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.dot-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: none;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.dot-btn[aria-selected="true"] {
  background-color: var(--accent-primary);
  color: #ffffff;
}

/* Tables & Checklists */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-canvas);
  text-align: left;
}

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

th {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.check-item {
  background-color: var(--bg-canvas);
  padding: 1rem 1.15rem;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: var(--shadow-soft);
}

.check-item input[type="checkbox"] {
  margin-top: 0.3rem;
  accent-color: var(--accent-primary);
  width: 18px;
  height: 18px;
}

/* Forms & Interactive Tools */
.form-grid {
  display: grid;
  gap: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
}

.output-preview {
  background-color: var(--bg-surface);
  padding: 1.25rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
  min-height: 140px;
  margin-top: 1rem;
}

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

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  color: var(--accent-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid, .carousel-slide.is-active {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .menu-dots-btn {
    display: inline-flex;
  }
  .lesson-pair-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .lead-work-block {
    padding: 1.35rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.6rem 1rem;
  }
  .hero-section {
    padding: 2rem 0 3rem;
  }
  .btn-pill {
    width: 100%;
  }
}

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