/*
 * SRI MURUGAN SPIRAL BINDING
 * Centralized Global Spacing & Layout Architecture
 * Source of Truth: global.css
 */

:root {
  --ink-blue: #0f172a;
  --press-purple: #4f46e5;
  --vivid-orange: #ea580c;
  --gold: #8b5cf6;
  --light: #f8fafc;
  --mid: #cbd5e1;
  --text-main: #334155;
  --text-muted: #64748b;
}

/* 1. Reset and Core Bases */
* { margin: 0; padding: 0; box-sizing: border-box; }
html,
body {
  overflow-x: hidden;
  max-width: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--light);
  color: var(--ink-blue);
}
h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: -0.01em;
}

/* 2. Global Page Container System */
.page-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  width: 100%;
}

/* 3. Global Section Spacing */
.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.section-padding-sm {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.section-padding-lg {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* 4. Global Navbar Layout */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.4s ease;
  padding: 1.2rem 0;
}
@media (max-width: 1023px) {
  #navbar {
    padding: 0.5rem 0 !important;
  }
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  padding: 0.7rem 0;
  box-shadow: 0 4px 30px rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
@media (max-width: 1023px) {
  #navbar.scrolled {
    padding: 0.35rem 0 !important;
  }
}
#navbar .page-container {
  min-height: 44px;
}
.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--press-purple);
  transition: width 0.3s ease;
}
.nav-link:hover { color: var(--press-purple); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--press-purple); }
.nav-link.active::after { width: 100%; }

/* Mobile menu animation is handled by the responsive section below */

/* 5. Button System */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--press-purple);
  color: white;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2.2rem;
  border-radius: 4px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  background: #3b32c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--press-purple);
  color: var(--press-purple);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.83rem 2.2rem;
  border-radius: 4px;
  transition: all 0.3s;
}
.btn-outline:hover {
  background: rgba(79, 70, 229, 0.05);
  transform: translateY(-2px);
}

/* 6. Global Hero Layout */
/* Full-screen hero for home page */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* Compact page hero for sub-pages (About, Products, Contact) */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.hero-container {
  padding-top: 8rem;
  padding-bottom: 5rem;
  position: relative;
  z-index: 10;
}
/* Sub-page hero container gets less bottom padding since no full-screen effect */
.page-hero .hero-container {
  padding-top: 8rem;
  padding-bottom: 4rem;
}

/* 7. Image Rules & Gallery Transitions */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.gallery-item:hover img {
  transform: scale(1.1);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.85) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* 8. Global Card System */
.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(15,23,42,0.04);
  transition: all 0.4s ease;
  cursor: pointer;
  border: 1px solid rgba(15,23,42,0.06);
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15,23,42,0.08);
}
.product-card .card-img {
  overflow: hidden;
  height: 200px;
}
.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .card-img img {
  transform: scale(1.08);
}
.card-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--press-purple), var(--gold));
}

/* 8b. Category specific cards */
.prod-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(15,23,42,0.03);
  transition: all 0.4s ease;
  cursor: pointer;
  border: 1px solid rgba(15,23,42,0.05);
}
.prod-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(15,23,42,0.09);
}
.prod-card .img-wrap {
  overflow: hidden;
  position: relative;
}
.prod-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.prod-card:hover .img-wrap img {
  transform: scale(1.08);
}
.prod-card .img-wrap .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--press-purple);
  color: white;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}
.card-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--press-purple), var(--gold));
}

/* 8c. Value & Feature Cards */
.feature-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid var(--mid);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--press-purple), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.feature-card:hover {
  box-shadow: 0 12px 40px rgba(15,23,42,0.06);
  transform: translateY(-4px);
}
.feature-card:hover::before {
  transform: scaleX(1);
}
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--press-purple), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.value-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  border-left: 4px solid var(--press-purple);
  box-shadow: 0 2px 20px rgba(15,23,42,0.03);
  transition: all 0.3s;
  border-top: 1px solid rgba(15,23,42,0.05);
  border-right: 1px solid rgba(15,23,42,0.05);
  border-bottom: 1px solid rgba(15,23,42,0.05);
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(15,23,42,0.08);
}

.info-card {
  background: white;
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 2px 20px rgba(15,23,42,0.03);
  transition: all 0.3s;
  border: 1px solid rgba(15,23,42,0.05);
  border-left: 3px solid transparent;
}
.info-card:hover {
  border-left-color: var(--press-purple);
  transform: translateX(4px);
  box-shadow: 0 12px 35px rgba(15,23,42,0.07);
}
.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(79,70,229,0.2);
}

/* 9. Global Typography & Decor Layouts */
.section-label {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--press-purple);
  border-left: 3px solid var(--press-purple);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}
