/* ============================================================
   VKB Case Study - 3 sections, scroll-snap, dark theme
   ============================================================ */

/* Google Fonts loaded via <link> tags in HTML for performance */

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

/* ── Skip Link ── */
.cs-skip-link {
    position: absolute; top: -999px; left: 0;
    background: var(--orange); color: #fff;
    padding: 8px 16px; z-index: 9999;
    text-decoration: none; font-weight: 600;
}
.cs-skip-link:focus { top: 0; }

:root {
  --bg-base: #0a1929;
  --bg-surface: #102a43;
  --text-primary: #ffffff;
  --text-secondary: #9fb3c8;
  --text-tertiary: #7a96b0;
  --border-default: #243b53;
  --border-subtle: #334e68;
  --orange: #f97316;
  --orange-glow: rgba(249,115,22,0.4);
  --orange-glow-soft: rgba(249,115,22,0.15);
  --green: #00b894;
  --green-glow: rgba(0,184,148,0.4);
}

html {
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
}

body.cs-vkb {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

body.cs-vkb a { color: var(--orange); text-decoration: none; }
body.cs-vkb a:hover { text-decoration: underline; }
body.cs-vkb a.cs-product-link { color: #fff !important; text-decoration: none !important; }
body.cs-vkb a.cs-product-link:hover { color: #fff !important; }

.cs-font-display {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  letter-spacing: 0.04em;
}

/* ── Sections ── */
.cs-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  position: relative;
  padding: 80px 24px 40px;
  overflow: hidden;
}

/* ── Nav ── */
.cs-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10,25,41,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
}

.cs-nav-collab {
  display: flex;
  align-items: center;
  gap: 0;
  transition: opacity 0.2s;
}
.cs-nav-collab:hover { opacity: 0.8; text-decoration: none !important; }

.cs-nav-collab-logo { height: 32px; width: auto; }
.cs-nav-collab-logo:last-child { height: 44px; }

.cs-nav-collab-x {
  font-size: 0.7rem;
  color: var(--orange);
  margin: 0 6px;
  font-weight: 300;
  align-self: center;
  line-height: 1;
}

.cs-nav-fallback {
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: 0.06em;
}

.cs-nav-right { display: flex; align-items: center; gap: 16px; }

.cs-nav-lang {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.cs-nav-lang:hover { color: var(--orange) !important; border-color: var(--orange); text-decoration: none !important; }
.cs-nav-lang.active { color: var(--orange) !important; border-color: var(--orange); }

.cs-nav-back {
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary) !important;
  transition: color 0.2s;
}
.cs-nav-back:hover { color: var(--orange) !important; }

/* ── HERO ── */
.cs-hero { text-align: center; }

.cs-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(249,115,22,0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: drift 20s ease-in-out infinite alternate;
  pointer-events: none;
}

.cs-hero::after {
  content: '';
  position: absolute;
  top: 20%; left: 50%;
  width: 600px; height: 600px;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  animation: radial-pulse 6s ease-in-out infinite;
  pointer-events: none;
}

.cs-hero-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}

.cs-vkb-logo {
  width: 80px; height: 80px;
  filter: drop-shadow(0 0 20px rgba(249,115,22,0.5)) drop-shadow(0 0 40px rgba(249,115,22,0.2));
  margin-bottom: 8px;
}

.cs-hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  margin-bottom: 8px;
}

.cs-text-orange {
  color: var(--orange);
  text-shadow: 0 0 30px var(--orange-glow), 0 0 60px var(--orange-glow-soft);
}

.cs-hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  max-width: 600px; font-weight: 500;
}

.cs-hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-tertiary);
  max-width: 560px; line-height: 1.5;
}

.cs-scroll-prompt {
  position: relative; z-index: 1;
  margin-top: 24px;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.cs-scroll-arrow {
  display: block;
  margin: 12px auto 0;
  width: 40px; height: 40px;
  color: var(--orange); opacity: 0.7;
  animation: bounce 2s ease-in-out infinite;
  transition: opacity 0.2s;
}
.cs-scroll-arrow:hover { opacity: 1; }
.cs-scroll-arrow svg { width: 100%; height: 100%; }

/* ── PRODUCTS ── */
.cs-products { gap: 32px; }

.cs-section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-align: center; line-height: 1;
  margin-bottom: 4px;
}

.cs-section-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-secondary);
  text-align: center; max-width: 640px;
  margin-bottom: 8px;
}

.cs-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px; max-width: 940px; width: 100%;
}

.cs-product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px; padding: 28px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeUpNeon 0.6s ease-out both;
}
.cs-product-card:nth-child(1) { animation-delay: 0ms; }
.cs-product-card:nth-child(2) { animation-delay: 100ms; }
.cs-product-card:nth-child(3) { animation-delay: 200ms; }
.cs-product-card:nth-child(4) { animation-delay: 300ms; }

