/* ==========================================================================
   RED CANOPIES LTD - MAIN STYLESHEET
   ========================================================================== */

/* 1. CSS VARIABLES & ROOT SETTINGS */
:root {
  --bg: #080f1b;
  --surface: #121d2f;
  --surface-soft: #1b2942;
  --surface-alt: #162236;
  --text: #f8fafc;
  --muted: #9fb3c8;
  --primary: #dc2626;
  --primary-soft: #f97316;
  --accent: #fbbf24;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.25);
  --radius: 24px;
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, rgba(220, 38, 38, 0.16), transparent 25%), linear-gradient(180deg, #080f1b 0%, #050810 100%);
  color: var(--text);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1160px, calc(100% - 1rem));
  margin: 0 auto;
}

/* 2. INTERACTIVE HEADER & NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(4, 10, 22, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-logo {
  width: auto;
  height: 54px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem;
}

.brand-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}

.brand-tag {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
  white-space: nowrap;
}
/* Mobile Toggle Styles */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  transition: background-color var(--transition);
}

.nav-toggle:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* The Three Lines Bar Styling */
.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Transformation to 'X' Close State */
.nav-toggle.is-active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Screen Breakpoints for Mobile Navigation Toggle Display */
@media (max-width: 991px) {
  .nav-toggle {
    display: flex;
  }
}
/* Mobile Toggle Styles */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #333;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-active .icon-open {
  display: none;
}

.nav-toggle.is-active .icon-close {
  display: inline-block;
}

/* Screen Breakpoint for Mobile Navigation */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu-wrapper {
    display: none;
    width: 100%;
    padding-top: 15px;
  }

  .nav-menu-wrapper.is-open {
    display: block;
  }

  .site-nav {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links-wrapper {
    flex-direction: column;
    width: 100%;
  }
}
/* SEARCH COMPONENT IN HEADER */
.search-container {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
  height: 38px;
}

.search-input {
  border: none;
  outline: none;
  padding: 0 10px;
  font-size: 0.85rem;
  color: #0f172a;
  background: transparent;
  width: 180px;
}

.search-input::placeholder {
  color: #64748b;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: #dc2626;
  color: #ffffff;
  border: none;
  outline: none;
  padding: 0 12px;
  height: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.search-button:hover {
  background-color: #b91c1c;
}

/* 3. FLOATING MAINTENANCE BADGE */
@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.maintenance-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 50px;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pulse-container {
  position: relative;
  display: flex;
  width: 10px;
  height: 10px;
}

.pulse-outer {
  position: absolute;
  display: inline-flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #f59e0b;
  opacity: 0.75;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-inner {
  position: relative;
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #d97706;
}

/* 4. HERO & BENTO GRID SECTION */
.hero-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  min-height: 90vh;
  padding: 3.5rem 6%;
  gap: 3.5rem;
  align-items: center;
  background-color: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
}

.left-column {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge-container {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 1.25rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: #2563eb;
  border-radius: 50%;
}

.badge-text {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem 0;
  color: #0f172a;
}

.hero-description {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 2rem 0;
  max-width: 620px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  box-sizing: border-box;
}

.bento-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-sizing: border-box;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}

.bento-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #0f172a;
}

.bento-text {
  color: #475569;
  font-size: 0.88rem;
  margin: 0;
}

/* 5. INTERACTIVE PROCUREMENT ENGINE INTERFACE */
.right-column {
  width: 100%;
  box-sizing: border-box;
}

.engine-card {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.engine-header {
  background: #f8fafc;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.engine-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-indicator {
  width: 10px;
  height: 10px;
  background: #16a34a;
  border-radius: 50%;
}

.engine-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  color: #0f172a;
}

.status-badge {
  font-size: 0.75rem;
  background: #e2e8f0;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  color: #334155;
}

.engine-feed {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #ffffff;
  box-sizing: border-box;
}

.engine-welcome-msg {
  max-width: 88%;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  align-self: flex-start;
  box-sizing: border-box;
}

.faq-matrix {
  padding: 0.85rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  box-sizing: border-box;
}

.faq-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.faq-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.input-interface {
  display: flex;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  box-sizing: border-box;
}

.engine-input {
  flex: 1;
  border: none;
  padding: 1.1rem;
  outline: none;
  font-size: 0.88rem;
  box-sizing: border-box;
}

.engine-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 0 1.5rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.engine-btn:hover {
  background: #b91c1c;
}

/* 6. ABOUT SECTION */
.about-section {
  background-color: #ffffff;
  color: #0f172a;
  padding: 5rem 6%;
  box-sizing: border-box;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.about-header {
  margin-bottom: 2rem;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
}

.about-subtitle {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #dc2626;
  display: block;
  margin-bottom: 0.25rem;
}

.about-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0;
  color: #0f172a;
}

.history-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  box-sizing: border-box;
  width: 100%;
}

.history-content {
  box-sizing: border-box;
  text-align: left;
}

.history-heading {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.history-p1, .history-p2 {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.65;
  margin: 0 0 1rem 0;
}

.vision-mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
  box-sizing: border-box;
}

.card-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 2.5rem;
  box-sizing: border-box;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card-heading {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.card-p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

.values-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  text-align: center;
  color: #0f172a;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  box-sizing: border-box;
}

.value-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  background: #ffffff;
  box-sizing: border-box;
}

.val-1 {
  border-top: 3px solid #dc2626;
}

.val-2, .val-3, .val-4, .val-5 {
  border-top: 3px solid #111827;
}

.value-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.value-p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* 7. SERVICES & PRODUCT SECTIONS */
.section-header {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.services, .products, .contact {
  padding: 4rem 0;
}

.services-subtitle {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #dc2626;
  display: block;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 2rem;
  transition: transform var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 38, 38, 0.4);
}

.service-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--primary);
  border-radius: 18px;
  background: rgba(220, 38, 38, 0.08);
  margin-bottom: 1.5rem;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 1.5rem;
}

.filter-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.5);
}

.product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1.75rem;
  transition: transform var(--transition), border-color var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 38, 38, 0.45);
}

.product-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.product-meta {
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.loading-card {
  display: grid;
  place-items: center;
  min-height: 240px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 8. CONTACT FORM & FOOTER */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-info div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1rem 1.2rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 2rem;
}

.contact-form label {
  display: grid;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-primary:hover {
  background: #b91c1c;
}

.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem 0;
  width: 100%;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-inner p {
  font-size: 0.88rem;
  color: #64748b;
  text-align: center;
  margin: 0;
}

/* 9. RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .service-grid,
  .product-list,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 84px;
    right: -100%;
    width: min(320px, 85vw);
    height: calc(100vh - 84px);
    background: rgba(8, 15, 27, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.75rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .site-nav.open {
    right: 0;
  }

  .nav-links-wrapper {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-link {
    width: 100%;
    font-size: 1.05rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link::after {
    display: none;
  }

  .search-container {
    width: 100%;
    margin-top: 0.5rem;
  }

  .search-input {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .bento-grid,
  .faq-matrix {
    grid-template-columns: 1fr;
  }
}