:root {
  --bg: #050505;
  --accent-tech: #1A5FB4;
  --text-main: #ffffff;
  --text-dim: #888;
  --navy-accent: #1A5FB4;
  --red-alert: #ff4d4d;
  --gray-muted: #888888;
}

p {
  font-family: monospace;
}

ul li {
  list-style: none;
}

body, html {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
  padding: 10px;
}

/* --- NAV --- */
nav {
  position: fixed; top: 0; width: 100%; height: 80px;
  display: flex; justify-content: center; align-items: center;
  z-index: 1000; background: rgba(0,0,0,0.8); backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
nav a {
  color: white; text-decoration: none; margin: 0 30px;
  font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase;
  font-weight: 500; opacity: 0.5; transition: 0.4s;
}
nav a:hover { opacity: 1; color: var(--accent-tech); }

/* --- BURGER MENU & MOBILE NAV --- */
.menu-toggle {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-main);
  position: relative;
  transition: 0.3s;
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 2px;
  background: var(--text-main);
  left: 0;
  transition: 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Hamburger Transform to X */
.menu-toggle.active .hamburger { background: transparent; }
.menu-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active .hamburger::after { transform: rotate(-45deg); bottom: 0; }

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 5, 0.98);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s ease-in-out;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-links {
  list-style: none;
  text-align: center;
  padding: 0;
}

.nav-links li { margin: 25px 0; }

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-family: monospace;
}

/* --- FOOTER STYLES --- */
#footer {
  padding: 60px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--accent-tech);
}

.footer-bottom p {
  font-size: 0.7rem;
  color: #444;
  letter-spacing: 1px;
}

/* --- RESPONSIVE BREAKPOINT --- */
@media (max-width: 768px) {
  .desktop-nav { display: none; } /* Hide standard nav */
  .menu-toggle { display: block; } /* Show burger */
  
  .footer-links {
      flex-direction: column;
      gap: 20px;
  }
}

/* --- SECTION 1: BESPOKE PRODUCTION --- */
.showreel {
  position: relative;
  width: auto;  
  height: 600px;
  aspect-ratio: 9 / 16;            
  overflow: hidden;
  margin: 0 auto;    
  border-radius: 12px; 
  margin-bottom: 50px;
}

.showreel-video {
  position: absolute;
  top: 50%;
  left: 50%;

  height: 100%;
  min-width: 100%;        /* чтобы видео не оставляло пустые зоны по ширине */
  min-height: 100%;       /* чтобы видео закрывало весь блок по высоте */
  transform: translate(-50%, -50%);
  object-fit: cover;      /* видео красиво обрезается под блок */
  z-index: 1;
  cursor: pointer;
  pointer-events: auto;   /* клики проходят на видео */
}

.showreel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3); /* лёгкий затемняющий слой */
  z-index: 2;
  pointer-events: none;         /* overlay не мешает кликам */
}

.showreel-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 0 1rem;
  pointer-events: none;         /* текст не мешает кликам */
}

.showreel-content h1 {
  font-size: clamp(1.5rem, 2vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.showreel-content p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  opacity: 0.85;
}

#playButton {
  background: #000;
  border: 1px solid #000;
  color: #fff;
  padding: 12px 30px;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: 0.3s ease;
}

#playButton:hover {
  background: #ffffff;
  color: #000000;
}

.showreel-video {
  pointer-events: auto; /* клики на видео теперь обрабатываются */
  cursor: pointer;
}
.showreel-overlay {
  pointer-events: none; /* overlay не блокирует клики */
}
.showreel-content {
  pointer-events: none; /* текст не блокирует клики */
}

/* Планшет */
@media (max-width: 1024px) {
  .showreel {
      width: 50%;
  }
}

/* Мобильный */
@media (max-width: 768px) {
  .showreel {
      width: 100%;
      margin-top: 0;
      border-radius: 0; 
  }

  .header__inner {
    margin-top: 0;
  }

  .about,
  .gallery,
  .contact {
    padding: 0 !important;
  }
}
.label-showreel { 
  letter-spacing: 15px; text-transform: uppercase; font-size: 0.65rem; 
  color: var(--text-dim); margin-bottom: 20px; 
}
/* --- BESPOKE MAIN SECTION --- */
.bespoke-production {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #000;
    color: #fff;
    padding-bottom: 30px;
    padding-top: 70px;
    width: 100%;
}
.bespoke-header {
  margin-bottom: 50px; 
  text-align: center;
}
.bespoke-container {
  display: flex;
  max-width: 1100px;
  margin: 0 auto ;
}

