/* ===========================
   Tokyo Art Gallery - Dark Theme
   =========================== */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-card-hover: #1f1f1f;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;
  --accent: #c9a84c;
  --accent-hover: #d4b65e;
  --accent-dim: rgba(201, 168, 76, 0.15);
  --text-body: #e8e4de;
  --text-heading: #ffffff;
  --text-muted: #888;
  --text-dim: #666;
  --sold-out-bg: rgba(180, 40, 40, 0.85);
  --overlay: rgba(0, 0, 0, 0.6);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.2;
}

/* --- Layout --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ff6ec7;
  letter-spacing: 0.04em;
}

.logo span {
  color: #ff6ec7;
}

/* --- Navigation --- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 4px;
  transition: all var(--transition);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--text-heading);
  background: var(--accent-dim);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-heading);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/akihabara.jpg') center center / cover no-repeat;
  opacity: 0.12;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Main Layout (sidebar + gallery) --- */
.main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 40px 0;
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-section ul {
  list-style: none;
}

.sidebar-section li {
  margin-bottom: 2px;
}

.sidebar-section a {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all var(--transition);
}

.sidebar-section a:hover,
.sidebar-section a.active {
  color: var(--text-heading);
  background: var(--accent-dim);
}

/* --- Artwork Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* --- Artwork Card --- */
a.artwork-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.artwork-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.artwork-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.1);
  background: var(--bg-card-hover);
}

.artwork-card .image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #111;
}

.artwork-card .image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.artwork-card:hover .image-wrapper img {
  transform: scale(1.05);
}

.sold-out-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--sold-out-bg);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 3px;
  z-index: 2;
}

.artwork-info {
  padding: 16px;
}

.artwork-info .artist-name {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
}

.artwork-info .artwork-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--text-heading);
  margin-bottom: 8px;
  font-weight: 600;
}

.artwork-info .artwork-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.artwork-info .artwork-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
}

.artwork-info .artwork-price.sold {
  color: var(--text-dim);
  text-decoration: line-through;
}

/* --- Page Content (FAQ, About, etc.) --- */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.page-content h1 {
  font-size: 2.4rem;
  margin-bottom: 40px;
  text-align: center;
}

.page-content h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 16px auto 0;
}

.page-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.page-content a {
  border-bottom: 1px solid var(--accent-dim);
}

.page-content a:hover {
  border-bottom-color: var(--accent);
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  background: var(--bg-card);
  border: none;
  color: var(--text-heading);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  padding: 20px 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-body);
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

/* --- About / Info Sections --- */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.info-card h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.footer-copy {
  color: var(--text-dim);
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text-heading);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }

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

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }

  .sidebar-section {
    margin-bottom: 0;
    min-width: 180px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 48px 16px 36px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 16px;
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .artwork-info {
    padding: 12px;
  }

  .artwork-info .artwork-title {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .header-inner {
    padding: 12px 16px;
  }

  .logo {
    font-size: 1.3rem;
  }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
