/* ============================================
   Traunsee Wohnung – Verkaufsseite
   Aesthetic: Alpine Luxury Editorial
   ============================================ */

@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&family=Libre+Franklin:wght@300;400;500;600&display=swap');

:root {
  /* Lake-inspired palette */
  --deep-lake: #1a3a4a;
  --lake-mid: #2c5f6e;
  --lake-light: #4a8a9a;
  --alpine-gold: #c8953e;
  --gold-soft: #dbb472;
  --gold-glow: #f0d9a8;
  --cream: #faf6f0;
  --warm-white: #fefcf8;
  --stone: #8a8578;
  --stone-light: #c4bfb4;
  --charcoal: #2a2824;
  --ink: #1a1916;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Libre Franklin', system-ui, sans-serif;

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 8rem);
  --content-max: 1200px;
  --content-narrow: 780px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--charcoal);
  background: var(--warm-white);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Utility ---- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.narrow { max-width: var(--content-narrow); margin: 0 auto; }

/* Section titles */
.section-overline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--alpine-gold);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--deep-lake);
  margin-bottom: 1.5rem;
}

.section-divider {
  width: 48px;
  height: 1px;
  background: var(--alpine-gold);
  margin: 2.5rem 0;
  border: none;
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* stagger children */
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.15s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.35s; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

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

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--warm-white);
  transition: color 0.4s;
  white-space: nowrap;
}

.nav.scrolled .nav-logo { color: var(--deep-lake); }

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

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
  position: relative;
}

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

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

.nav.scrolled .nav-links a { color: var(--charcoal); }
.nav.scrolled .nav-links a:hover { color: var(--deep-lake); }

/* Mobile menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--warm-white);
  transition: background 0.4s, transform 0.3s;
}

.nav.scrolled .nav-toggle span { background: var(--charcoal); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    flex-direction: column;
    background: var(--deep-lake);
    padding: 6rem 2.5rem 3rem;
    gap: 1.5rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links.open { right: 0; }
  .nav-links.open a { color: rgba(255,255,255,0.85); }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 99;
  }

  .nav-overlay.open {
    opacity: 1;
    pointer-events: all;
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 1000px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('media/Fotos/20210926_090826.jpg') center/cover no-repeat;
  transform: scale(1.05);
  transition: transform 8s ease-out;
}

.hero.loaded .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(26, 58, 74, 0.15) 0%,
      rgba(26, 58, 74, 0.05) 40%,
      rgba(26, 58, 74, 0.45) 75%,
      rgba(26, 58, 74, 0.8) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-glow);
  border: 1px solid rgba(240, 217, 168, 0.35);
  padding: 0.5em 1.4em;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s 0.5s forwards;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.08;
  color: var(--warm-white);
  max-width: 700px;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1.2s 0.7s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-glow);
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s 1s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll cue */
.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 1s 1.5s forwards;
}

.hero-scroll span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); }
}

/* ============================================
   ECKDATEN (Key Facts)
   ============================================ */
.facts {
  padding: var(--section-pad) 0;
  background: var(--cream);
  position: relative;
}

.facts::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stone-light), transparent);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--stone-light);
  border: 1px solid var(--stone-light);
}

.fact-card {
  background: var(--cream);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  transition: background 0.3s;
}

.fact-card:hover { background: var(--warm-white); }

.fact-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
  filter: grayscale(0.2);
}

.fact-value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 400;
  color: var(--deep-lake);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.fact-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ============================================
   BESCHREIBUNG
   ============================================ */
.description {
  padding: var(--section-pad) 0;
  background: var(--warm-white);
}

.description-body {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--charcoal);
  line-height: 1.85;
}

.description-body p + p { margin-top: 1.25rem; }

.description-lead {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 300;
  font-style: italic;
  color: var(--deep-lake);
  line-height: 1.5;
  border-left: 2px solid var(--alpine-gold);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

/* ============================================
   GALERIE
   ============================================ */
.gallery {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

/* First image spans 2 cols */
.gallery-grid .gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-grid .gallery-item:first-child { aspect-ratio: auto; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .gallery-grid .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16/9;
  }
}

/* ============================================
   VIDEOS
   ============================================ */
.videos {
  padding: var(--section-pad) 0;
  background: var(--warm-white);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.video-card {
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink);
}

.video-card video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #000;
}

/* ============================================
   PLÄNE & ENERGIEAUSWEIS
   ============================================ */
.documents {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--stone-light);
  background: var(--warm-white);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.doc-card:hover {
  border-color: var(--alpine-gold);
  box-shadow: 0 2px 12px rgba(200, 149, 62, 0.08);
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 2px;
  background: var(--deep-lake);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--gold-glow);
}

.doc-info { flex: 1; }

.doc-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--deep-lake);
  line-height: 1.3;
}

.doc-meta {
  font-size: 0.7rem;
  color: var(--stone);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.doc-arrow {
  color: var(--stone-light);
  transition: color 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.doc-card:hover .doc-arrow {
  color: var(--alpine-gold);
  transform: translateX(3px);
}

/* ============================================
   KONTAKT / FOOTER
   ============================================ */
.footer {
  padding: var(--section-pad) 0 3rem;
  background: var(--deep-lake);
  color: var(--warm-white);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--alpine-gold), var(--gold-soft), var(--alpine-gold));
}

.footer-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.footer .section-title { color: var(--warm-white); }

.footer-text {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.footer-price {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 400;
  color: var(--gold-glow);
  margin-bottom: 0.25rem;
}

.footer-price-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

.contact-input {
  width: 100%;
  padding: 0.8em 1em;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--warm-white);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.contact-input::placeholder { color: rgba(255,255,255,0.35); }

.contact-input:focus {
  border-color: var(--alpine-gold);
  background: rgba(255,255,255,0.12);
}

.contact-textarea { resize: vertical; min-height: 100px; }

.contact-status {
  font-size: 0.8rem;
  min-height: 1.2em;
  text-align: center;
}

.contact-status.success { color: #8edb8e; }
.contact-status.error { color: #e88; }

.contact-form .footer-contact-btn {
  margin-top: 0.25rem;
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
}

.contact-form .footer-contact-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.footer-contact-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--deep-lake);
  background: var(--gold-glow);
  padding: 1em 2.8em;
  transition: background 0.3s, transform 0.2s;
}

.footer-contact-btn:hover {
  background: var(--alpine-gold);
  transform: translateY(-1px);
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

/* ============================================
   GLIGHTBOX overrides
   ============================================ */
.glightbox-clean .gslide-title {
  font-family: var(--font-display) !important;
  font-size: 1.1rem !important;
  font-weight: 400 !important;
}

/* ============================================
   Noise texture overlay (subtle grain)
   ============================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}
