﻿@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg-primary: #0c0b09;
  --bg-secondary: rgba(18, 17, 14, 0.6);
  --bg-card: rgba(22, 20, 16, 0.5);
  --accent: #8b4513;
  --accent-glow: rgba(139, 69, 19, 0.3);
  --rust: #6b3a1f;
  --text-primary: #c8c0b0;
  --text-secondary: #7a7264;
  --text-muted: #4a453c;
  --border: rgba(42, 37, 32, 0.5);
  --border-rough: rgba(30, 26, 21, 0.5);
  --dirt: rgba(26, 22, 16, 0.4);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--rust) var(--bg-primary);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

#bg3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}

#bg3d-fallback {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(139, 69, 19, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(107, 58, 31, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(22, 20, 16, 0.8) 0%, transparent 80%);
}

.no-webgl #bg3d { display: none; }
.no-webgl #bg3d-fallback { display: block; }

body.scrolling-fast .section,
body.scrolling-fast .hero-content,
body.scrolling-fast .carousel-section,
body.scrolling-fast .footer-end {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.15s ease !important;
}

body.at-bottom .section,
body.at-bottom .hero-content,
body.at-bottom .carousel-section {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.3s ease !important;
}

body:not(.scrolling-fast):not(.at-bottom) .section,
body:not(.scrolling-fast):not(.at-bottom) .hero-content,
body:not(.scrolling-fast):not(.at-bottom) .carousel-section {
  transition: opacity 0.4s ease;
}

/* GRAIN OVERLAY â€” dirty texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* SCRATCH LINES â€” torn feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background:
    linear-gradient(178deg, transparent 0%, transparent 48%, rgba(255,255,255,0.008) 48.5%, transparent 49%, transparent 100%),
    linear-gradient(2deg, transparent 0%, transparent 72%, rgba(255,255,255,0.005) 72.5%, transparent 73%, transparent 100%),
    linear-gradient(91deg, transparent 0%, transparent 34%, rgba(255,255,255,0.004) 34.5%, transparent 35%, transparent 100%);
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--rust); }

/* ==================== PRELOADER ==================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader3d {
  width: 120px;
  height: 120px;
  pointer-events: none;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 12px;
  color: var(--accent);
  animation: preloaderPulse 1.5s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(139, 69, 19, 0.3);
}

.preloader-bar {
  width: 200px;
  height: 1px;
  background: var(--border-rough);
  overflow: hidden;
}

.preloader-bar::after {
  content: '';
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
  animation: preloaderFill 2s ease forwards;
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes preloaderFill {
  to { width: 100%; }
}

/* ==================== NAVIGATION ==================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease;
}

.nav.scrolled {
  background: rgba(12, 11, 9, 0.92);
  border-bottom: 1px solid var(--border-rough);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 6px;
  color: var(--text-primary);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.nav-logo:hover { opacity: 1; }

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

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

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

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

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.2s;
  line-height: 1;
}

.lang-btn:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.lang-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

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

.nav-toggle span {
  width: 20px;
  height: 1px;
  background: var(--text-muted);
  transition: all 0.3s ease;
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  padding: 0 40px 80px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s 2.2s ease forwards;
}

.hero-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 9vw, 7rem);
  line-height: 0.9;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: heroTitleReveal 1s ease forwards;
}

.hero-title .line:nth-child(1) span { animation-delay: 2.3s; }
.hero-title .line:nth-child(2) span { animation-delay: 2.45s; }

.hero-title .accent {
  color: var(--accent);
}

.hero-desc {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s 2.6s ease forwards;
}

.hero-actions {
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s 2.8s ease forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-primary);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  right: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: heroReveal 0.8s 3s ease forwards;
}

.hero-scroll span {
  font-size: 0.55rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 30px;
  background: var(--border-rough);
  position: relative;
  overflow: hidden;
}

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

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

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

@keyframes heroTitleReveal {
  to { transform: translateY(0); }
}

/* ==================== SECTION COMMON ==================== */
.section {
  padding: 100px 40px;
  position: relative;
  z-index: 1;
}

/* Two-column layout */
.content-columns {
  display: flex;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.column-left,
.column-right {
  flex: 1;
  min-width: 0;
}

.column-left .section,
.column-right .section {
  padding: 60px 0;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: var(--border-rough);
}

.section-header {
  margin-bottom: 60px;
  cursor: pointer;
  position: relative;
  padding-right: 24px;
  transition: margin-bottom 0.4s ease, opacity 0.4s ease;
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border-rough);
  border-radius: 4px;
}

