/* ===========================
   Kisetsu Ceramics - Shared Theme
   Premium Design System
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Crimson+Text:ital@0;1&family=Fredoka+One&family=Noto+Sans+JP:wght@300;400;700&family=Noto+Serif+JP:wght@400;700&display=swap');

:root {
  /* Light Theme */
  --bg-primary: #fef9f5;
  --bg-secondary: #faf6f2;
  --bg-tertiary: #f5f1ed;
  --text-primary: #2c2c2c;
  --text-secondary: #5a6b5a;
  --text-muted: #8a9a8a;
  --accent-warm: #c97d60;
  --accent-warm-dark: #b86a4f;
  --accent-cool: #7a9e7a;
  --accent-cool-dark: #6b8d6b;
  --border-color: #e8dcc8;
  --glass-bg: rgba(255, 248, 243, 0.7);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);

  /* Transitions */
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Typography */
  --font-display: 'Playfair Display', 'Noto Serif JP', serif;
  --font-accent: 'Fredoka One', sans-serif;
  --font-body: 'Crimson Text', 'Noto Sans JP', serif;
  --font-mono: 'Monaco', monospace;
}

/* Dark Theme */
html.dark-theme {
  --bg-primary: #1a1813;
  --bg-secondary: #242119;
  --bg-tertiary: #2d2926;
  --text-primary: #f5f1ed;
  --text-secondary: #d4cec8;
  --text-muted: #a8a29c;
  --accent-warm: #d9956d;
  --accent-warm-dark: #e8a87d;
  --accent-cool: #9fbd9a;
  --accent-cool-dark: #aacbaa;
  --border-color: #3d362c;
  --glass-bg: rgba(26, 24, 19, 0.7);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: 3.5rem; letter-spacing: -1px; }
h2 { font-size: 2.8rem; letter-spacing: -0.5px; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

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

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

/* Navigation & Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-warm);
  transition: width var(--transition-smooth);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Controls */
.controls {
  display: flex;
  gap: 1rem;
}

.control-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  font-size: 1.2rem;
}

.control-btn:hover {
  background: var(--accent-cool);
  color: var(--bg-primary);
  transform: scale(1.1);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-warm);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-warm-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-warm);
}

.btn-secondary:hover {
  background: var(--accent-warm);
  color: var(--bg-primary);
}

.btn-tertiary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-tertiary:hover {
  background: var(--accent-cool);
  color: var(--bg-primary);
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  width: 100%;
}

.bento-grid.asymmetric {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
}

.bento-grid.asymmetric .grid-item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}

.bento-grid.asymmetric .grid-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.grid-item-1x1 { grid-column: span 1; grid-row: span 1; }
.grid-item-2x1 { grid-column: span 2; grid-row: span 1; }
.grid-item-1x2 { grid-column: span 1; grid-row: span 2; }
.grid-item-2x2 { grid-column: span 2; grid-row: span 2; }

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all var(--transition-smooth);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-warm);
}

.card-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Glass Morphism Effect */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2rem;
}

html.dark-theme .glass {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 70px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--bg-primary);
  animation: fadeInUp 0.8s ease-out;
}

.hero-content h1 {
  color: var(--bg-primary);
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-content p {
  color: var(--bg-primary);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-content .btn {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Section Spacing */
section {
  padding: 80px 0;
  max-width: 1400px;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-spacing {
  padding: 80px 2rem;
}

/* Animation Stagger */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-item {
  animation: fadeInUp 0.6s ease-out backwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Footer */
footer {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 4rem 2rem 2rem;
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
}

footer h4 {
  color: var(--bg-primary);
  margin-bottom: 1.5rem;
}

footer a {
  color: var(--bg-primary);
}

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

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2.2rem; }

  .hero-content h1 {
    font-size: 3rem;
  }

  .bento-grid.asymmetric {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-item-2x1, .grid-item-2x2 {
    grid-column: span 1 !important;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.5rem; }

  .hero {
    min-height: 60vh;
    margin-top: 70px;
  }

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

  .hero-content p {
    font-size: 1.1rem;
  }

  nav {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .nav-brand {
    font-size: 1.2rem;
  }

  .bento-grid, .bento-grid.asymmetric {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .grid-item-1x2, .grid-item-2x1, .grid-item-2x2 {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .card {
    padding: 1.5rem;
  }

  section {
    padding: 60px 1rem;
  }

  footer {
    padding: 3rem 1rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .controls {
    gap: 0.5rem;
  }

  .control-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.pt-2 { padding-top: 2rem; }
.pb-2 { padding-bottom: 2rem; }

.opacity-75 { opacity: 0.75; }
.opacity-50 { opacity: 0.5; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  header, footer, .controls, .btn-secondary {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