.cmyk-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--press-purple), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.scroll-line {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.scroll-line span {
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--press-purple), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* 10. Global Spacing Utilities */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-left.visible { opacity: 1; transform: translateX(0); }
.fade-right { opacity: 0; transform: translateX(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-right.visible { opacity: 1; transform: translateX(0); }

/* 11. Consistent section heading blocks */
.section-heading-block {
  text-align: center;
  margin-bottom: 3.5rem;
}

/* 12. Footer global link colors */
footer a {
  color: rgba(255,255,255,0.6);
  transition: color 0.3s;
}
footer a:hover {
  color: var(--press-purple);
}

/* 13. Ink splat decoration */
.ink-splat {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

/* ============================================================
   MOBILE-FIRST RESPONSIVE SYSTEM
   Breakpoints: 640px (sm), 768px (md), 1024px (lg)
   ============================================================ */

/* --- MOBILE MENU ANIMATION --- */
#mobile-menu {
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}
@media (min-width: 768px) {
  #mobile-menu {
    display: none !important;
  }
}

/* --- HAMBURGER ICON --- */
#hamburger {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s;
}
#hamburger:hover { background: rgba(15,23,42,0.05); }

@media (min-width: 768px) {
  #hamburger {
    display: none !important;
  }
}

/* --- MOBILE NAV LINKS --- */
#mobile-menu .nav-link {
  display: block;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
#mobile-menu .nav-link:hover { background: rgba(79,70,229,0.05); }
#mobile-menu .nav-link::after { display: none; }

/* --- SMALL MOBILE (max 640px) --- */
@media (max-width: 639px) {

  /* Container */
  .page-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Section spacing — tighter on phones */
  .section-padding-lg { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .section-padding    { padding-top: 3rem;   padding-bottom: 3rem; }
  .section-padding-sm { padding-top: 2rem;   padding-bottom: 2rem; }

  /* Hero — full-screen */
  .hero-container {
    padding-top: 6.5rem;
    padding-bottom: 3rem;
  }
  .page-hero .hero-container {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  /* Hero — reduce min-height on phones */
  .hero-section {
    min-height: 85vh;
  }

  /* Typography scaling */
  h1 { font-size: clamp(2rem, 8vw, 3rem) !important; }
  h2 { font-size: clamp(1.6rem, 6vw, 2.4rem) !important; }
  h3 { font-size: clamp(1.2rem, 5vw, 1.8rem) !important; }

  /* Buttons — full-width stacking on very small screens */
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline {
    width: 100%;
    justify-content: center;
  }

  /* Cards */
  .product-card .card-img { height: 180px; }
  .feature-card { padding: 1.5rem; }
  .value-card   { padding: 1.5rem; }
  .info-card    { padding: 1.25rem; }

  /* Gallery — equal height on small phones */
  .gallery-item { height: 180px !important; }

  /* Stats band tighter */
  .stat-num { font-size: 2.5rem !important; }

  /* Footer stack */
  footer .grid { grid-template-columns: 1fr !important; gap: 2rem !important; }

  /* Section labels centered on mobile */
  .section-label.mx-auto { margin-left: auto; margin-right: auto; }
}

/* --- TABLET (641px – 767px) --- */
@media (min-width: 640px) and (max-width: 767px) {
  .page-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .section-padding-lg { padding-top: 4rem; padding-bottom: 4rem; }
  .section-padding    { padding-top: 3.5rem; padding-bottom: 3.5rem; }

  .hero-container { padding-top: 7rem; padding-bottom: 3.5rem; }
  .hero-section   { min-height: 90vh; }

  .gallery-item { height: 200px !important; }
  .product-card .card-img { height: 190px; }
}

/* --- MEDIUM SCREENS (768px – 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-container { padding-top: 7.5rem; }
  .gallery-item { height: 220px !important; }
}

/* Keyframes */
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* Floating Action Buttons */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.floating-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-size: 1.4rem;
  border: none;
  outline: none;
  cursor: pointer;
}

.floating-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.floating-btn:active {
  transform: translateY(-1px);
}

.floating-btn.whatsapp {
  background: #25d366;
}

.floating-btn.whatsapp:hover {
  background: #20ba5a;
}

.floating-btn.call {
  background: #4f46e5; /* --press-purple */
}

.floating-btn.call:hover {
  background: #4338ca;
}

.floating-btn.back-to-top {
  background: #0f172a; /* --ink-blue */
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
}

.floating-btn.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.floating-btn.back-to-top.visible:hover {
  transform: scale(1) translateY(-4px);
}

/* Mobile responsive adjustments */
@media (max-width: 639px) {
  .floating-actions {
    bottom: 1.5rem;
    right: 1.5rem;
    gap: 0.5rem;
  }
  .floating-btn {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
}

/* Phone Dropdown Popup styles */
.phone-dropdown-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-dropdown {
  position: absolute;
  bottom: calc(100% + 0.75rem); /* Position above the phone button */
  right: 60px; /* Shifted left to prevent overlapping the WhatsApp button directly above */
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 160px;
  z-index: 1010;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transform-origin: bottom right;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.phone-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.phone-dropdown-item i {
  color: var(--press-purple);
  font-size: 0.85rem;
}

.phone-dropdown-item:hover {
  background: rgba(79, 70, 229, 0.06);
  color: var(--press-purple);
}

/* Adjust dropdown position for mobile screens */
@media (max-width: 639px) {
  .phone-dropdown {
    right: 52px;
    bottom: calc(100% + 0.5rem);
  }
}