.section-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05) brightness(0.8);
  transition: filter 0.4s ease;
}

.section-header.hovered .section-thumb img {
  filter: grayscale(0) contrast(1.1) brightness(1);
}

.section-header-text {
  flex: 1;
  min-width: 0;
}

.section-header.hovered .section-title,
.section-header.hovered .section-label,
.section-header.hovered .section-desc {
  opacity: 1 !important;
}

.section.pinned {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 960px);
  max-height: 90vh;
  overflow-y: auto;
  z-index: 50;
  background: rgba(12, 11, 9, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-rough);
  border-radius: 6px;
  padding: 48px 56px;
}

body.menu-open {
  overflow: hidden;
}

.section.pinned .section-header {
  margin-bottom: 24px;
}

.section.pinned .features-grid {
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.section.pinned .about-content {
  max-height: none;
}

.section.pinned-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.section.pinned-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.section-header .section-title,
.section-header .section-label,
.section-header .section-desc {
  transition: opacity 0.4s ease;
}

.section:not(.collapsed):not(.in-view) .section-title,
.section:not(.collapsed):not(.in-view) .section-label,
.section:not(.collapsed):not(.in-view) .section-desc {
  opacity: 0.15;
}

.section.collapsed .section-header {
  margin-bottom: 20px;
}

.section.collapsed .section-header .section-title,
.section.collapsed .section-header .section-label,
.section.collapsed .section-header .section-desc {
  opacity: 0.15;
}

.section-header::after {
  content: 'â–¸';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.section:not(.collapsed) .section-header::after {
  transform: translateY(-50%) rotate(90deg);
}

.section-label {
  font-size: 0.6rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

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

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 2px;
  line-height: 1;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 450px;
  margin-top: 12px;
  line-height: 1.8;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ==================== ABOUT ==================== */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: flex;
  align-items: center;
  gap: 32px;
}

.about-image {
  position: relative;
  width: 200px;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.05);
  transition: filter 0.6s ease;
}

.about-image:hover img {
  filter: grayscale(0) contrast(1.1);
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-rough);
  pointer-events: none;
}

/* Rough corner cuts */
.about-image::before {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  background: var(--bg-secondary);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  z-index: 1;
}

.about-text .section-title {
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.about-content {
  max-height: 300px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.section.collapsed .about-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-rough);
}

.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ==================== FEATURES ==================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  max-width: 800px;
  max-height: 800px;
  opacity: 1;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.section.collapsed .features-grid {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.feature-card {
  background: var(--bg-card);
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
  border: 1px solid var(--border-rough);
  border-radius: 4px;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0;
  background: var(--accent);
  transition: height 0.5s ease;
}

.feature-card:hover::before {
  height: 100%;
}

.feature-card:hover {
  background: var(--dirt);
}

.feature-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.85rem;
}

.feature-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==================== CAROUSEL ==================== */
.carousel-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 2px;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 calc(33.333% - 1.34px);
  aspect-ratio: 16/10;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.05) brightness(0.85);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.carousel-slide:hover img {
  filter: grayscale(0) contrast(1.1) brightness(1);
  transform: scale(1.04);
}

.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12,11,9,0.4) 0%, transparent 40%);
  pointer-events: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(12,11,9,0.8);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s;
}

.carousel-btn:hover {
  border-color: var(--accent);
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  transition: border-color 0.3s;
}

.lightbox-close:hover {
  border-color: var(--accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.3s;
}

.lightbox-nav:hover {
  border-color: var(--accent);
}

/* ==================== HERO SOCIAL ==================== */
.hero-social {
  display: flex;
  gap: 20px;
  margin-top: 32px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s 2.8s ease forwards;
}

.hero-social a {
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
}

.hero-social a:hover {
  color: var(--accent);
  transform: scale(1.15);
}

.hero-social svg {
  width: 28px;
  height: 28px;
}

/* ==================== WELCOME ==================== */
.welcome-section {
  position: relative;
  z-index: 1;
  padding: 100px 40px;
  text-align: center;
}

.welcome-inner {
  max-width: 700px;
  margin: 0 auto;
}

.welcome-text {
  font-size: 1rem;
  line-height: 2;
  color: var(--text-secondary);
  margin-top: 20px;
}

/* ==================== FEATURE TABS ==================== */
.features-tabs-section {
  position: relative;
  z-index: 1;
  padding: 80px 40px;
}

.features-tabs-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.features-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.feature-tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 28px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.3s;
}

