﻿/* ========================================
   BHUYAS — MAIN PAGE
   Mobile-First, Image-Led Architecture
   ======================================== */

:root {
  --bg: #0E141B;
  --text: #f7f5e7;
  --text-secondary: #9AA4AE;
  --accent: #5C7C99;
  --page-padding: clamp(16px, 4vw, 56px);
  --section-space: clamp(48px, 10vw, 120px);
}

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ========================================
   HEADER
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(16px, 4vw, 32px);
  z-index: 1000;
  background: transparent;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.hidden {
  transform: translateY(-100%);
}

.header.is-scrolling .logo {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: filter 0.3s ease;
}

.header.is-scrolling .hamburger {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: filter 0.3s ease;
}

.logo {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  z-index: 1001;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 3s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
}

.hero-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px
    );
  background-size: 4px 4px;
  opacity: 0.6;
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ========================================
   SCROLL INDICATOR
   ======================================== */

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  transition: opacity 0.5s ease;
}

.scroll-indicator.hidden {
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(8px);
  }
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--bg);
  border-top: 1px solid rgba(247, 245, 231, 0.06);
  padding: 64px 24px 32px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-title {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: var(--accent);
}

.footer-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--text);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.newsletter-input {
  flex: 1;
  background: rgba(247, 245, 231, 0.04);
  border: 1px solid rgba(247, 245, 231, 0.08);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  border-radius: 2px;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
}

.newsletter-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.newsletter-btn {
  background: var(--accent);
  color: var(--text);
  border: none;
  padding: 10px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.3s ease;
  font-family: 'IBM Plex Mono', monospace;
}
.newsletter-status {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #94a9b9;
}

.newsletter-status[data-state="success"] {
  color: #8dd4b4;
}

.newsletter-status[data-state="error"] {
  color: #e89c9c;
}

.newsletter-btn:hover {
  background: #6B8FA8;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(247, 245, 231, 0.06);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (min-width: 768px) {
  .header {
    padding: 24px 32px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */

@media (min-width: 1024px) {
  .header {
    padding: 32px 48px;
  }

  .footer {
    padding: 80px 48px 40px;
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   UTILITY / ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ========================================
   LAZY LOAD IMAGES
   ======================================== */

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ========================================
   FEATURED PROJECTS SECTION
   Horizontal Stack Layout
   ======================================== */

.featured-projects {
  background: var(--bg);
  padding: var(--section-space) 0;
  position: relative;
  z-index: 2;
}

.featured-projects-layout {
  padding: 0 var(--page-padding);
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 56px);
}

/* Header Section */
.featured-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-subheading {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text);
  margin-bottom: 0;
}

.category-guides {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.category-tabs {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.category-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.category-tab:hover {
  opacity: 0.8;
}

.category-tab.active {
  border-bottom: 2px solid var(--accent);
}

.tab-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
}

.tab-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

/* Featured Stack */
.featured-stack {
  position: relative;
  width: 100%;
  height: clamp(320px, 65vw, 520px);
  display: flex;
  gap: clamp(12px, 3vw, 24px);
  overflow-x: auto;
  padding: 0 0 clamp(10px, 2vw, 16px) 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 245, 231, 0.2) transparent;
}

.featured-stack::-webkit-scrollbar {
  height: 6px;
}

.featured-stack::-webkit-scrollbar-track {
  background: transparent;
}

.featured-stack::-webkit-scrollbar-thumb {
  background: rgba(247, 245, 231, 0.25);
  border-radius: 999px;
}

/* Project Card Featured */
.project-card-featured {
  position: relative;
  flex: 0 0 clamp(240px, 40vw, 420px);
  height: 100%;
  border: 1px solid rgba(247, 245, 231, 0.1);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.project-card-featured:hover {
  transform: translateY(-6px);
  border-color: rgba(247, 245, 231, 0.25);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

.project-card-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
}

.card-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

.card-title {
  position: absolute;
  left: 20px;
  bottom: 20px;
  right: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .featured-projects-layout {
    padding: 0 40px;
  }
  
  .project-card-featured {
    flex: 0 0 320px;
  }
}

@media (max-width: 768px) {
  .featured-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .category-tabs {
    justify-content: flex-start;
    width: 100%;
  }

  .category-tab {
    align-items: flex-start;
  }

  .featured-projects {
    padding: 60px 0;
  }

  .featured-projects-layout {
    padding: 0 24px;
    gap: 30px;
  }

  .featured-stack {
    height: clamp(280px, 60vw, 380px);
  }

  .project-card-featured {
    flex: 0 0 clamp(220px, 80vw, 320px);
  }
}

@media (max-width: 480px) {
  .featured-projects {
    padding: 40px 0;
  }

  .featured-projects-layout {
    padding: 0 16px;
  }

  .featured-stack {
    height: clamp(240px, 65vw, 320px);
  }

  .project-card-featured {
    flex: 0 0 clamp(200px, 90vw, 260px);
  }

  .category-eyebrow {
    font-size: 0.65rem;
  }

  .tab-label {
    font-size: 0.75rem;
  }
}
.featured-projects-container {
  max-width: 1600px;
  margin: 0 auto;
}

.projects-section {
  margin-bottom: 120px;
}

.projects-section:last-child {
  margin-bottom: 0;
}

/* Section Header */
.projects-header {
  position: relative;
  margin-bottom: 40px;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.projects-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
  line-height: 1;
}

.projects-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  width: 100%;
}

.project-card-featured {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
  group: "card";
}

.project-card-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.project-card-featured:hover img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 20, 27, 0.2), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card-featured:hover .card-overlay {
  opacity: 1;
}

/* Card Text Overlay */
.card-title,
.card-desc {
  position: absolute;
  left: 20px;
  right: 20px;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.card-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  bottom: 60px;
  transform: translateY(10px);
}

.card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  bottom: 20px;
  transform: translateY(10px);
}

.project-card-featured:hover .card-title,
.project-card-featured:hover .card-desc {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
  }
  
  .featured-projects-editorial {
    padding: 80px 30px;
  }
  
  .projects-section {
    margin-bottom: 80px;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .featured-projects-editorial {
    padding: 60px 20px;
  }
  
  .projects-section {
    margin-bottom: 60px;
  }
  
  .projects-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-projects-editorial {
    padding: 40px 16px;
  }
  
  .projects-section {
    margin-bottom: 40px;
  }
  
  .projects-title {
    font-size: 1.3rem;
  }
  
  .projects-meta {
    font-size: 0.65rem;
  }
}