:root {
  --bg: #f6efdf;
  --bg-soft: #efe3cb;
  --surface: rgba(255, 252, 245, 0.78);
  --surface-strong: #fffaf1;
  --ink: #1d2b2a;
  --ink-soft: #445553;
  --line: rgba(29, 43, 42, 0.12);
  --accent: #8a4b2d;
  --accent-soft: #d8af8d;
  --accent-deep: #6d3220;
  --forest: #335d54;
  --shadow: 0 24px 70px rgba(60, 42, 24, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(216, 175, 141, 0.35), transparent 30%),
    radial-gradient(circle at top right, rgba(51, 93, 84, 0.18), transparent 24%),
    linear-gradient(180deg, #f6efdf 0%, #f2e7d2 45%, #f8f2e6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(29, 43, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 43, 42, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 90%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  position: relative;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.narrow {
  width: min(calc(100% - 2rem), 780px);
}

.section,
.page-hero,
.hero {
  position: relative;
  z-index: 1;
}

.section {
  padding: 3.5rem 0;
}

.section-soft {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.78), rgba(239, 227, 203, 0.7));
  border-block: 1px solid rgba(29, 43, 42, 0.05);
}

.section-head,
.section-split {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.75rem;
}

.section-head h2,
.section-split h2,
.page-hero h1,
.hero h1,
.detail-hero h1,
.center-card h1 {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 6.2rem);
  max-width: 9ch;
}

.page-hero h1,
.detail-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
}

.hero {
  padding: 2rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 2rem;
  align-items: center;
}

.hero-copy,
.hero-art,
.page-hero .narrow,
.detail-hero,
.prose-panel,
.card,
.timeline-item,
.stack-card,
.gallery-card,
.stat-card,
.detail-body,
.detail-side,
.notice-card,
.center-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-art,
.page-hero .narrow,
.detail-hero,
.prose-panel,
.center-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-text,
.section-intro,
.detail-body p,
.prose-panel p,
.notice-card,
.detail-meta,
.stack-card p,
.card p,
.timeline-item p,
.gallery-caption,
.footer-copy {
  color: var(--ink-soft);
  line-height: 1.7;
}

.hero-actions,
.meta-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button {
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.button:hover,
.text-link:hover,
.card:hover,
.stack-card:hover,
.gallery-card:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff7ed;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  box-shadow: 0 16px 28px rgba(109, 50, 32, 0.25);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 250, 241, 0.92);
  border-color: rgba(29, 43, 42, 0.09);
}

.text-link {
  color: var(--forest);
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.8rem 0;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(246, 239, 223, 0.92), rgba(246, 239, 223, 0.72));
  border-bottom: 1px solid rgba(29, 43, 42, 0.08);
}

.nav-shell,
.site-footer .footer-shell {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-lockup {
  display: grid;
  gap: 0.1rem;
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand-subtitle {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink-soft);
}

.nav-links a.is-active,
.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 250, 241, 0.85);
}

.notice-band {
  padding: 0 0 1.5rem;
}

