/* ============================================================
   cloudgarten.de — "Organisch & Immersiv" Design System
   
   Designphilosophie:
   Warm, erdig, fotografisch. Die Natur steht im Mittelpunkt.
   Weiche Formen, viel Weißraum (eigentlich: Cremeweiß-Raum),
   Typografie die atmet. Bilder dominieren, Text begleitet.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Nunito+Sans:ital,opsz,wght@0,6..12,300;0,6..12,400;0,6..12,500;1,6..12,300;1,6..12,400&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Warme Erdtöne */
  --bg-linen:      #faf6f1;       /* Leinenweiß — Haupthintergrund */
  --bg-cream:      #f5efe6;       /* Cremeton — Cards, Sektionen */
  --bg-sand:       #ebe3d5;       /* Sand — Hover, aktive Elemente */
  --bg-earth:      #d4c5b0;       /* Erde — Borders, dezente Linien */
  
  /* Grüntöne — vom tiefen Wald bis zum frischen Blatt */
  --green-deep:    #1a3c28;       /* Tiefer Wald — Überschriften, Navigation */
  --green-forest:  #2d5f3f;       /* Waldgrün — Links, Akzente */
  --green-moss:    #5a8a6a;       /* Moos — Secondary */
  --green-leaf:    #7db88c;       /* Frisches Blatt — Hover */
  --green-spring:  #a8d5b8;       /* Frühling — sehr dezente Akzente */
  
  /* Warme Akzente */
  --gold-warm:     #c4a265;       /* Warmes Gold — Zitate, besondere Elemente */
  --gold-light:    #e8d5a8;       /* Helles Gold — Hintergründe */
  --terracotta:    #c17a56;       /* Terrakotta — Call-to-Action */
  
  /* Text */
  --text-dark:     #2c2417;       /* Dunkelbraun — Haupttext */
  --text-body:     #4a3f32;       /* Mittelbraun — Fließtext */
  --text-muted:    #8a7e6e;       /* Gedämpft — Datumsangaben, Meta */
  --text-light:    #c4b9a8;       /* Hell — auf dunklem Hintergrund */
  
  /* Layout */
  --content-width: 900px;
  --spacing:       8px;
  
  /* Übergang */
  --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
  --transition:    0.3s var(--ease-out);
}

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

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

body {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-body);
  background-color: var(--bg-linen);
  overflow-x: hidden;
}

/* --- Typografie --- */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--green-deep);
  font-weight: 400;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 400;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
}

p {
  margin-bottom: calc(var(--spacing) * 2.5);
}

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

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

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: calc(var(--spacing) * 2.5) calc(var(--spacing) * 4);
  transition: background 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}

.site-nav.scrolled {
  background: rgba(250, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--green-deep);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.site-logo:hover {
  color: var(--green-forest);
}

.nav-links {
  display: flex;
  gap: calc(var(--spacing) * 4);
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--green-deep);
}

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

/* Hamburger Menu (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-deep);
  margin: 5px 0;
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--spacing) * 12) calc(var(--spacing) * 4);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(168, 213, 184, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(196, 162, 101, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  color: var(--green-deep);
  margin-bottom: calc(var(--spacing) * 3);
  line-height: 1.15;
}

.hero-title em {
  font-style: italic;
  color: var(--green-forest);
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: calc(var(--spacing) * 5);
  line-height: 1.6;
}

.hero-divider {
  width: 40px;
  height: 1px;
  background: var(--green-moss);
  margin: 0 auto calc(var(--spacing) * 4);
}

.hero-nav-cards {
  display: flex;
  gap: calc(var(--spacing) * 3);
  margin-top: calc(var(--spacing) * 4);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--bg-earth);
  padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);
  text-decoration: none;
  transition: all 0.4s var(--ease-out);
  min-width: 180px;
}

.hero-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-color: var(--green-spring);
}

.hero-card-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: var(--spacing);
}

.hero-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--green-deep);
}

.hero-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Bildergarten (immersive horizontal gallery) --- */
.gallery-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--green-deep);
  cursor: grab;
}

.gallery-container:active {
  cursor: grabbing;
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.1s linear;
  will-change: transform;
}

.gallery-panel {
  min-width: 100vw;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s linear;
}