.bespoke-item {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 50px;
    padding: 20px;
}
.bespoke-text {
    flex: 1;
}
.bespoke-title p { color: var(--text-dim); font-size: 1rem; margin: 20px auto; }
.bespoke-title {
  font-family: monospace;
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  text-align: center;
}
.bespoke-title>span {
  font-size: 1.3rem;
  vertical-align: middle;
}
/* --- MOBILE-ONLY LAYOUT CHANGES --- */
@media (max-width: 768px) {
    
  /* 1. Bespoke Section: Stack blocks vertically (one below another) */
  .bespoke-container {
      display: flex !important;
      flex-direction: column !important;
      gap: 20px !important; /* Space between the blocks */
      padding: 20px !important;
      margin: 0 !important;
  }

  /* 2. Remove borders and backgrounds to match workflow style */
  .bespoke-item {
      display: block !important;
      border: none !important;
      background: transparent !important;
      padding: 0 !important;
      margin-bottom: 20px !important;
      text-align: left !important;
  }

  /* 3. Align text and titles to the left */
  .bespoke-text {
      text-align: left !important;
      padding: 0 !important;
  }

  .bespoke-text h3 {
      color: var(--accent-tech) !important; /* Blue color for titles */
      font-size: 1.1rem !important;
      margin-bottom: 10px !important;
      text-transform: uppercase !important;
  }

  .bespoke-text p {
      color: var(--text-dim) !important;
      font-size: 0.9rem !important;
      line-height: 1.6 !important;
      text-align: left !important;
  }

  /* 4. Ensure images (if any) are also left-aligned and full width */
  .bespoke-image {
      width: 100% !important;
      border: none !important;
      margin-top: 15px !important;
  }

  /* 5. Hide any numbering signs if they exist in Bespoke */
  .bespoke-item .card-num {
      display: none !important;
  }
}
.subtitle {
  color: #888;
}
/* Typography */
.card-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 25px;
}
.card-num {
    color: #1A5FB4; /* Navy */
    font-family: monospace;
    font-weight: bold;
    font-size: 0.9rem;
}

.bespoke-text h3 {
    color: #ffffff;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1rem;
    margin: 0;
}

.card-header {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 25px;
}

.card-num {
  color: #1A5FB4; /* Navy Accent */
  font-family: monospace;
  font-weight: bold;
  font-size: 0.9rem;
}

.bespoke-text p {
  color: #888888;
  line-height: 1.8;
  font-size: 0.95rem;
  margin: 0;
  text-align: left;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .bespoke-item, 
  .bespoke-item:nth-child(even) {
      flex-direction: column;
      gap: 30px;
      text-align: left;
  }
  
  .bespoke-container {
      margin-top: 60px;
  }
}

/* --- SECTION 2: AI WORKFLOWS --- */
.workflows {
  padding: 70px 20px;
  text-align: center;
  background-color: #080808;
  position: relative;
  /* Subtle blueprint grid */
  background-image: 
        linear-gradient(rgba(26, 95, 180, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 95, 180, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.container { max-width: 1200px; margin: 0 auto; }

.wf-header { margin-bottom: 80px; display: flex; flex-direction: column;  }
.wf-header h2 { 
  font-family: monospace; font-size: 2.5rem; letter-spacing: -1px;
  text-transform: uppercase; color: var(--accent-tech); 
}
.wf-header p { color: var(--text-dim); font-size: 1rem; margin: 20px auto; }
.wf-title {
  font-family: monospace;
  font-size: 2.2rem;
  margin-bottom: 40px;
  text-transform: uppercase;
}
.wf-title>span {
  font-size: 1.3rem;
  vertical-align: middle;
}
.solution-container {
  max-width: 800px; 
  margin: 0 auto;
}
p..wf-header {
  margin-bottom: 90px;
  text-align: center;
}

.wf-title {
  font-family: monospace;
  font-size: 0.9rem;
  letter-spacing: 4px;
  color: var(--gray-muted);
  text-transform: uppercase;
  margin-bottom: 50px;
}

/* Problem/Solution Block */
.solution-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; /* Restores the morning desktop layout */
  text-align: left !important;
  margin: 0 auto 50px 0 !important; /* Align to the left of the container */
  max-width: 850px !important;
}

p.problem-text {
  color: var(--red-alert);
  font-family: monospace;
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 25px;
  text-transform: uppercase;
}

p.solution-text {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.45;
  border-left: 4px solid var(--navy-accent);
  padding-left: 30px;
  margin: 0;
  font-weight: 400;
  text-align: left;
}

/* The 3-Block Grid */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}
.wf-card {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  padding: 40px;
  transition: 0.3s ease;
}

.card-header {
  display: flex;
  align-items: baseline; 
  gap: 15px;           
  margin-bottom: 20px;
}

.card-num {
  color: var(--navy-accent);
  font-family: monospace;
  font-weight: bold;
  font-size: 0.9rem;
}

.wf-card h3 {
  color: #ffffff;
  font-family: monospace;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0; 
}

.wf-card p {
  text-align: left;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.6;
}
/* Mobile Tweak */
@media (max-width: 768px) {
  .solution-text {
      font-size: 1.3rem;
      padding-left: 20px;
  }
}
.workflow-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 60px;
}

