:root {
  color-scheme: light;
  --fall-bg: #4a2e1f;
  --fall-bg-deep: #321d16;
  --fall-warm: #6b442b;
  --fall-maple: #8c2f39;
  --fall-rust: #a6452d;
  --fall-orange: #c9642b;
  --fall-pumpkin: #d97a2b;
  --fall-gold: #ebb45d;
  --fall-mustard: #b88a2e;
  --fall-cream: #fff1dd;
  --fall-cream-2: #f4dfc4;
  --fall-ink: #31221e;
  --fall-subtle: #77523f;
  --fall-line: #d7a66f;
  --fall-shadow: 0 24px 60px rgba(30, 12, 8, .29);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html[data-theme="autumn"] {
  background: var(--fall-bg);
  scroll-behavior: smooth;
}

html[data-theme="autumn"] body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--fall-cream);
  background:
    radial-gradient(circle at 18% 18%, rgba(140, 47, 57, .23), transparent 30rem),
    radial-gradient(circle at 86% 58%, rgba(166, 69, 45, .22), transparent 34rem),
    linear-gradient(135deg, var(--fall-bg-deep), var(--fall-bg) 48%, #563124);
  font-family: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

html[data-theme="autumn"] *,
html[data-theme="autumn"] *::before,
html[data-theme="autumn"] *::after { box-sizing: border-box; }

html[data-theme="autumn"] a { color: inherit; }
html[data-theme="autumn"] button,
html[data-theme="autumn"] input,
html[data-theme="autumn"] textarea { font: inherit; }
html[data-theme="autumn"] button { cursor: pointer; }

html[data-theme="autumn"] :is(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid var(--fall-gold);
  outline-offset: 3px;
}

html[data-theme="classic"] {
  color-scheme: dark;
  scroll-behavior: smooth;
}

html[data-theme="classic"] *,
html[data-theme="classic"] *::before,
html[data-theme="classic"] *::after { box-sizing: border-box; }

html[data-theme="classic"] button,
html[data-theme="classic"] input,
html[data-theme="classic"] textarea { font: inherit; }

html[data-theme="classic"] :is(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 3px;
}

html[data-theme="classic"] .fall-serif,
html[data-theme="classic"] .fall-serif em { font-family: inherit; }

html[data-theme="classic"] .fall-button.secondary {
  color: var(--ink, #e9ecff);
  background: transparent;
  border: 1px solid #404678;
  box-shadow: none;
}

html[data-theme="classic"] .fall-button:hover,
html[data-theme="classic"] .fall-button.secondary:hover {
  color: #101018;
  background: #f4d07b;
  border-color: #f4d07b;
}

html[data-theme="classic"] .status-message { color: var(--muted, #aab0cf); }
html[data-theme="classic"] .status-message.error { color: #ff9fbe; }
html[data-theme="classic"] .status-message.success { color: #9be7b4; }

[data-theme-toggle][aria-disabled="true"] {
  cursor: not-allowed;
  pointer-events: none;
  opacity: .52;
}

html[data-theme="classic"] .fall-only,
html[data-theme="autumn"] .classic-only { display: none !important; }

.page-grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.22' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fall-leaves {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.fall-leaf {
  position: absolute;
  top: -12vh;
  left: var(--leaf-x);
  width: var(--leaf-size);
  height: var(--leaf-size);
  color: var(--leaf-color);
  opacity: var(--leaf-opacity);
  filter: drop-shadow(0 3px 2px rgba(39, 14, 10, .32));
  animation: leaf-descent var(--leaf-duration) linear var(--leaf-delay) infinite;
  will-change: transform;
}

.fall-leaf > span {
  display: block;
  width: 100%;
  height: 100%;
  animation: leaf-flutter var(--leaf-flutter) ease-in-out infinite alternate;
}

.fall-leaf svg { display: block; width: 100%; height: 100%; }
.motion-paused .fall-leaf,
.motion-paused .fall-leaf > span { animation-play-state: paused; }

@keyframes leaf-descent {
  0% { transform: translate3d(0, -12vh, 0); }
  24% { transform: translate3d(var(--leaf-sway), 24vh, 0); }
  49% { transform: translate3d(var(--leaf-sway-opposite), 53vh, 0); }
  75% { transform: translate3d(var(--leaf-sway), 82vh, 0); }
  100% { transform: translate3d(var(--leaf-sway-small), 116vh, 0); }
}

@keyframes leaf-flutter {
  from { transform: rotate(-38deg) scaleX(.72); }
  48% { transform: rotate(42deg) scaleX(1); }
  to { transform: rotate(138deg) scaleX(.64); }
}

.fall-topline {
  position: relative;
  z-index: 20;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 7px 16px;
  color: #fff1d2;
  background: linear-gradient(90deg, #7d2927, #b34d2a, #a93d28);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .62rem;
  font-weight: 800;
}

.fall-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(235, 180, 93, .2);
  background: rgba(50, 29, 22, .96);
  box-shadow: 0 8px 24px rgba(24, 9, 6, .18);
  backdrop-filter: blur(14px);
}

.fall-nav {
  width: min(1160px, calc(100% - 40px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.fall-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--fall-cream);
  text-decoration: none;
  min-width: 188px;
}

.fall-brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fall-gold);
  border-radius: 50%;
  color: var(--fall-gold);
  font: italic 1.65rem Georgia, serif;
}

.fall-brand-name { display: block; font: italic 1.85rem/.8 Georgia, serif; }
.fall-brand-sub {
  display: block;
  padding-top: 7px;
  color: #dfaa76;
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.fall-nav-links { display: flex; align-items: center; gap: 30px; }
.fall-nav-links a {
  position: relative;
  padding: 10px 0;
  color: #e9c8a9;
  text-decoration: none;
  font-size: .96rem;
  font-weight: 800;
  letter-spacing: .035em;
}
.fall-nav-links a:hover,
.fall-nav-links a[aria-current="page"] { color: #fff2d9; }
.fall-nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--fall-gold);
}

.fall-nav-action,
.fall-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--fall-orange);
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff8e9;
  background: var(--fall-orange);
  box-shadow: 0 8px 20px rgba(31, 12, 8, .23);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.fall-nav-action { white-space: nowrap; font-size: .82rem; }
.fall-nav-action:hover,
.fall-button:hover { transform: translateY(-2px); background: var(--fall-maple); border-color: var(--fall-maple); }
.fall-nav-action:active,
.fall-button:active { transform: translateY(0); }
.fall-button.secondary {
  color: var(--fall-maple);
  background: rgba(255, 241, 221, .22);
  border-color: #b86f49;
  box-shadow: none;
}
.fall-button.secondary:hover { color: var(--fall-ink); background: var(--fall-gold); }
.home-hero .fall-button.secondary,
.gallery-actions .fall-button.secondary {
  color: var(--fall-cream);
  background: rgba(255, 255, 255, .035);
  border-color: rgba(235, 180, 93, .72);
}
.home-hero .fall-button.secondary:hover,
.gallery-actions .fall-button.secondary:hover { color: var(--fall-ink); background: var(--fall-gold); }
.fall-button.cream { color: var(--fall-ink); background: var(--fall-cream); border-color: var(--fall-cream); }
.fall-button.cream:hover { background: #ffe0a1; border-color: #ffe0a1; }
.fall-button.danger { background: #7f2b32; border-color: #7f2b32; }
.fall-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.fall-container { position: relative; z-index: 5; width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.fall-eyebrow { color: var(--fall-gold); text-transform: uppercase; letter-spacing: .24em; font-size: .68rem; font-weight: 800; }
.fall-serif { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; line-height: 1.05; }
.fall-serif em { color: #f0a24d; font-weight: 400; }

.fall-page-intro { padding: 70px 0 34px; }
.fall-page-intro h1 { max-width: 850px; margin: 13px 0 20px; font-size: clamp(3.4rem, 7vw, 5.8rem); }
.fall-page-intro p { max-width: 650px; margin: 0; color: #e9c8a7; font-size: .98rem; line-height: 1.9; }

.parchment-panel {
  color: var(--fall-ink);
  background: var(--fall-cream);
  border: 1px solid var(--fall-line);
  box-shadow: var(--fall-shadow);
}

.fall-footer {
  position: relative;
  z-index: 5;
  margin-top: 60px;
  border-top: 1px solid rgba(235, 180, 93, .24);
  color: #d9b893;
  font-size: .7rem;
}
.fall-footer-inner {
  width: min(1160px, calc(100% - 40px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.fall-footer strong { color: #ffe0b1; font: italic 1.35rem Georgia, serif; }
.theme-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.status-message { min-height: 1.5em; color: var(--fall-subtle); }
.status-message.error { color: #912f34; }
.status-message.success { color: #456133; }

@media (max-width: 900px) {
  .fall-nav { width: min(100% - 28px, 1160px); padding: 13px 0; flex-wrap: wrap; gap: 14px; }
  .fall-brand { min-width: 0; }
  .fall-brand-name { font-size: 1.55rem; }
  .fall-brand-sub { font-size: .43rem; }
  .fall-brand-mark { width: 34px; height: 34px; }
  .fall-nav-action { padding: 10px 14px; font-size: .72rem; }
  .fall-nav-links { order: 3; width: 100%; justify-content: space-around; gap: 12px; }
  .fall-nav-links a { font-size: .78rem; }
  .fall-container { width: min(100% - 28px, 1160px); }
  .fall-page-intro { padding: 48px 0 26px; }
  .fall-page-intro h1 { font-size: clamp(3rem, 14vw, 4.25rem); }
  .fall-footer-inner { width: min(100% - 28px, 1160px); padding: 22px 0; }
  .fall-leaf:nth-child(n+14) { display: none; }
}

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