:root {
  --bg-canvas: #f3e9d8;
  --bg-band-alt: #ebe0cc;
  --bg-surface: #fffaf2;
  --bg-surface-hover: #fffdf8;
  --text-primary: #262626;
  --text-muted: #574e46;
  --accent-primary: #a74429;
  --accent-secondary: #7e301b;
  --accent-warm: #8c5a2b;
  --border-subtle: rgba(38, 38, 38, 0.14);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(38, 28, 18, 0.14);
  --shadow-soft: 0 6px 20px -6px rgba(38, 28, 18, 0.1);
  --glow-accent: 0 0 24px -6px rgba(167, 68, 41, 0.35);
  --glass-backdrop: blur(16px) saturate(140%);
  --font-serif: Charter, Cambria, Georgia, "Times New Roman", serif;
  --container-max: 1200px;
  --reading-max: 70ch;
}

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

html {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 100%;
  line-height: 1.7;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.72;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.22;
  margin-top: 0;
  overflow-wrap: break-word;
  hyphens: none;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.25rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.15rem;
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.45rem);
  margin-bottom: 0.65rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--accent-primary);
  color: var(--bg-surface);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.reading-column {
  max-width: var(--reading-max);
  margin: 0 auto;
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.09em;
  text-transform: lowercase;
  font-size: 0.92rem;
  color: var(--accent-primary);
  display: inline-block;
  margin-bottom: 0.6rem;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.68;
  color: var(--text-muted);
}

/* Header & Navigation */
.site-header {
  position: relative;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.35rem 0 1rem;
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-link:hover {
  color: var(--accent-primary);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9825b 0%, var(--accent-primary) 62%, #5e2212 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-surface);
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(167, 68, 41, 0.28);
}

.brand-sub {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  line-height: 1.1;
  font-weight: 400;
}

.primary-nav {
  display: flex;
  justify-content: center;
  width: 100%;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 2.1rem;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.nav-link::after,
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-kinetic);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after,
.text-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--accent-primary);
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease-kinetic), background-color 0.25s var(--ease-kinetic);
}

.menu-toggle:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Buttons & Expanding Links */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--bg-surface);
  padding: 0.92rem 1.75rem;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease-kinetic), box-shadow 0.35s var(--ease-kinetic), background-color 0.25s var(--ease-kinetic);
}

.btn-primary:hover {
  background-color: var(--accent-secondary);
  color: var(--bg-surface);
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-primary);
  font-weight: 600;
  padding-bottom: 0.18rem;
  background: transparent;
  border: none;
  font-family: var(--font-serif);
  font-size: 1rem;
  cursor: pointer;
}

.text-link-arrow {
  transition: transform 0.3s var(--ease-kinetic);
}

.text-link:hover .text-link-arrow {
  transform: translateX(4px);
}

/* Hero Section */
.hero-band {
  position: relative;
  padding: 4rem 0 5.5rem;
  background: linear-gradient(125deg, var(--bg-canvas) 0%, #f7efe2 48%, #ede1cd 100%);
  background-size: 200% 200%;
  animation: warmShift 16s ease infinite;
}

@keyframes warmShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 44px;
  background-color: var(--bg-band-alt);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3.25rem;
  align-items: center;
}

.hero-copy {
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.8rem;
}

.hero-media {
  position: relative;
  margin: 0;
  box-shadow: var(--shadow-elevation);
  background-color: var(--bg-surface);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-caption {
  padding: 0.9rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

/* Clipped Section Bands */
.band {
  position: relative;
  padding: 5rem 0;
}

.band-warm {
  background-color: var(--bg-canvas);
}

.band-deep {
  background-color: var(--bg-band-alt);
}

.band-angled-top {
  padding-top: 6rem;
  margin-top: -2.2rem;
  clip-path: polygon(0 38px, 100% 0, 100% 100%, 0 100%);
}

.band-angled-alt {
  padding-top: 6rem;
  margin-top: -2.2rem;
  clip-path: polygon(0 0, 100% 38px, 100% 100%, 0 100%);
}

/* Editorial Layouts & Cards */
.section-header {
  max-width: var(--reading-max);
  margin: 0 auto 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.85rem;
}

.card {
  background-color: var(--bg-surface);
  border: none;
  border-radius: 0;
  box-shadow: var(--shadow-soft);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.45s var(--ease-kinetic), box-shadow 0.45s var(--ease-kinetic), background-color 0.3s var(--ease-kinetic);
}

.card:hover {
  background-color: var(--bg-surface-hover);
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.card-media {
  margin: -1.85rem -1.85rem 1.4rem;
}

.card-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-canvas);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 0 1px rgba(167, 68, 41, 0.25);
}

.split-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.45s var(--ease-kinetic), box-shadow 0.45s var(--ease-kinetic);
}

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