.cs-product-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 20px var(--orange-glow), 0 0 40px var(--orange-glow-soft);
}

.cs-product-card:focus-within {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 20px var(--orange-glow), 0 0 0 3px var(--orange);
}

.cs-product-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.cs-product-name { font-size: 1.25rem; font-weight: 700; }

h3.cs-product-name {
  margin: 0;
}

.cs-badge-live {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #34d399;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  padding: 2px 8px; border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
}
.cs-badge-live::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: #34d399;
  animation: pulse-dot 2s ease-in-out infinite;
}

.cs-product-screenshot {
  width: 100%; max-height: 200px;
  object-fit: cover; object-position: top;
  border-radius: 8px; border: 1px solid var(--border-subtle);
}

.cs-product-desc {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.4;
}

.cs-product-link {
  display: inline-block;
  background: var(--orange);
  padding: 8px 18px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  text-align: center; margin-top: auto;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.cs-product-link:hover {
  box-shadow: 0 0 16px var(--orange-glow);
  transform: translateY(-1px);
}

/* ── CTA ── */
.cs-cta { gap: 20px; text-align: center; }

.cs-cta-title { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1; }

.cs-cta-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary); max-width: 500px;
}

.cs-cta-buttons {
  display: flex; gap: 16px; align-items: center;
  flex-wrap: wrap; justify-content: center; margin-top: 8px;
}

.cs-btn-contact {
  display: inline-block;
  background: var(--green); color: #fff !important;
  padding: 14px 36px; border-radius: 10px;
  font-size: 1.05rem; font-weight: 700;
  text-decoration: none !important;
  animation: glow-pulse-contact 2.5s ease-in-out infinite;
  transition: transform 0.2s ease;
}
.cs-btn-contact:hover { transform: translateY(-2px) scale(1.06); }

.cs-btn-back {
  display: inline-block;
  color: var(--orange) !important;
  border: 2px solid var(--orange);
  padding: 12px 32px; border-radius: 10px;
  font-size: 1.05rem; font-weight: 600;
  text-decoration: none !important;
  transition: background 0.3s ease, transform 0.2s ease;
}
.cs-btn-back:hover { background: rgba(249,115,22,0.1); transform: translateY(-2px); }

.cs-footer-text { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 40px; }

.cs-footer-pts {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 12px;
}
.cs-footer-pts a { color: var(--text-secondary); text-decoration: underline; }
.cs-footer-pts a:hover { color: var(--orange); }

/* ── Scroll Reveal ── */
.cs-reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  filter: blur(3px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}
.cs-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ── Keyframes ── */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  60% { transform: translateY(-6px); }
}

@keyframes drift {
  0% { background-position: 0 0; }
  100% { background-position: 20px 20px; }
}

@keyframes radial-pulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.08; }
  50% { transform: translate(-50%,-50%) scale(1.15); opacity: 0.15; }
}

@keyframes fadeUpNeon {
  0% { opacity: 0; transform: translateY(24px); box-shadow: none; }
  100% { opacity: 1; transform: translateY(0); box-shadow: 0 0 10px var(--orange-glow-soft); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes glow-pulse-contact {
  0%, 100% {
    box-shadow: 0 0 20px var(--green-glow);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 50px var(--green-glow), 0 0 80px rgba(0,184,148,0.2);
    transform: scale(1.02);
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .cs-section { padding: 72px 16px 32px; }
  .cs-nav { padding: 10px 12px; }
  .cs-nav-collab-logo { height: 24px; }
  .cs-nav-collab-logo:last-child { height: 30px; }
  .cs-nav-collab-x { font-size: 0.6rem; margin: 0 4px; }
  .cs-nav-right { gap: 8px; }
  .cs-nav-lang { font-size: 0.75rem; padding: 3px 8px; }
  .cs-nav-back { font-size: 0.75rem; }
  .cs-product-grid { grid-template-columns: 1fr; gap: 16px; }
  .cs-product-card { padding: 20px; }
  .cs-product-screenshot { max-height: 160px; }
  .cs-hero-title { font-size: clamp(2.5rem, 10vw, 4rem); }
  .cs-cta-buttons { flex-direction: column; }
  .cs-scroll-prompt { font-size: 0.85rem; }
  .cs-footer-text { margin-top: 24px; }
  .cs-footer-pts { text-align: center; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; scroll-behavior: auto; }
  .cs-reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .cs-scroll-arrow, .cs-product-card, .cs-hero::before, .cs-hero::after,
  .cs-badge-live::before, .cs-btn-contact { animation: none; }
  .cs-product-card:hover { transform: none; }
}
