/* ═══════════════════════════════════════════════════════
   FENG SHUI GUIDE — DESIGN SYSTEM
   Tema serale, rilassante, premium
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&family=Noto+Serif+JP:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  /* Colors — warm evening palette */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(25, 22, 18, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dim: #8b7332;
  --sage: #7a8b6f;
  --sage-light: #a3b596;
  --terracotta: #c27a5a;
  --terracotta-light: #d9a088;
  --dusty-rose: #b8868a;
  --cream: #f0e6d3;
  --cream-dim: #d4c8b3;
  --text-primary: #e8e0d4;
  --text-secondary: #a09888;
  --text-dim: #6b6058;
  --text-accent: var(--gold-light);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;
  
  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Noto Serif JP', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-accent: 'Noto Serif JP', serif;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  
  /* Borders */
  --border-subtle: 1px solid rgba(201, 168, 76, 0.12);
  --border-glass: 1px solid rgba(255, 255, 255, 0.06);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  font-weight: 300;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--cream);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ── Reading Progress Bar ── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-light));
  z-index: 10000;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: var(--border-subtle);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-out);
}

.nav.visible {
  transform: translateY(0);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-logo span {
  font-weight: 300;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: normal;
}

.nav-links {
  display: flex;
  gap: 0.3rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s var(--ease-out);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 10001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--gold);
  transition: all 0.3s var(--ease-out);
  border-radius: 2px;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero Section ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.8);
  transform: scale(1.05);
  transition: transform 8s var(--ease-out);
}

.hero:hover .hero-bg img {
  transform: scale(1.0);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.1) 40%,
    rgba(10, 10, 10, 0.6) 80%,
    rgba(10, 10, 10, 1) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-subtitle-top {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--ease-out) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1.2s var(--ease-out) 0.5s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
  font-weight: 400;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.9;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--ease-out) 0.8s forwards;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-decoration: none;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 1.2s forwards;
  transition: color 0.3s;
}

.hero-scroll:hover {
  color: var(--gold);
}

.hero-scroll-line {
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--gold);
  animation: scrollLine 2s var(--ease-in-out) infinite;
}

/* ── Section Layout ── */
.section {
  padding: var(--space-xl) 0;
  position: relative;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

/* ── Section Headers ── */
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gold-dim);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--cream);
  margin-bottom: 1rem;
}

.section-title em {
  font-style: italic;
  color: var(--gold-light);
}

.section-intro {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: var(--space-lg);
  max-width: 750px;
}

/* ── Full Width Image ── */
.section-image {
  width: 100%;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.section-image img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-out), filter 0.8s var(--ease-out);
  filter: brightness(0.85) saturate(0.9);
}

.section-image:hover img {
  transform: scale(1.03);
  filter: brightness(0.95) saturate(1);
}

.section-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  pointer-events: none;
}

.section-image-caption {
  position: absolute;
  bottom: 20px;
  left: 25px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gold-dim);
  z-index: 1;
}

/* ── Typography ── */
.content h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--cream);
  margin: var(--space-lg) 0 var(--space-sm);
  padding-left: 1rem;
  border-left: 2px solid var(--gold-dim);
}

