@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&display=swap');

:root {
  --bg: #fdf8f1;
  --paper: rgba(255, 255, 255, 0.85);
  --ink: #2f2616;
  --accent: #e6b574;
  --accent-light: #f7dcb3;
  --line: rgba(47, 38, 22, 0.1);
  --muted: #8a7b65;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg) url('ui/bg-paper.png') repeat;
  color: var(--ink);
  line-height: 1.6;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  background: rgba(253, 248, 241, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-family: 'Cinzel Decorative', 'Playfair Display', serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

.logo img {
  width: 52px;
  height: 52px;
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--ink);
}

.cta {
  border: none;
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

main {
  flex: 1;
  padding: 4vw;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  padding: 3rem;
  background: var(--paper);
  border-radius: 32px;
  border: 1px solid var(--line);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn,
.ghost {
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}

.ghost {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.hero__portrait {
  position: relative;
  text-align: center;
}

.frame {
  border: 2px solid var(--accent);
  padding: 1rem;
  border-radius: 24px;
  background: white;
  box-shadow: 0 20px 40px rgba(47, 38, 22, 0.1);
}

.frame img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.frame-label {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.section {
  padding: 2.5rem;
  background: var(--paper);
  border-radius: 28px;
  border: 1px solid var(--line);
}

.section__heading h2 {
  font-family: 'Playfair Display', serif;
  margin: 0.4rem 0 1.5rem;
}

.section__cta {
  margin-top: 1.5rem;
}

.section__cta .text-link {
  font-weight: 600;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 1rem;
}

.back-home:hover {
  color: var(--ink);
}

.placeholder {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.card-carousel,
.scroll-gallery {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

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

.tool-grid .placeholder {
  grid-column: 1 / -1;
  margin: 0;
}

.exhibit-card,
.atelier-card,
.tool-card,
.info-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.5rem;
  min-width: 250px;
  box-shadow: 0 15px 25px rgba(47, 38, 22, 0.08);
}

.exhibit-card h3,
.info-card h3,
.atelier-card h3,
.tool-card h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.6rem;
}

.tool-card .tool-card__title {
  margin: 0;
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card__description {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  min-height: calc(1.5em * 4);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card--emphasis {
  background: linear-gradient(135deg, rgba(252, 233, 208, 0.95), rgba(255, 247, 235, 0.95));
  border-color: rgba(230, 181, 116, 0.85);
  box-shadow: 0 30px 45px rgba(230, 181, 116, 0.4);
}

.info-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.info-card h3 a:hover {
  color: var(--accent);
}

.info-card__image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

.featured-grid {
  max-height: 720px;
  overflow-y: auto;
  padding-right: 0.5rem;
  grid-auto-rows: 1fr;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(47, 38, 22, 0.06);
  color: var(--muted);
  font-size: 0.85rem;
  border: 1px solid var(--line);
}

.line-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.line-art img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: white;
  display: block;
}

.tag {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

.tag.muted {
  color: rgba(138, 123, 101, 0.6);
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

.info-card ul,
.contact__grid ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.atelier-card .btn,
.tool-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.tool-card .btn[disabled] {
  background: var(--accent-light);
  color: var(--muted);
  cursor: not-allowed;
}

.info-card .text-link {
  margin-top: auto;
  align-self: flex-start;
}

.timeline div {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 1.2rem;
}

.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .about__content {
    grid-template-columns: 1fr;
  }
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.contact__grid a {
  color: var(--accent);
}

.status {
  font-size: 0.95rem;
  color: var(--muted);
}

.status.error {
  color: #b25555;
}

.is-hidden {
  display: none !important;
}

.site-footer {
  text-align: center;
  padding: 2rem 4vw 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--line);
  background: rgba(253, 248, 241, 0.9);
}

.footer__nav,
.footer__meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__nav a,
.footer__meta a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.footer__nav a:hover,
.footer__meta a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  main {
    padding: 6vw;
  }

  .section,
  .hero {
    padding: 1.8rem;
  }
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 5, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 20;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--paper);
  border-radius: 28px;
  border: 1px solid var(--line);
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 30px 60px rgba(15, 10, 5, 0.2);
}

.modal h2 {
  margin: 0.5rem 0 1rem;
  font-family: 'Playfair Display', serif;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(47, 38, 22, 0.25);
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 181, 116, 0.2);
}