.wf-card {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  padding: 20px;
  transition: 0.3s ease;
  text-align: left;
}

.wf-card:hover {
  border-color: #1A5FB4; /* Hover turns Navy */
  transform: translateY(-5px);
}

.wf-card h3 {
  font-family: monospace;
  font-size: 1rem;
  color: #1A5FB4; /* NAVY */
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wf-card p {
  color: #888;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.nodes-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px;
}
.node-card {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(26, 95, 180, 0.2);
  padding: 50px; position: relative;
  transition: 0.5s;
}
.node-card:hover {
  border-color: var(--accent-tech);
  background: rgba(26, 95, 180, 0.05); /* Very subtle navy tint on hover */
}

/* The 'Node' connection visual */
.node-card::before {
  content: ""; position: absolute; top: -20px; left: 50%;
  width: 1px; height: 20px; background: var(--accent-tech); opacity: 0.3;
}

.node-card h3 { 
  font-family: monospace; font-size: 1.2rem; margin-bottom: 20px; 
  display: flex; align-items: center; gap: 10px;
}
.node-card h3::before {
  content: "●"; font-size: 0.8rem; color: var(--accent-tech);
}
.node-card p { font-size: 0.95rem; line-height: 1.8; color: #bbb; margin: 0; }

/* --- CTA --- */
.contact-area { padding: 120px 0; text-align: center; background: #000; }
.contact-btn {
  cursor: pointer;
  display: inline-block; padding: 18px 50px; border: 1px solid var(--accent-tech);
  color: var(--accent-tech); text-decoration: none; font-size: 0.75rem;
  letter-spacing: 4px; text-transform: uppercase; transition: 0.3s;
}
.contact-btn:hover { background: var(--accent-tech); color: #000; font-weight: bold; }

/* --- PROJECT REQUEST FORM --- */
.project-request {
  padding: 100px 20px;
  background: #050505;
}
/* --- PROJECT REQUEST FORM FIXES --- */
.inquiry-form {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
  width: 100%; /* Ensures the row takes full width */
}

.form-group {
  flex: 1;
  display: flex; /* Ensures the input inside fills the group */
}

.inquiry-form input, 
.inquiry-form select, 
.inquiry-form textarea {
  width: 100%; /* Forces all elements to fill their container */
  box-sizing: border-box; /* Crucial: includes padding/border in the width calculation */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  color: #fff;
  font-family: monospace;
  font-size: 0.8rem;
  outline: none;
  transition: 0.3s;
  border-radius: 0; /* Keeps the sharp tech aesthetic */
}

/* Fix for Select height and alignment */
.inquiry-form select {
  height: 50px; /* Matches the vertical rhythm of text inputs */
  cursor: pointer;
  appearance: none; /* Removes default browser styling */
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
}

/* Mobile Tweak: Stack the rows */
@media (max-width: 768px) {
  .form-row {
      flex-direction: column;
      gap: 20px;
  }
}

/* --- IMAGE SLIDER --- */
.presentation-area {
  background: #050505;
  text-align: center;
}
.slider-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 40px auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;
  overflow: hidden; /* Clips the slides */
}

.slides-container {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

/* Navigation Buttons */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  padding: 15px 20px;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s;
  font-family: monospace;
}

.slider-nav:hover {
  background: var(--accent-tech);
  border-color: white;
}

.prev { left: 10px; }
.next { right: 10px; }

/* Mobile Optimizations */
@media (max-width: 768px) {
  .slider-nav {
      display: none; /* Hide buttons on mobile in favor of touch swipe */
  }
  .slides-container {
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      gap: 0;
  }
  .slide {
      scroll-snap-align: center;
  }
}

/* --- GLOBAL CENTERING FIXES --- */

/* Centers the content inside the Bespoke and Workflow sections */
.bespoke-container, 
.workflow-grid, 
.container,
.inquiry-form,
.slider-wrapper {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center; /* Ensures text and inline elements are centered */
}

/* Ensure the Bespoke items (cards) are centered and their text is readable */
.bespoke-item {
    justify-content: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure Workflow cards align their internal text properly while the grid is centered */
.wf-card {
    text-align: center;
}

/* Centers the Problem/Solution Block */
.solution-container {
    align-items: center !important; /* Overrides the previous flex-start */
    text-align: center !important;
    margin: 0 auto 50px auto;
}

p.solution-text {
    border-left: none; /* Removing the side border for better centering symmetry */
    border-top: 4px solid var(--navy-accent);
    padding-left: 0;
    padding-top: 20px;
    display: inline-block;
}

/* --- MOBILE SPECIFIC CENTERING --- */
@media (max-width: 768px) {
    .bespoke-item {
        padding: 20px 0;
    }

    /* Centers the contact button and form fields */
    .contact-area, .project-request {
        display: flex;
        flex-direction: column;
    }
}
/* --- GLOBAL CENTERING (DESKTOP) --- */
.bespoke-header, 
.wf-header, 
.solution-container, 
.bespoke-container, 
.workflow-grid, 
.inquiry-form, 
.slider-wrapper {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    max-width: 1100px; /* Adjust based on your preferred width */
}

/* Specific fix for the AI Workflows Title */
.wf-header h2 {
    text-align: center;
    width: 100%;
}

/* Center the solution text block while keeping its internal text clean */
.solution-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- MOBILE OVERRIDES (PHONES) --- */
@media (max-width: 768px) {
    /* Force everything to the LEFT on mobile */
    .bespoke-header, 
    .wf-header, 
    .wf-header h2,
    .solution-container, 
    .bespoke-text, 
    .wf-card, 
    .bespoke-title,
    .wf-title {
        text-align: left !important;
        align-items: flex-start !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Adjust the Solution Text border for left alignment */
    p.solution-text {
        border-left: 3px solid var(--navy-accent);
        border-top: none;
        padding-left: 20px;
        text-align: left;
    }

    /* Ensure headers fit mobile screens */
    .bespoke-title, .wf-header h2 {
        font-size: 1.5rem !important;
        line-height: 1.2;
    }
}

@media (max-width: 768px) {
  .bespoke-production, .bespoke-header { 
    padding-top: 15px;
  }
  .card-header {
    margin-bottom: 10px;
  }
  .bespoke-production {
    padding-bottom: 10px;
  }
  .presentation-area .bespoke-title {
    text-align: center !important;
  }
  .workflows {
    padding: 40px 20px;
  }
  .workflows .wf-title {
    margin-bottom: 10px;
  }
  .workflows .solution-container, 
  .workflows .wf-header {
    margin: 0;
  }
  .project-request {
    padding: 30px 20px;
  }
}
/* Custom Error Messages */
.error-message {
  color: #ff4d4d;
  font-size: 0.75rem;
  margin-top: 5px;
  display: none; /* JS will toggle this to block */
  text-align: left;
  font-weight: 500;
}

/* Red border for the input itself */
.input-error {
  border: 1px solid #ff4d4d !important;
  background-color: rgba(255, 77, 77, 0.05) !important;
}

/* Ensure form groups are stacked correctly for error placement */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
/* Success State Styling */
.success-container {
  text-align: left; /* Aligned left for mobile/desktop consistency */
  padding: 40px;
  background: rgba(26, 95, 180, 0.05);
  border-left: 4px solid var(--navy-accent);
  margin-bottom: 30px;
  animation: fadeIn 0.5s ease-out;
}

.success-icon {
  font-size: 2rem;
  color: var(--navy-accent);
  margin-bottom: 15px;
}

.success-container h3 {
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.success-container p {
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* Ensure fade-in works for both errors and success */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

/* Active state */
.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Popup box */
.popup-box {
  background: #ffffff;
  padding: 24px 28px;
  border-radius: 12px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

/* Animate upward when active */
.popup-overlay.active .popup-box {
  transform: translateY(0);
}

.popup-message {
  font-size: 15px;
  margin-bottom: 18px;
  color: #222;
}

.popup-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.popup-btn:hover {
  background: #333;
}