.content p {
  font-size: 1.02rem;
  line-height: 2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.content strong {
  color: var(--gold-light);
  font-weight: 500;
}

.content em {
  color: var(--sage-light);
  font-style: italic;
}

/* ── Glass Cards ── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  transition: all 0.4s var(--ease-out);
}

.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(201, 168, 76, 0.15);
  transform: translateY(-2px);
}

.glass-card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
}

.glass-card-text {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

/* ── Tip/Warning Boxes ── */
.tip-box {
  background: linear-gradient(135deg, rgba(122, 139, 111, 0.1), rgba(122, 139, 111, 0.03));
  border-left: 3px solid var(--sage);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
}

.tip-box-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--sage-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tip-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.warning-box {
  background: linear-gradient(135deg, rgba(194, 122, 90, 0.1), rgba(194, 122, 90, 0.03));
  border-left: 3px solid var(--terracotta);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
}

.warning-box-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--terracotta-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

/* ── Tables ── */
.table-wrapper {
  margin: var(--space-md) 0;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: var(--border-glass);
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.styled-table thead {
  background: rgba(201, 168, 76, 0.08);
}

.styled-table th {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--gold-light);
  padding: 1rem 1.3rem;
  text-align: left;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-bottom: var(--border-subtle);
}

.styled-table td {
  padding: 1rem 1.3rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-bottom: var(--border-glass);
  vertical-align: top;
}

.styled-table tbody tr {
  transition: background 0.3s;
}

.styled-table tbody tr:hover {
  background: rgba(201, 168, 76, 0.04);
}

.styled-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Expandable Sections ── */
.expandable {
  margin: 1.5rem 0;
  border: var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.expandable-header {
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: var(--bg-glass);
  transition: all 0.3s var(--ease-out);
  user-select: none;
}

.expandable-header:hover {
  background: var(--bg-glass-hover);
}

.expandable-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--cream);
}

.expandable-icon {
  font-size: 1.2rem;
  color: var(--gold);
  transition: transform 0.4s var(--ease-out);
}

.expandable.open .expandable-icon {
  transform: rotate(180deg);
}

.expandable-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease-out), padding 0.6s var(--ease-out);
  padding: 0 1.5rem;
}

.expandable.open .expandable-body {
  max-height: 2000px;
  padding: 1.2rem 1.5rem;
}

/* ── Decorative Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: var(--space-lg) 0;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.divider-symbol {
  font-size: 1.2rem;
  color: var(--gold-dim);
}

/* ── Elements Grid ── */
.elements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin: var(--space-md) 0;
}

.element-card {
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  cursor: default;
}

.element-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-dim);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.element-icon {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
  display: block;
}

.element-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.element-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Scroll Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.9s var(--ease-out);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.9s var(--ease-out);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── Quote Block ── */
.quote-block {
  padding: var(--space-md) var(--space-lg);
  position: relative;
  margin: var(--space-lg) 0;
}

.quote-block::before {
  content: '"';
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--gold-dim);
  position: absolute;
  top: -1rem;
  left: 1rem;
  line-height: 1;
  opacity: 0.4;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--cream-dim);
  line-height: 1.6;
}

.quote-author {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Footer ── */
.footer {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  border-top: var(--border-subtle);
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: var(--space-md);
  opacity: 0.5;
}

/* ── Yin-Yang separator ── */
.yinyang-sep {
  text-align: center;
  padding: var(--space-lg) 0;
  font-size: 2rem;
  color: var(--gold-dim);
  opacity: 0.4;
}

/* ── Ambient glow effects ── */
.ambient-glow {
  position: relative;
}

.ambient-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.03), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ── Keyframe Animations ── */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollLine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ── Stagger ── */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s var(--ease-out);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }

/* ── Room Color Palette ── */
.color-palette {
  display: flex;
  gap: 0.6rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  position: relative;
  cursor: default;
  transition: transform 0.3s var(--ease-out);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}

.color-swatch:hover .color-swatch-label {
  opacity: 1;
}

/* ── List styles ── */
.content ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.content ul li {
  padding: 0.6rem 0 0.6rem 1.8rem;
  position: relative;
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.content ul li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--gold-dim);
  font-size: 0.5rem;
  top: 0.95rem;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  html { font-size: 15px; }
  
  .nav-links { display: none; }
  .hamburger { display: flex; }
  
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(30px);
    padding: 5rem 2rem 2rem;
    gap: 0.5rem;
    z-index: 10000;
    animation: fadeUp 0.3s var(--ease-out);
  }
  
  .nav-links.open a {
    font-size: 1rem;
    padding: 0.8rem 1rem;
    text-align: center;
  }
  
  .section-image img {
    height: 280px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section {
    padding: var(--space-lg) 0;
  }
  
  .section-inner, .section-wide {
    padding: 0 1.2rem;
  }
  
  .elements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quote-block {
    padding: var(--space-sm) var(--space-md);
  }
  
  .quote-text {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .elements-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}
