/* =========================================
   FLOHMARKT LEGENDS - DESIGN SYSTEM
   Peaky Blinders (Dark Vintage) x Comic Art
   ========================================= */

:root {
  /* Colors */
  --bg-color: #121212;
  --bg-color-elevated: #1a1a1a;
  --accent-gold: #c6a96b;
  --accent-gold-hover: #deb86d;
  --accent-beige: #f5e6c8;
  --accent-red: #8b2c2c;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  
  /* Comic Graphic Tokens */
  --comic-border-color: #000000;
  --comic-border-width: 3px;
  --comic-border-radius: 4px; /* Slightly sharp but rounded */
  --comic-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
  --comic-shadow-hover: 6px 6px 0px rgba(198, 169, 107, 0.4);
  
  /* Typography */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Layout */
  --container-width: 1200px;
  --container-width-large: 1400px;
  --section-padding: 80px 0;
  --section-padding-large: 120px 0;
  --gap-md: 2rem;
  --gap-lg: 3rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Header height offset */
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden; /* Prevent horizontal scroll from textures */
  position: relative;
}

/* Textures / Overlays */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.halftone-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
  /* Simple CSS halftone pattern */
  background: radial-gradient(circle, var(--text-primary) 10%, transparent 11%), 
              radial-gradient(circle, var(--text-primary) 10%, transparent 11%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent-beige);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3vw, 3rem); margin-bottom: 2rem; position: relative; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Layout Utilities */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.container-large {
  max-width: var(--container-width-large);
}

.section-padding { padding: var(--section-padding); }
.section-padding-large { padding: var(--section-padding-large); }
.text-center { text-align: center; }

.grid {
  display: grid;
  gap: var(--gap-md);
}

.grid-3 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Comic / Vintage Style Utilities */
.comic-card {
  background-color: var(--bg-color-elevated);
  border: var(--comic-border-width) solid var(--comic-border-color);
  border-radius: var(--comic-border-radius);
  box-shadow: var(--comic-shadow);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  /* Graphic outline trick for images inside */
}

.comic-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 1px solid rgba(255,255,255,0.05); /* subtle inner highlight */
  pointer-events: none;
  border-radius: var(--comic-border-radius);
}

.comic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--comic-shadow-hover);
  border-color: var(--accent-gold);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 0;
  transition: all var(--transition-fast);
  text-align: center;
  border: var(--comic-border-width) solid var(--comic-border-color);
  box-shadow: 3px 3px 0px rgba(0,0,0,1);
  position: relative;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,1);
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  color: #000;
  box-shadow: 3px 3px 10px rgba(198, 169, 107, 0.4);
}

.btn-secondary {
  background-color: var(--accent-red);
  color: #fff;
}

.btn-secondary:hover {
  background-color: #a13535;
  color: #fff;
  box-shadow: 3px 3px 10px rgba(139, 44, 44, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 3px 3px 0px var(--accent-gold);
}

.btn-outline:hover {
  background-color: rgba(198, 169, 107, 0.1);
  box-shadow: 1px 1px 0px var(--accent-gold);
  transform: translate(2px, 2px);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 2px solid var(--comic-border-color);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--accent-beige);
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0px var(--accent-red);
}

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

.nav-links a {
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.nav-links a:hover {
  color: var(--accent-gold);
  text-shadow: 0 0 8px rgba(198, 169, 107, 0.5);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: var(--accent-beige);
  transition: 0.3s;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .header-actions .btn { display: none; }
  .menu-toggle { display: flex; }
}

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

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('./images/hero_bg.png'); /* To be generated */
  background-size: cover;
  background-position: center;
  filter: grayscale(40%) sepia(30%) contrast(120%);
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(18,18,18,0.3) 0%, rgba(18,18,18,0.9) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 900px;
  padding: 2rem;
  /* Comic style title backdrop */
  position: relative;
}

.hero-headline {
  margin-bottom: 1rem;
  text-shadow: 3px 3px 0px rgba(0,0,0,1), 5px 5px 15px rgba(0,0,0,0.8);
  /* Slight stroke effect */
  -webkit-text-stroke: 1px rgba(0,0,0,0.5);
}

.hero-subheadline {
  font-size: 1.25rem;
  color: var(--accent-beige);
  margin-bottom: 2.5rem;
  font-weight: 500;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* General component stubs, will finish in next steps or if small enough here */
/* Remaining styles omitted for brevity will be injected next if needed, but I'll add critical ones now */

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--accent-red);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-header-flex .section-title::after { margin: 1rem 0 0; }

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Filters */
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--text-secondary);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

/* Masonry Fallback & Variables */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

/* Listings Cards */
.listing-card {
  display: flex;
  flex-direction: column;
}

.listing-img-wrapper {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-bottom: 2px solid var(--comic-border-color);
}

.listing-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: contrast(110%);
}

.listing-card:hover .listing-img-wrapper img {
  transform: scale(1.05);
}

.listing-info {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.listing-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.listing-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  font-weight: 700;
}

.listing-card .btn {
  margin-top: auto;
  width: 100%;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 8px;
  text-transform: uppercase;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  transform: rotate(3deg);
  z-index: 2;
}