.search-panel {
  margin-bottom: 1.5rem;
  padding: 1.3rem;
  background: rgba(255, 250, 241, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.search-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.compact-head {
  margin-top: 1.25rem;
}

.compact-panel {
  margin-bottom: 1.25rem;
}

.search-bar input {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 43, 42, 0.12);
  background: rgba(255, 252, 245, 0.92);
  color: var(--ink);
}

.search-bar input:focus {
  outline: 2px solid rgba(138, 75, 45, 0.22);
  border-color: rgba(138, 75, 45, 0.35);
}

.search-meta {
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.notice-list {
  display: grid;
  gap: 0.8rem;
}

.notice-card {
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.feature-grid,
.card-grid,
.gallery-grid,
.related-grid,
.highlight-layout,
.stat-row {
  display: grid;
  gap: 1.25rem;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.related-grid,
.highlight-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 1.25rem;
}

.card,
.stack-card,
.timeline-item,
.gallery-card,
.stat-card {
  overflow: hidden;
}

.card,
.stack-card,
.gallery-card,
.timeline-item,
.stat-card,
.detail-side {
  padding: 1.2rem;
}

.card-media,
.gallery-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 4px);
  margin-bottom: 1rem;
}

.commune-visual {
  aspect-ratio: 4 / 3;
  width: 100%;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: calc(var(--radius-md) - 4px);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(145deg, var(--commune-primary), var(--commune-secondary));
  color: var(--commune-ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.commune-visual::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.commune-visual-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.commune-visual-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
  padding: 0 0.7rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.commune-visual-chip {
  max-width: 11rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: right;
}

.commune-visual-body {
  position: relative;
  z-index: 1;
}

.commune-visual-body strong {
  display: block;
  margin: 0 0 0.35rem;
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.commune-visual-body p {
  margin: 0;
  max-width: 16ch;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.card h3,
.stack-card h3,
.timeline-item h3,
.gallery-card h3,
.detail-side h3,
.detail-body h2,
.detail-body h3,
.highlight-layout h3 {
  margin: 0 0 0.55rem;
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

.card-meta,
.stack-meta,
.detail-meta,
.caption-meta,
.badge-row,
.gallery-meta,
.timeline-meta {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  background: rgba(216, 175, 141, 0.28);
  color: var(--accent-deep);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge-neutral {
  background: rgba(51, 93, 84, 0.12);
  color: var(--forest);
}

.timeline-preview,
.timeline-full {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  border-left: 4px solid rgba(138, 75, 45, 0.24);
}

.stack-list {
  display: grid;
  gap: 1rem;
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.gallery-thumb {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 43, 42, 0.1);
  background: rgba(255, 250, 241, 0.85);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.detail-hero {
  display: grid;
  gap: 1rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 1.25rem;
}

.detail-layout-wide {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.7fr);
}

.detail-body,
.detail-side {
  min-height: 100%;
}

.detail-body {
  display: grid;
  gap: 1.2rem;
}

.detail-body section {
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius-md);
  background: rgba(255, 252, 245, 0.7);
  border: 1px solid rgba(29, 43, 42, 0.07);
}

.detail-body section > :last-child {
  margin-bottom: 0;
}

.detail-body h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
}

.detail-body h2::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 0 0 6px rgba(216, 175, 141, 0.16);
}

.detail-body p {
  margin: 0 0 0.95rem;
}

.detail-body h2:not(:first-child),
.detail-body h3:not(:first-child) {
  margin-top: 0;
}

.detail-body ul,
.prose-panel ul {
  padding-left: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.detail-body li + li,
.prose-panel li + li {
  margin-top: 0.45rem;
}

.stat-card strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.7rem;
  font-family: "Fraunces", serif;
}

.site-footer {
  padding: 2rem 0 3rem;
}

.footer-shell {
  display: grid;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  background: rgba(29, 43, 42, 0.92);
  color: #f8f2e6;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.footer-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(248, 242, 230, 0.9);
}

.prose-panel {
  display: grid;
  gap: 1rem;
}

.center-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.center-card {
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms ease, transform 480ms ease;
}

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

@media (max-width: 1024px) {
  .feature-grid,
  .card-grid,
  .gallery-grid,
  .related-grid,
  .highlight-layout,
  .stat-row,
  .gallery-strip,
  .detail-layout,
  .detail-layout-wide,
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout,
  .detail-layout-wide,
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 1rem), var(--container));
  }

  .section {
    padding: 2.4rem 0;
  }

  .feature-grid,
  .card-grid,
  .gallery-grid,
  .related-grid,
  .highlight-layout,
  .stat-row,
  .gallery-strip {
    grid-template-columns: 1fr;
  }

  .section-head,
  .section-split,
  .nav-shell {
    align-items: start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .search-head {
    flex-direction: column;
    align-items: start;
  }
}