.feature-tab:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.feature-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.features-tabs-content {
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
  gap: 16px;
}

#featuresTabsPanels {
  flex: 1;
  min-width: 0;
}

.feature-panel {
  display: none;
  gap: 40px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.feature-panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  animation: fadeIn 0.5s ease;
}

.feature-panel-img {
  overflow: hidden;
  border: 1px solid var(--border-rough);
  border-radius: 4px;
}

.feature-panel-img img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.05);
  transition: filter 0.4s;
}

.feature-panel:hover .feature-panel-img img {
  filter: grayscale(0) contrast(1.1);
}

.feature-panel-text h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
  color: var(--accent);
}

.feature-panel-text p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.feature-panel-list {
  list-style: none;
  padding: 0;
}

.feature-panel-list li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.feature-panel-list li::before {
  content: 'â–¸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.tab-arrow {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, color 0.3s;
  flex-shrink: 0;
}

.tab-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== NEWS ==================== */
.news-section {
  position: relative;
  z-index: 1;
  padding: 80px 40px;
}

.news-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-rough);
  border-radius: 4px;
  overflow: hidden;
  text-align: left;
  transition: border-color 0.3s, background 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  border-color: var(--accent);
  background: var(--dirt);
}

.news-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-rough);
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.05) brightness(0.85);
  transition: filter 0.4s, transform 0.4s;
}

.news-card:hover .news-card-img img {
  filter: grayscale(0) contrast(1.1) brightness(1);
  transform: scale(1.05);
}

.news-card-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.news-card-tag {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  align-self: flex-start;
}

.news-date {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--accent);
}

.news-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.news-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

/* ==================== SCREENSHOTS MOSAIC ==================== */
.screenshots-section {
  position: relative;
  z-index: 1;
  padding: 80px 40px;
}

.screenshots-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.screenshots-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 8px;
  margin-top: 40px;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-rough);
  border-radius: 4px;
  cursor: pointer;
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05) brightness(0.85);
  transition: filter 0.4s, transform 0.4s;
}

.mosaic-item:hover img {
  filter: grayscale(0) contrast(1.1) brightness(1);
  transform: scale(1.05);
}

.mosaic-wide {
  grid-column: span 2;
}

.mosaic-tall {
  grid-row: span 2;
}

.mosaic-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  opacity: 0;
  transition: opacity 0.3s;
}

.mosaic-item:hover .mosaic-overlay {
  opacity: 1;
}

.mosaic-overlay span {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 3px;
}

/* ==================== FOOTER ==================== */
/* ==================== VIDEO SECTIONS ==================== */
.video-section {
  position: relative;
  z-index: 1;
  padding: 80px 40px;
  border-top: 1px solid var(--border-rough);
}

.video-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.video-player {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-rough);
  background: var(--bg-primary);
}

.video-player video {
  width: 100%;
  display: block;
  outline: none;
}

/* Video Mosaic */
.video-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 8px;
  margin-top: 24px;
}

.video-mosaic-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-rough);
  border-radius: 4px;
  cursor: pointer;
  background: var(--bg-primary);
}

.video-mosaic-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.05) brightness(0.85);
  transition: filter 0.4s, transform 0.4s;
}

.video-mosaic-item:hover video {
  filter: grayscale(0) contrast(1.1) brightness(1);
  transform: scale(1.05);
}

.video-mosaic-wide {
  grid-column: span 2;
}

.video-mosaic-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: none;
  transition: transform 0.3s, color 0.3s;
}

.video-mosaic-item:hover .video-mosaic-play {
  transform: scale(1.2);
  color: var(--accent);
}

.video-mosaic-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.video-mosaic-item:hover .video-mosaic-overlay {
  opacity: 1;
}

/* Video Lightbox */
.video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.video-lightbox.active {
  display: flex;
}

.video-lightbox-panel {
  max-width: 960px;
  width: 100%;
  position: relative;
}

.video-lightbox-player {
  width: 100%;
  display: block;
  border-radius: 4px;
  outline: none;
  background: #000;
}

.video-lightbox-title {
  text-align: center;
  margin-top: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.video-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 9600;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 1;
}