.split-card-media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.split-card-body {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.compact-thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
}

.compact-thumb-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--bg-surface);
  padding: 1.1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
}

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

.compact-thumb-card img {
  width: 78px;
  height: 78px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  flex-shrink: 0;
}

/* Editorial Breakout Figures, Definition Panels, Pull Quotes */
.wide-figure {
  margin: 2.75rem auto;
  max-width: 1040px;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-elevation);
}

.wide-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.wide-figure figcaption {
  padding: 1rem 1.4rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.definition-panel {
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-elevation);
  padding: 2rem 2.2rem;
  margin: 2.4rem auto;
  max-width: var(--reading-max);
  border-left: 4px solid var(--accent-primary);
}

.definition-list {
  margin: 0;
  display: grid;
  gap: 1.1rem;
}

.definition-list dt {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.05rem;
}

.definition-list dd {
  margin: 0.2rem 0 0;
  color: var(--text-primary);
}

.pull-quote {
  max-width: 58ch;
  margin: 2.8rem auto;
  padding: 1.8rem 2.2rem;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.pull-quote p {
  font-size: 1.32rem;
  font-style: italic;
  line-height: 1.55;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
}

.pull-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-variant: small-caps;
  letter-spacing: 0.06em;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 2.4rem auto;
  max-width: 960px;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 580px;
}

thead th {
  background-color: #ebe0cc;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 1rem 1.15rem;
  border-bottom: 2px solid var(--accent-primary);
}

tbody td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

tbody tr:hover {
  background-color: #fbf5ea;
}

/* Subpage Editorial Header & Split Essay */
.page-hero {
  padding: 3.8rem 0 3.2rem;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.page-hero-inner {
  max-width: var(--reading-max);
  margin: 0 auto;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1.2rem;
}

.essay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.72fr);
  gap: 3rem;
  align-items: start;
}

.essay-body {
  max-width: var(--reading-max);
}

.essay-aside {
  background-color: var(--bg-surface);
  padding: 1.8rem;
  box-shadow: var(--shadow-soft);
}

.aside-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.aside-list li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.aside-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* FAQ List */
.faq-list {
  display: grid;
  gap: 1.35rem;
  max-width: var(--reading-max);
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-surface);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-soft);
}

.faq-item h2,
.faq-item h3 {
  font-size: 1.22rem;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* Contact Tool Form */
.form-stack {
  display: grid;
  gap: 1.3rem;
  background-color: var(--bg-surface);
  padding: 2.2rem;
  box-shadow: var(--shadow-elevation);
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1rem;
  border-radius: 0;
}

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

.preview-box {
  background-color: var(--bg-canvas);
  border-left: 3px solid var(--accent-primary);
  padding: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  color: var(--text-primary);
  line-height: 1.55;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
}

.tool-status {
  font-size: 0.92rem;
  color: var(--accent-primary);
  min-height: 1.4rem;
}

/* Avatars & Editorial Notes */
.avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-band {
    animation: none;
  }
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.15fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.footer-heading {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--accent-primary);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.footer-links a {
  color: var(--text-primary);
}

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

.footer-signoff {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-company {
  font-size: 0.93rem;
  color: var(--text-primary);
  line-height: 1.6;
}

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .essay-layout {
    grid-template-columns: 1fr;
  }
  .split-card {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    gap: 0;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .primary-nav {
    display: none;
    justify-content: flex-start;
    margin-top: 1rem;
    padding: 1.2rem;
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-elevation);
  }
  .primary-nav.is-open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .nav-link {
    font-size: 1.08rem;
  }
  .band {
    padding: 3.5rem 0;
  }
  .band-angled-top,
  .band-angled-alt {
    clip-path: none;
    margin-top: 0;
    padding-top: 3.5rem;
  }
  .hero-band::after {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.1rem;
  }
  .card,
  .split-card-body,
  .definition-panel,
  .form-stack,
  .faq-item {
    padding: 1.35rem;
  }
  .card-media {
    margin: -1.35rem -1.35rem 1.1rem;
  }
  .hero-band {
    padding: 2.5rem 0 3rem;
  }
  .brand-link {
    font-size: 1.15rem;
  }
}