.gallery-panel:hover img {
  transform: scale(1.03);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 5);
  background: linear-gradient(transparent, rgba(26, 60, 40, 0.85));
  color: white;
}

.gallery-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  max-width: 600px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.gallery-caption {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: calc(var(--spacing) * 1.5);
  letter-spacing: 0.05em;
}

/* Gallery Navigation */
.gallery-nav {
  position: absolute;
  bottom: calc(var(--spacing) * 3);
  right: calc(var(--spacing) * 4);
  display: flex;
  gap: var(--spacing);
  z-index: 10;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.gallery-dot.active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.3);
}

.gallery-scroll-hint {
  position: absolute;
  bottom: calc(var(--spacing) * 3);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fadeInOut 3s ease infinite;
  z-index: 10;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Audio Control */
.audio-toggle {
  position: fixed;
  bottom: calc(var(--spacing) * 3);
  left: calc(var(--spacing) * 3);
  z-index: 150;
  background: rgba(26, 60, 40, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.audio-toggle:hover {
  background: rgba(26, 60, 40, 0.9);
  transform: scale(1.05);
}

.audio-toggle.muted {
  opacity: 0.5;
}

/* --- Interaktiver Garten (Canvas) --- */
.garten-page {
  background: var(--green-deep);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.garten-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
}

.garten-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Garten UI Overlay */
.garten-ui {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 440px;
  z-index: 50;
}

.garten-input-wrap {
  display: flex;
  gap: var(--spacing);
  background: rgba(26, 60, 40, 0.75);
  backdrop-filter: blur(12px);
  padding: calc(var(--spacing) * 1.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
}

.garten-input-wrap input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
  outline: none;
}

.garten-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
}

.garten-input-wrap button {
  background: var(--green-forest);
  border: none;
  color: white;
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2.5);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 500;
  transition: background var(--transition);
  white-space: nowrap;
}

.garten-input-wrap button:hover {
  background: var(--green-moss);
}

.garten-status {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: calc(var(--spacing) * 1.5);
  min-height: 1.5em;
}

.garten-hud {
  position: fixed;
  top: calc(var(--spacing) * 10);
  left: calc(var(--spacing) * 3);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  z-index: 50;
  line-height: 1.8;
}

.garten-hud .hud-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* --- Chronik / Gartenbuch --- */
.chronik-page {
  min-height: 100vh;
  padding: calc(var(--spacing) * 14) calc(var(--spacing) * 3) calc(var(--spacing) * 8);
}

.chronik-inner {
  max-width: 600px;
  margin: 0 auto;
}

.chronik-header {
  text-align: center;
  margin-bottom: calc(var(--spacing) * 6);
}

.chronik-header p {
  color: var(--text-muted);
  font-style: italic;
  margin-top: calc(var(--spacing) * 1.5);
}

.chronik-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: calc(var(--spacing) * 8) 0;
  border: 1px dashed var(--bg-earth);
}

.chronik-entry {
  padding: calc(var(--spacing) * 3);
  border-left: 2px solid var(--green-spring);
  margin-bottom: calc(var(--spacing) * 3);
  background: var(--bg-cream);
  transition: all var(--transition);
}

.chronik-entry:hover {
  border-left-color: var(--green-forest);
  background: var(--bg-sand);
}

.chronik-thought {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--green-deep);
  margin-bottom: var(--spacing);
  line-height: 1.5;
}

.chronik-reaction {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chronik-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: var(--spacing);
}

.chronik-actions {
  text-align: center;
  margin-top: calc(var(--spacing) * 5);
}

.btn-subtle {
  background: none;
  border: 1px solid var(--bg-earth);
  color: var(--text-muted);
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 3);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-subtle:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 3);
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--bg-earth);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--green-forest);
}

/* --- Responsive --- */
@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 246, 241, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing) * 5);
    z-index: 99;
  }

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

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: block;
    z-index: 101;
  }

  .hero-nav-cards {
    flex-direction: column;
    align-items: center;
  }

  .hero-card {
    width: 100%;
    max-width: 280px;
  }

  .gallery-quote {
    font-size: 1.1rem;
  }
}

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

/* Sanfte Einblendung */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@import url('./wochen-chronik.css');