.video-lightbox-close:hover {
  color: var(--accent);
}

/* ==================== NEWS MODAL ==================== */
.news-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s;
}

.news-modal.open {
  display: flex;
  opacity: 1;
}

.news-modal-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-rough);
  border-radius: 6px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  text-align: left;
}

.news-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
  line-height: 1;
}

.news-modal-close:hover {
  background: var(--accent);
  color: #fff;
}

.news-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.news-modal-nav:hover {
  background: var(--accent);
}

.news-modal-prev { left: 12px; }
.news-modal-next { right: 56px; }

.news-modal-img-wrap {
  width: 100%;
  max-height: 360px;
  overflow: hidden;
}

.news-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-modal-body {
  padding: 28px 32px 32px;
}

.news-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.news-modal-date {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--accent);
}

.news-modal-tag {
  background: var(--accent-glow);
  color: var(--accent);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
}

.news-modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.news-modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.news-modal-desc p { margin: 0 0 12px; }
.news-modal-desc strong { color: var(--text-primary); }
.news-modal-desc em { font-style: italic; }
.news-modal-desc a { color: var(--accent); text-decoration: underline; }
.news-modal-desc a:hover { color: var(--text-primary); }
.news-modal-desc pre { background: var(--bg-primary); padding: 12px 16px; border-radius: 4px; overflow-x: auto; margin: 12px 0; border: 1px solid var(--border-rough); }
.news-modal-desc code { font-size: 0.82rem; color: var(--accent); }
.news-modal-desc pre code { color: var(--text-primary); }
.news-modal-desc ul { margin: 8px 0; padding-left: 20px; }
.news-modal-desc li { margin: 4px 0; }
.news-modal-desc blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--text-muted); margin: 12px 0; }
.news-modal-desc hr { border: none; border-top: 1px solid var(--border-rough); margin: 16px 0; }

.news-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-rough);
}

.news-modal-share {
  background: none;
  border: 1px solid var(--border-rough);
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.news-modal-share:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.news-modal-counter {
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.news-modal-date {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 16px;
}

.news-modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.news-modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ==================== FOOTER END ==================== */
.footer-end {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 40px;
  text-align: center;
  border-top: 1px solid var(--border-rough);
}

.footer-end-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 20px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
  margin-top: 20vh;
}

.footer-end-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 12px;
  opacity: 0.6;
  margin-bottom: 24px;
}

.footer-end-brand span {
  color: var(--accent);
}

.footer-end-social {
  display: flex;
  gap: 24px;
  margin-bottom: auto;
}

.footer-end-social a {
  color: var(--text-secondary);
  transition: color 0.3s;
}

.footer-end-social a:hover {
  color: var(--accent);
}

.footer-end-social svg {
  width: 22px;
  height: 22px;
}

.footer-end-copy {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: auto;
  padding-top: 40px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .nav { padding: 0 24px; }
  .hero { padding: 0 24px 60px; }
  .section { padding: 80px 24px; }
  .section::before { left: 24px; right: 24px; }
  .about-grid { flex-direction: column; gap: 24px; }
  .about-image { width: 160px; height: 160px; }
  .features-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .carousel-slide { flex: 0 0 calc(50% - 1px); }
  .video-section { padding: 60px 24px; }
  .footer-end { padding: 60px 24px 40px; }
  .footer-end-title { letter-spacing: 10px; }
  .footer-end-brand { font-size: 1.5rem; letter-spacing: 6px; }
}

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

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 11, 9, 0.98);
    padding: 40px 24px;
    gap: 20px;
    z-index: 999;
  }

  .hero-title {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .hero-scroll { display: none; }

  .features-grid { grid-template-columns: 1fr 1fr; }
  .carousel-slide { flex: 0 0 calc(100%); }
  .carousel-btn { display: none; }

  .video-section { padding: 50px 16px; }
  .footer-end { padding: 60px 24px 40px; }
  .footer-end-brand { font-size: 1.5rem; }

  .news-grid { gap: 12px; }
  .news-card-img { height: 140px; }
  .news-modal { padding: 20px; }
  .news-modal-body { padding: 20px 24px 24px; }
  .news-modal-title { font-size: 1.4rem; }
  .news-modal-prev { left: 8px; }
  .news-modal-next { right: 48px; }

  /* Feature tabs */
  .feature-panel.active {
    grid-template-columns: 1fr;
  }

  .feature-panel-img img {
    height: 200px;
  }

  /* Screenshots mosaic */
  .screenshots-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  /* Video mosaic */
  .video-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .video-lightbox {
    padding: 20px;
  }


}

