/* ==========================================================================
   Ascetic Design System - Suiō-ryū Iai Kenpō Shibu Polska
   ========================================================================== */

/* Google Fonts are now loaded in HTML head for performance */

/* CSS Variables */
:root {
  /* Palette: Ascetic Dark Mode (Shades of Grey) */
  --color-bg: #121212;
  --color-text: #e0e0e0;
  --color-text-light: #a0a0a0;
  --color-border: #333333;
  --color-accent: #ffffff;
  --color-white: #000000;

  /* Typography */
  --font-serif: 'Noto Serif', serif;
  --font-sans: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Layout */
  --max-width: 900px;
}

/* Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-y: scroll; /* Prevents layout shift caused by the scrollbar appearing/disappearing */
  scroll-behavior: smooth;
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: var(--space-sm);
  max-width: 65ch;
  color: var(--color-text-light);
  font-weight: 300;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

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

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--color-accent);
  color: var(--color-bg);
  border: 1px solid var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
}

.btn:hover {
  background-color: transparent;
  color: var(--color-accent);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}

/* Layout Classes */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-lg) 0;
}

/* Header & Navigation */
.site-header {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(18, 18, 18, 0.95); /* Slight transparency looks great on sticky headers */
  backdrop-filter: blur(5px); /* Adds a premium glass effect when scrolling over content */
  view-transition-name: site-header;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  color: var(--color-accent);
}

.site-title:hover {
  border: none;
  opacity: 0.7;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  position: relative;
  transition: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
  padding: var(--space-xl) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero p.subtitle {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin-top: -1rem;
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
}

.kamon {
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-md);
  object-fit: contain;
}

/* Watermark Background */
.watermark-bg {
  position: relative;
  z-index: 1;
}

.watermark-bg::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  max-width: 500px;
  height: 100vh;
  background-image: url('images/site/kikusui_gold.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
}

/* Two Column Layout */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .grid-2-1 {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Schedule Table */
.schedule {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-md);
}

.schedule th, .schedule td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.schedule th {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--color-accent);
}

/* Call to Action */
.cta-box {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  text-align: center;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-sm);
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--color-border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: grayscale(80%) contrast(1.1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
  view-transition-name: site-footer;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.footer-links a {
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
  transform: translateY(-2px);
}

.footer-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