.badge-new { background: var(--accent-gold); color: #000; transform: rotate(-2deg); }
.badge-fast { background: var(--accent-red); transform: rotate(3deg); }

/* Team & Highlights */
.team-img-wrapper, .highlight-img-wrapper {
  width: 100%;
  border-bottom: var(--comic-border-width) solid var(--comic-border-color);
  background-color: #000;
  overflow: hidden;
  position: relative;
}

/* Comic Halftone Dot Overlay (High-Res Newsprint) */
.team-img-wrapper::after, .highlight-img-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Dichtes Raster für hohen Newsprint-Look */
  background: radial-gradient(circle at center, #000000 35%, transparent 40%);
  background-size: 3px 3px;
  background-position: 0 0;
  mix-blend-mode: multiply;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.team-img-wrapper img, .highlight-img-wrapper img {
  width: 100%;
  display: block;
  /* Scharfer Zeitungs-Kontrast mit Sepia */
  filter: sepia(100%) hue-rotate(-5deg) saturate(160%) contrast(140%) brightness(0.9);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.team-card:hover .team-img-wrapper::after, .highlight-card:hover .highlight-img-wrapper::after {
  opacity: 0; /* Dots verschwinden beim Hover */
}

.team-card:hover .team-img-wrapper img, .highlight-card:hover .highlight-img-wrapper img {
  /* Volle Farben und leichter Zoom beim Hover */
  filter: sepia(0%) contrast(105%);
  transform: scale(1.05);
}

.team-info {
  padding: 1.5rem;
  text-align: center;
}

.team-name { color: var(--accent-gold); font-size: 1.8rem; }

.highlight-info {
  padding: 1.5rem;
}

.highlight-story {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.highlight-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: #111;
  padding: 1rem;
  border: 1px solid var(--comic-border-color);
}

.highlight-stats .stat {
  display: flex;
  flex-direction: column;
}

.highlight-stats .label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-secondary); }
.highlight-stats .value { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--accent-gold); }

/* Videos */
.video-carousel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding-bottom: 2rem;
  scroll-snap-type: x mandatory;
}

.video-carousel::-webkit-scrollbar { height: 8px; }
.video-carousel::-webkit-scrollbar-track { background: #1a1a1a; }
.video-carousel::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 4px; }

.video-card {
  min-width: 300px;
  flex: 0 0 400px;
  scroll-snap-align: start;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  border: 3px solid #000;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.video-thumb:hover { transform: scale(1.02); border-color: var(--accent-red); }

.video-thumb img {
  width: 100%; height: 100%; object-fit: cover; filter: grayscale(50%);
}

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  background: var(--accent-red);
  border: 3px solid #000;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
}

.play-btn::after {
  content: '';
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #fff;
  margin-left: 5px;
}

.video-title { margin-top: 1rem; font-family: var(--font-sans); font-size: 1.2rem; }

/* Polaroids */
.polaroid-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.polaroid {
  background: #fff;
  padding: 15px 15px 40px 15px;
  box-shadow: 5px 10px 20px rgba(0,0,0,0.5);
  border: 1px solid #ddd;
  transition: transform 0.3s ease;
  width: 280px;
}

.polaroid:nth-child(1) { transform: rotate(-5deg); }
.polaroid:nth-child(2) { transform: rotate(3deg); margin-top: 2rem; }
.polaroid:nth-child(3) { transform: rotate(-2deg); }
.polaroid:nth-child(4) { transform: rotate(6deg); margin-top: 1rem; }

.polaroid:hover { transform: scale(1.05) rotate(0deg); z-index: 10; }

.polaroid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; filter: sepia(0.4) contrast(1.1); }

.polaroid-caption {
  color: #333;
  font-family: 'Shadows Into Light', cursive, sans-serif; /* fallback */
  text-align: center;
  font-size: 1.2rem;
  margin-top: 15px;
  font-weight: 600;
}

/* Why Us */
.feature-box {
  background: var(--bg-color-elevated);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 2px solid #222;
  transition: border-color 0.3s;
}

.feature-box:hover { border-color: var(--accent-gold); }

.feature-icon {
  font-size: 3rem;
  width: 80px; height: 80px;
  margin: 0 auto 1.5rem;
  display: flex; align-items: center; justify-content: center;
  background: #111;
  border-radius: 50%;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 var(--accent-red);
}

.feature-title { margin-bottom: 1rem; color: var(--accent-gold); }

/* Footer */
.site-footer {
  background: #0a0a0a;
  border-top: 3px solid #000;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-tagline { color: var(--text-secondary); margin-top: 1rem; font-style: italic; }

.footer-heading {
  color: var(--accent-beige);
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 1px;
}

.footer-list { list-style: none; }
.footer-list li { margin-bottom: 0.75rem; }
.footer-list a { color: var(--text-secondary); transition: color 0.2s; }
.footer-list a:hover { color: var(--accent-gold); }

.social-links { display: flex; gap: 1rem; }
.social-links a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 50%;
}
.social-links a:hover { background: var(--accent-gold); color: #000; }

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

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}