@media (max-width: 480px) {
  .hero { padding: 0 16px 40px; min-height: 500px; }
  .section { padding: 60px 16px; }
  .section::before { left: 16px; right: 16px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .about-stats { grid-template-columns: 1fr; gap: 16px; }

  /* Nav mobile adjustments */
  .nav {
    padding: 0 16px;
    height: 60px;
  }

  .nav-logo {
    font-size: 1.1rem;
    letter-spacing: 4px;
  }

  .lang-switcher {
    gap: 4px;
  }

  .lang-btn {
    padding: 3px 6px;
    font-size: 0.85rem;
  }

  /* Hero mobile */
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 60px;
  }

  .hero-tag {
    font-size: 0.55rem;
    letter-spacing: 3px;
  }

  .hero-title {
    font-size: clamp(2.8rem, 16vw, 4.5rem);
  }

  .hero-desc {
    font-size: 0.8rem;
    line-height: 1.7;
    margin-bottom: 24px;
  }

  .hero-social {
    gap: 16px;
    justify-content: center;
  }

  .hero-social svg {
    width: 22px;
    height: 22px;
  }

  /* Welcome */
  .welcome-section {
    padding: 60px 16px;
  }

  .welcome-text {
    font-size: 0.85rem;
  }

  /* Feature tabs */
  .features-tabs-section {
    padding: 60px 16px;
  }

  .features-tabs-nav {
    gap: 4px;
    margin-bottom: 24px;
  }

  .feature-tab {
    padding: 10px 16px;
    font-size: 0.75rem;
    letter-spacing: 2px;
  }

  .feature-panel.active {
    grid-template-columns: 1fr;
  }

  .feature-panel-img img {
    height: 200px;
  }

  .feature-panel-text h3 {
    font-size: 1.5rem;
  }

  .feature-panel-text p {
    font-size: 0.8rem;
  }

  .tab-arrow {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.85rem;
  }

  /* News */
  .news-section {
    padding: 60px 16px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  /* Screenshots mosaic */
  .screenshots-section {
    padding: 60px 16px;
  }

  .screenshots-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }

  .video-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  .video-mosaic-wide {
    grid-column: span 1;
  }









  .mosaic-wide {
    grid-column: span 2;
  }

  .mosaic-tall {
    grid-row: span 1;
  }

  /* Features grid single column */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .feature-card {
    padding: 16px 14px;
  }

  .feature-icon {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .feature-title {
    font-size: 0.85rem;
  }

  .feature-desc {
    font-size: 0.65rem;
  }

  /* Section headers */
  .section-header {
    gap: 12px;
  }

  .section-thumb {
    width: 56px;
    height: 56px;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  .section-desc {
    font-size: 0.75rem;
    margin-top: 8px;
  }

  .section-label {
    font-size: 0.5rem;
    letter-spacing: 3px;
    margin-bottom: 8px;
  }

  /* Carousel */
  .carousel-section {
    padding: 30px 16px 40px;
  }

  .carousel-slide {
    flex: 0 0 100%;
  }

  /* Preloader */
  #preloader3d {
    width: 80px;
    height: 80px;
  }

  .preloader-logo {
    font-size: 2rem;
    letter-spacing: 8px;
  }

  /* Footer */
  .footer-end {
    padding: 50px 16px 40px;
  }

  .footer-end-brand {
    font-size: 1.3rem;
    letter-spacing: 6px;
  }

  .footer-end-social {
    gap: 16px;
  }

  .footer-end-social svg {
    width: 18px;
    height: 18px;
  }

  /* Pinned section mobile */
  .section.pinned {
    width: 95vw;
    padding: 24px 20px;
    max-height: 85vh;
  }

  .section.pinned .section-header {
    margin-bottom: 16px;
  }

  .section.pinned .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== TOUCH & MOBILE BASE ==================== */
@media (hover: none) and (pointer: coarse) {
  .feature-card:hover::before {
    height: 0;
  }

  .feature-card:hover {
    background: var(--bg-card);
  }

  .section-header.hovered .section-thumb img {
    filter: grayscale(0.4) contrast(1.05) brightness(0.8);
  }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer-end {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .nav {
    padding-top: env(safe-area-inset-top);
  }
}
