/* ============================================
   BCM Website - Responsive Styles
   Mobile-first responsive breakpoints
   Hybrid Dark/Light Theme
   ============================================ */

/* ============================================
   Breakpoints Reference:
   - Mobile: < 640px (default styles)
   - Tablet: >= 640px
   - Laptop: >= 1024px
   - Desktop: >= 1280px
   - Large: >= 1536px
   ============================================ */

/* ============================================
   Mobile First Base (< 640px)
   ============================================ */

/* Header - Mobile */
.header {
  top: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  /* background: rgba(12, 15, 26, 0.85); */
  padding: 10px;
  border-radius: 10px;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.header.header--scrolled {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Navigation - Mobile Full Screen */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100vh !important;
  border-radius: 0 !important;
  padding: var(--space-20) var(--space-6) var(--space-6) !important;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-start;
  gap: var(--space-2);
  background: rgba(12, 15, 26, 0.97) !important;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2), -5px 0 20px rgba(0, 0, 0, 0.3) !important;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  z-index: var(--z-nav);
}

/* Mobile: light menu when scrolled */
.header--scrolled .nav {
  background: rgba(255, 255, 255, 0.97) !important;
}

.nav.active {
  transform: translateX(0);
}

/* Hide trigger on mobile, show toggle */
.nav__trigger {
  display: none !important;
}

