:root {
  --bg: #f8f7f4;
  --bg-alt: #f0ede8;
  --text: #1a1a1a;
  --text-body: #3a3a3a;
  --text-light: #555555;
  --accent: #8b2f3a;
  --accent-light: #c46a75;
  --border: #e0ddd8;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-w: 1100px;
  --header-h: 80px;
}

body.dark {
  --bg: #1a1a2e;
  --bg-alt: #16213e;
  --text: #e0e0e0;
  --text-body: #c8c8c8;
  --text-light: #999999;
  --accent: #c46a75;
  --accent-light: #e8a0aa;
  --border: #2a2a4a;
}

body.dark input,
body.dark textarea,
body.dark select {
  background: #fff;
  color: #1a1a1a;
  border-color: #555;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-light); }

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

/* ─── HEADER ─── */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--accent);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 24px;
}

.logo { display: flex; align-items: center; gap: 14px; color: var(--accent); flex-shrink: 0; }
.logo:hover { color: var(--accent-light); }
.logo-img { width: 52px; height: auto; flex-shrink: 0; }
.logo-text { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: #fff; }
.logo-text:hover { color: #f3d5d9; }
.logo-text small { font-family: var(--font-sans); font-size: .7rem; font-weight: 400; color: rgba(255,255,255,.7); display: block; line-height: 1; }

nav { display: flex; align-items: center; gap: 2px; }
nav a {
  display: block; padding: 8px 16px;
  font-size: .88rem; font-weight: 500; color: rgba(255,255,255,.85);
  border-radius: 8px; transition: all .2s;
  white-space: nowrap;
}
nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
nav a.active { background: #fff; color: var(--accent); }
nav a.active:hover { background: #f3d5d9; }

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: #fff; padding: 6px 8px; border-radius: 6px; }
.nav-toggle:hover { background: rgba(255,255,255,.15); }

/* Theme toggle */
.theme-toggle { background: none; border: none; font-size: 1.3rem; cursor: pointer; padding: 6px 10px; border-radius: 50%; transition: all .2s; }
.theme-toggle:hover { background: rgba(255,255,255,.15); transform: scale(1.1); }

/* ─── MAIN ─── */
main { min-height: calc(100vh - var(--header-h) - 160px); }

.page { max-width: var(--max-w); margin: 0 auto; padding: 100px 24px 80px; }

.page-title {
  font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700;
  margin-bottom: 8px; letter-spacing: -.02em;
}

.page-subtitle {
  font-size: 1rem; color: var(--text-light);
  margin-bottom: 48px; padding-bottom: 24px;
  border-bottom: 2px solid var(--accent);
}

/* ─── HERO (index) ─── */
.hero {
  display: flex; align-items: center; gap: 60px;
  padding: 100px 24px 80px;
  max-width: var(--max-w); margin: 0 auto;
}

.hero-text { flex: 1; }
.hero-text h1 {
  font-family: var(--font-serif); font-size: 3rem; font-weight: 700;
  line-height: 1.2; margin-bottom: 8px;
}
.hero-text .subhead {
  font-size: 1.15rem; color: var(--accent); font-weight: 500;
  margin-bottom: 24px;
}
.hero-text p { font-size: 1.05rem; color: var(--text-body); line-height: 1.8; margin-bottom: 16px; }
.hero-text .meta { font-size: .85rem; color: var(--text-light); margin-top: 24px; }

.hero-visual { flex: 0 0 340px; }
.hero-visual img { border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.08); width: 100%; }

/* ─── CARDS GRID ─── */
.grid { display: grid; gap: 32px; }

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.card {
  background: var(--bg-alt); border-radius: 12px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.card-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; }
.card-body { padding: 20px; }
.card-body h3 { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 4px; }
.card-body .card-meta { font-size: .82rem; color: var(--accent); font-weight: 500; margin-bottom: 8px; }
.card-body p { font-size: .92rem; color: var(--text-body); line-height: 1.6; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: .72rem; padding: 2px 10px; border-radius: 20px; background: var(--border); color: var(--text-light); }

.card-price { font-size: 1.05rem; font-weight: 700; color: var(--accent); margin-top: 8px; }
.card-footer { padding: 0 20px 20px; }
.card-footer .btn-buy { display: block; width: 100%; padding: 10px; font-size: .85rem; background: var(--accent); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; transition: background .2s; }
.card-footer .btn-buy:hover { background: var(--accent-light); }
.card-footer .btn-buy.added { background: #2d7d46; }

/* ─── CART ─── */
.cart-bar {
  position: fixed; bottom: 24px; right: 24px; z-index: 150;
  background: var(--accent); color: #fff; border: none;
  padding: 14px 20px; border-radius: 50px; cursor: pointer;
  font-weight: 600; font-size: .9rem;
  box-shadow: 0 4px 16px rgba(139,47,58,.3);
  transition: transform .2s; display: none;
  font-family: var(--font-sans);
}
.cart-bar:hover { transform: scale(1.05); }
.cart-bar.show { display: flex; align-items: center; gap: 8px; }
.cart-count { background: #fff; color: var(--accent); border-radius: 20px; padding: 0 8px; font-size: .78rem; line-height: 1.6; font-weight: 700; }

.cart-modal {
  display: none; position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,.4); align-items: center; justify-content: center;
}
.cart-modal.open { display: flex; }
.cart-panel {
  background: var(--bg-alt); border-radius: 16px; padding: 32px;
  max-width: 520px; width: 90%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
  color: var(--text);
}
.cart-panel h2 { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 16px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); cursor: pointer; font-size: 1rem; }
.cart-item-qty span { min-width: 20px; text-align: center; font-weight: 600; }
.cart-total { text-align: right; font-size: 1.1rem; font-weight: 700; margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--accent); }
.cart-empty { color: var(--text-light); text-align: center; padding: 24px 0; }

.cart-close { float: right; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); }

/* ─── TIMELINE ─── */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-dot {
  position: absolute; left: -33px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.timeline-year {
  font-size: .8rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 2px;
}
.timeline-item h3 { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 4px; }
.timeline-item p { font-size: .92rem; color: var(--text-body); }

/* ─── PRESENTATION ─── */
.presentation {
  max-width: 720px; margin: 0 auto 48px;
  text-align: center;
}
.presentation h2 { font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 12px; }
.presentation p { color: var(--text-body); line-height: 1.8; }

/* ─── SECTIONS ─── */
.section { margin-bottom: 64px; }
.section-title {
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700;
  margin-bottom: 24px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.subsection-title {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600;
  margin-top: 32px; margin-bottom: 8px; color: var(--accent);
}

/* ─── QUOTE ─── */
blockquote {
  border-left: 3px solid var(--accent); padding: 16px 24px;
  background: var(--bg-alt); border-radius: 0 8px 8px 0;
  font-family: var(--font-serif); font-style: italic;
  color: var(--text-body); line-height: 1.8;
  margin: 24px 0;
}
blockquote cite { display: block; margin-top: 8px; font-style: normal; font-family: var(--font-sans); font-size: .85rem; color: var(--accent); }

/* ─── CONTACT FORM ─── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.form-group input,
.form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-family: var(--font-sans); font-size: .95rem;
  background: var(--bg); transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }

.btn {
  display: inline-block; padding: 10px 28px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; font-family: var(--font-sans); font-size: .9rem;
  font-weight: 600; cursor: pointer; transition: background .2s;
}
.btn:hover { background: var(--accent-light); }

/* ─── GUESTBOOK ─── */
.guestbook-entry {
  padding: 20px; background: var(--bg-alt); border-radius: 8px; margin-bottom: 12px;
}
.guestbook-entry .name { font-weight: 600; font-size: .92rem; }
.guestbook-entry .date { font-size: .78rem; color: var(--text-light); margin-left: 8px; }
.guestbook-entry .msg { margin-top: 6px; color: var(--text-light); line-height: 1.6; }

/* ─── AUDIO/VIDEO ─── */
.media-item { display: flex; gap: 24px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--border); }
.media-item:last-child { border-bottom: none; }
.media-info { flex: 1; }
.media-info h3 { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 4px; }
.media-info p { font-size: .88rem; color: var(--text-body); }
.media-player { flex: 0 0 300px; }
.media-player audio { width: 100%; }
.media-player iframe { width: 100%; border-radius: 8px; }


/* ─── GALLERY ─── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.gallery-item { overflow: hidden; border-radius: 8px; cursor: pointer; }
.gallery-item img { width: 100%; height: 250px; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item .caption { padding: 8px 0; font-size: .82rem; color: var(--text-light); text-align: center; }

/* ─── LIGHTBOX ─── */
.lightbox { display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.85); align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 4px; }
.lightbox-close { position: absolute; top: 20px; right: 28px; color: #fff; font-size: 2rem; cursor: pointer; }

/* ─── BLOG ─── */
.blog-grid { display: grid; gap: 32px; }
.blog-post {
  background: var(--bg-alt); border-radius: 12px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.blog-post:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.blog-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-body { padding: 24px; }
.blog-body .blog-date { font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.blog-body h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 8px; line-height: 1.4; }
.blog-body .blog-summary { font-size: .92rem; color: var(--text-body); line-height: 1.7; margin-bottom: 12px; }
.blog-body .blog-source { font-size: .78rem; color: var(--text-light); font-style: italic; }
.blog-tag { display: inline-block; font-size: .7rem; padding: 2px 10px; border-radius: 20px; background: var(--accent); color: #fff; margin-right: 4px; font-weight: 500; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border); padding: 32px 24px;
  text-align: center; font-size: .82rem; color: var(--text-light);
}
footer a { color: var(--accent); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hero { flex-direction: column; gap: 32px; padding: 40px 20px 60px; text-align: center; }
  .hero-text h1 { font-size: 2rem; }
  .hero-visual { flex: 0 0 240px; }
  .hero-visual img { margin: 0 auto; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .media-item { flex-direction: column; }
  .media-player { flex: none; width: 100%; }

  .page-title { font-size: 1.8rem; }

  nav { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--accent); border-bottom: 1px solid rgba(255,255,255,.15); padding: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
  nav.open { display: flex; }
  .nav-toggle { display: block; }
  nav a { padding: 10px 16px; font-size: .95rem; color: rgba(255,255,255,.85); }
}