.nav__toggle {
  display: flex;
  position: fixed;
  top: 1.4rem;
  right: var(--space-4);
  z-index: calc(var(--z-nav) + 1);
  width: 48px;
  height: 48px;
  background: var(--color-dark-glass);
  border: 1px solid var(--color-dark-glass-border);
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.header--scrolled ~ .nav__toggle,
.nav__toggle.header-scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

.header--scrolled .nav:not(.expanded) {
  background: rgba(12, 15, 26, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav__toggle:hover {
  border-color: rgba(30, 58, 110, 0.3);
}

/* Show all nav links on mobile when active */
.nav.active .nav__link,
.nav.active .nav__dropdown {
  display: block;
}

.nav__link {
  display: none;
  padding: var(--space-4) var(--space-4);
  font-size: var(--text-lg);
  border-bottom: 1px solid var(--color-dark-glass-border);
  border-radius: 0;
  color: var(--color-text-on-dark-secondary);
}

.header--scrolled .nav__link {
  color: var(--color-text-secondary);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.nav__link::after {
  display: none;
}

.nav__dropdown {
  display: none;
}

.nav__dropdown .nav__dropdown-toggle {
  padding: var(--space-4);
  font-size: var(--text-lg);
  border-bottom: 1px solid var(--color-dark-glass-border);
  border-radius: 0;
}

.header--scrolled .nav__dropdown .nav__dropdown-toggle {
  color: var(--color-text-secondary);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.nav__dropdown-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  background: transparent;
  border: none;
  backdrop-filter: none;
  padding: 0;
  padding-left: var(--space-4);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.nav__dropdown.active .nav__dropdown-menu {
  max-height: 500px;
}

.nav__dropdown-link {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header--scrolled .nav__dropdown-link {
  color: var(--color-text-secondary);
  border-bottom-color: rgba(0, 0, 0, 0.04);
}


.header__cta {
  display: none;
}

/* Hero - Mobile */
.hero {
  min-height: auto;
  min-height: 100svh;
  padding: var(--space-24) 0 var(--space-12);
}

.hero__title {
  font-size: var(--text-5xl);
  line-height: var(--leading-none);
}

.hero__description {
  font-size: var(--text-base);
}

.hero__actions {
  flex-direction: column;
}

.hero__actions .btn {
  width: 100%;
  justify-content: center;
}

/* Hero Shapes - Smaller on mobile */
.hero__shape--cube {
  width: 60px;
  height: 60px;
  top: 15%;
  right: 5%;
}

.hero__shape--sphere {
  width: 80px;
  height: 80px;
  top: 70%;
  right: 10%;
}

.hero__shape--ring {
  width: 150px;
  height: 150px;
  top: 5%;
  left: -10%;
}

.hero__shape--ring-2 {
  width: 100px;
  height: 100px;
  bottom: 10%;
  right: 5%;
}

/* Grids - Mobile */
.grid-2,
.grid-3,
.grid-4,
.grid-5 {
  grid-template-columns: 1fr;
}

/* Stats Strip - Mobile */
.stats-strip {
  grid-template-columns: repeat(2, 1fr);
}

.stats-strip__item::after {
  display: none;
}

.stats-strip__item:nth-child(2)::after,
.stats-strip__item:nth-child(4)::after {
  display: block;
  right: 0;
  top: auto;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  transform: none;
}

/* Two Column - Mobile */
.two-col {
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

/* Footer - Mobile: center align content */
.footer {
  text-align: center;
}

.footer__grid {
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.footer__brand {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.footer__column {
  text-align: center;
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer__contact-item {
  justify-content: center;
}

.footer__bottom {
  flex-direction: column;
  gap: var(--space-4);
  text-align: center;
}

/* Section Spacing - Mobile */
.section {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-16) 0;
}

/* Contact Form - Mobile */
.contact-form {
  padding: var(--space-6);
}

/* Value Items - Mobile */
.value-item {
  padding: var(--space-4);
}

/* Cards - Mobile */
.card,
.service-card {
  padding: var(--space-6);
}

/* Why Bentata - Mobile: stack cards */
.why-bentata__cards {
  grid-template-columns: 1fr;
}

/* CTA Section - Mobile */
.cta-section {
  padding: var(--space-16) 0;
}

.cta-section__inner {
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.cta-section__content {
  text-align: center;
}

.cta-section__description {
  margin-left: auto;
  margin-right: auto;
}

.cta-section__image {
  display: flex;
  justify-content: center;
}

.cta-section__image img {
  width: 160px;
}

/* Mascot - Mobile */
.hero__mascot {
  display: none;
}

/* Hero mascot-bg - Mobile */
.hero--mascot-bg .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero services - stitched title */
.hero--services .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero development - stitched title */
.hero--development .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero strategy - stitched title */
.hero--strategy .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero design - stitched title */
.hero--design .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero ai-automation - stitched title */
.hero--ai-automation .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero ai-media - stitched title */
.hero--ai-media .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero saas-b2b-b2c - stitched title */
.hero--saas-b2b-b2c .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero tools - stitched title */
.hero--tools .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero marketplaces - stitched title */
.hero--marketplaces .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero contact - stitched title */
.hero--contact .hero__title-stitched {
  max-width: min(520px, 90vw);
}

/* Hero lectures - stitched title */
.hero--lectures .hero__title-stitched {
  max-width: min(520px, 85vw);
}

/* Hero about - stitched title */
.hero--about .hero__title-stitched {
  max-width: min(520px, 85vw);
}

/* Hero projects - stitched title */
.hero--projects .hero__title-stitched {
  max-width: min(520px, 90vw);
}

.section-bg-mascot {
  display: none;
}

.mascot__image img {
  width: 100px;
}

.mascot__image--lg img {
  width: 160px;
}

.mascot__bubble {
  max-width: 260px;
}

.section-image img {
  max-width: 100% !important;
}

/* ============================================
   Tablet (>= 640px)
   ============================================ */
@media (min-width: 640px) {
  /* Grids */
  .grid-2,
  .grid-4,
  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-5 {
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
  }

  .header {
    background: transparent;
    border: none;
  }

  .header.header--scrolled {
    background: transparent;
    border: none;
  }

  .header__logo {
    margin-top: 10px;
  }
  
  /* Hero */
  .hero__actions {
    flex-direction: row;
  }

  .hero__actions .btn {
    width: auto;
  }
  
  /* Footer - Tablet: restore left alignment */
  .footer {
    text-align: left;
  }

  .footer__brand {
    max-width: 300px;
    margin-left: 0;
    margin-right: 0;
  }

  .footer__column {
    text-align: left;
  }

  .footer__links {
    align-items: flex-start;
  }

  .footer__contact-item {
    justify-content: flex-start;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer__bottom {
    flex-direction: row;
    text-align: left;
  }
  
  /* Contact Form */
  .contact-form {
    padding: var(--space-8);
  }

  /* Hero Title */
  .hero__title {
    font-size: var(--text-5xl);
  }
}

/* ============================================
   Laptop (>= 1024px)
   ============================================ */
@media (min-width: 1024px) {
  /* Header - Desktop */
  .header {
    top: var(--space-6);
    left: var(--space-6);
    right: var(--space-6);
  }

  /* Navigation - Desktop Floating Menu */
  .nav {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 64px !important;
    height: 64px !important;
    border-radius: var(--radius-full) !important;
    padding: 0 !important;
    transform: none;
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
  }

  .nav:hover,
  .nav.expanded {
    width: 240px !important;
    height: auto !important;
    border-radius: var(--radius-2xl) !important;
    padding: var(--space-5) !important;
    align-items: stretch !important;
  }

  .nav__trigger {
    display: flex !important;
  }

  .nav:hover .nav__trigger,
  .nav.expanded .nav__trigger {
    display: none !important;
  }

  .nav__toggle {
    display: none;
  }

  .nav__link {
    display: none;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border-bottom: none;
    border-radius: var(--radius-lg);
  }

  .nav:hover .nav__link,
  .nav.expanded .nav__link,
  .nav:hover .nav__dropdown,
  .nav.expanded .nav__dropdown {
    display: block;
  }

  .nav__link::after {
    display: block;
  }

  .nav__dropdown {
    display: none;
  }

  .nav__dropdown .nav__dropdown-toggle {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border-bottom: none;
    border-radius: var(--radius-lg);
  }

  .nav__dropdown-menu {
    position: absolute;
    top: 0;
    right: calc(100% + var(--space-3));
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    background: rgba(12, 15, 26, 0.96);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-dark-glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-3);
    max-height: none;
    overflow: visible;
  }

  .header--scrolled .nav__dropdown-menu {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
  
  .nav__dropdown:hover .nav__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }


  .nav__dropdown-link {
    border-bottom: none;
    border-radius: var(--radius-md);
  }
  
  .header__cta {
    display: none;
  }
  
  /* Hero */
  .hero {
    min-height: 100vh;
    padding-top: 80px;
  }
  
  .hero__title {
    font-size: var(--text-6xl);
  }
  
  .hero__description {
    font-size: var(--text-lg);
  }

  /* Mascot - Desktop */
  .hero__mascot {
    display: block;
  }

  .section-bg-mascot {
    display: block;
  }

  .mascot__image img {
    width: 160px;
  }

  .mascot__image--lg img {
    width: 240px;
  }

  .mascot__bubble {
    max-width: 360px;
  }

  /* Hero Shapes - Full size on desktop */
  .hero__shape--cube {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 15%;
  }

  .hero__shape--sphere {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 25%;
  }

  .hero__shape--ring {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
  }

  .hero__shape--ring-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 10%;
  }
  
  /* Grids */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-5 {
    grid-template-columns: repeat(5, max-content);
    justify-content: center;
  }
  
  /* Stats Strip - Desktop */
  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .stats-strip__item::after {
    display: block;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: var(--color-glass-border);
  }
  
  .stats-strip__item:last-child::after {
    display: none;
  }
  
  /* Footer */
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  
  /* Section Spacing */
  .section {
    padding: var(--space-20) 0;
  }
  
  .section-lg {
    padding: var(--space-32) 0;
  }
  
  /* Contact Form */
  .contact-form {
    padding: var(--space-10);
  }
  
  /* Two Column Layout */
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }

  /* AI Gallery - desktop: two columns, text+button left, cards right */
  .ai-gallery__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
  }

  .ai-gallery__text {
    grid-column: 1;
  }

  .ai-gallery__cards {
    grid-column: 2;
    grid-row: 1 / -1;
  }

  .ai-gallery__actions {
    grid-column: 1;
  }
  
  .two-col--reverse {
    direction: rtl;
  }
  
  .two-col--reverse > * {
    direction: ltr;
  }

  /* Cards */
  .card,
  .service-card {
    padding: var(--space-8);
  }

  /* CTA Section */
  .cta-section {
    padding: var(--space-24) 0;
  }

  /* Why Bentata - 3 cards side by side on desktop */
  .why-bentata__cards {
    grid-template-columns: repeat(3, 1fr);
  }

  /* CTA Section - content left, image right on desktop */
  .cta-section__inner {
    grid-template-columns: 1fr auto;
  }

  .cta-section__content {
    text-align: left;
  }

  .cta-section__description {
    margin-left: 0;
    margin-right: 0;
  }

  .cta-section__image {
    display: block;
  }

  .cta-section__image img {
    width: 200px;
  }
}

/* ============================================
   Desktop (>= 1280px)
   ============================================ */
@media (min-width: 1280px) {
  /* Container */
  .container {
    padding: 0 var(--space-8);
  }
  
  /* Hero */
  .hero__content {
    max-width: 900px;
  }

  .hero__title {
    font-size: 110px;
  }
  
  /* Service Cards - Larger gaps */
  .grid-3 {
    gap: var(--space-10);
  }
}

/* ============================================
   Large Screens (>= 1536px)
   ============================================ */
@media (min-width: 1536px) {
  /* Increase base font size slightly */
  html {
    font-size: 17px;
  }
  
  /* Hero */
  .hero__content {
    max-width: 1000px;
  }

  /* Header spacing */
  .header {
    top: var(--space-8);
    left: var(--space-8);
    right: var(--space-8);
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .header,
  .footer,
  .nav,
  .btn,
  .hero__actions,
  .hero__shapes {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  body::before {
    display: none;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: #000;
  }

  p {
    color: #333;
  }
  
  img {
    max-width: 100% !important;
  }
  
  .section {
    padding: 20pt 0;
  }

  .card,
  .service-card {
    background: #f5f5f5;
    border: 1px solid #ddd;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero__shape {
    animation: none !important;
  }

  .card:hover,
  .service-card:hover {
    transform: none;
  }
}

/* ============================================
   High Contrast Mode
   ============================================ */
@media (prefers-contrast: high) {
  :root {
    --color-glass-border: rgba(0, 0, 0, 0.2);
    --color-text-secondary: #333333;
    --color-text-muted: #555555;
  }
  
  .btn {
    border-width: 2px;
  }
  
  .card,
  .service-card {
    border-width: 2px;
    border-color: var(--color-accent-blue);
  }

  .nav {
    border-width: 2px;
  }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects that don't work well on touch */
  .card:hover,
  .service-card:hover {
    transform: none;
  }

  .card:active,
  .service-card:active {
    transform: scale(0.98);
  }

  /* Make touch targets larger */
  .btn {
    min-height: 48px;
    min-width: 48px;
  }

  .nav__link,
  .nav__dropdown-link {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Disable parallax on touch devices */
  .hero__shape {
    transition: none !important;
  }
}
