/* ==========================================================================
   Ajay Fashions — design tokens
   ========================================================================== */
:root {
  --navy: #2D2A7A;
  --navy-dark: #1E1C57;
  --navy-tint: #EEEDF9;
  --white: #FFFFFF;
  --gray-50: #F7F7F9;
  --gray-100: #EDEEF1;
  --gray-300: #CBCDD6;
  --gray-500: #7B7E8C;
  --gray-700: #4B4D59;
  --ink: #1B1B24;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Poppins', 'Inter', -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(30, 28, 87, 0.06);
  --shadow-md: 0 8px 30px rgba(30, 28, 87, 0.10);
  --shadow-lg: 0 20px 60px rgba(30, 28, 87, 0.18);
  --header-h: 76px;
  --container-w: 1200px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
/* Native scroll-behavior:smooth is intentionally NOT used site-wide — it fights with
   GSAP ScrollTrigger's pinned Products section (async browser scroll interpolation
   desyncs the pin's position math, corrupting layout). Anchor nav instead gets a
   GSAP-driven smooth scroll from main.js that stays in sync with ScrollTrigger. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body, h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  animation: bodyFadeIn 0.6s ease both;
}
@keyframes bodyFadeIn { from { opacity: 0; } to { opacity: 1; } }

.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 150;
  background: linear-gradient(90deg, #6C63FF, var(--navy) 55%, #E8B44A);
  transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}

.gradient-text {
  background: linear-gradient(90deg, #FFFFFF 0%, #4E8EFA 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Scroll reveal: JS adds .reveal-pending on load (only when it can also
   observe + un-hide it), then removes it once the element scrolls into
   view. The transition itself is plain CSS (compositor-driven) so it
   keeps animating smoothly even if a mobile browser throttles JS during
   an active touch-scroll fling. */
.reveal, .reveal-group > * { transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.reveal-pending, .reveal-group > *.reveal-pending { opacity: 0; transform: translateY(32px); }

/* Hero intro fade-in: same compositor-driven CSS transition as the reveal
   system above, not a GSAP tween — a visitor who scrolls immediately on
   landing can throttle main-thread rAF tweens on mobile before they finish. */
[data-hero-in] { transition: opacity 0.65s ease, transform 0.65s ease; }
[data-hero-in].hero-in-pending { opacity: 0; transform: translateY(22px); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--navy-dark); }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }

#top, #about, #products, #fabrics, #capabilities, #clients, #contact {
  scroll-margin-top: calc(var(--header-h) + 10px);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 12px 18px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid #6C63FF;
  outline-offset: 2px;
}

.eyebrow {
  font-family: var(--font-head); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy); font-size: 0.8rem; margin-bottom: 10px;
}
.section-lead { color: var(--gray-700); max-width: 620px; margin-top: 12px; font-size: 1.02rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 2px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px) scale(1.015); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn svg, .social-btn svg { display: block; flex-shrink: 0; }
.btn-whatsapp { line-height: 1; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: box-shadow 0.25s ease, border-color 0.25s ease;
  height: var(--header-h);
  display: flex; align-items: center;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-color: var(--gray-100); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { flex-shrink: 0; line-height: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: 'Playfair Display', var(--font-head); font-weight: 700; font-style: italic; font-size: 1.2rem; letter-spacing: 0.01em; color: var(--navy-dark); }
.brand-text em { font-style: normal; font-size: 0.68rem; color: var(--gray-500); letter-spacing: 0.03em; }

.main-nav ul { display: flex; gap: 30px; }
.main-nav a { font-weight: 500; font-size: 0.95rem; color: var(--ink); position: relative; padding: 6px 0; }
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--navy);
  transition: width 0.2s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-dark); transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden;
  padding: 60px 0 90px; color: #fff;
}
.hero-inner { width: 100%; }
.hero-text { text-align: center; max-width: 720px; margin: 0 auto; }

.hero-bg {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.06), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.05), transparent 45%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
}
#hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: reduce) { #hero-particles { display: none; } }

.hero .eyebrow { color: #BFDBFE; text-shadow: 0 2px 12px rgba(10,9,40,0.5); }
.hero h1 { max-width: 680px; margin: 0 auto; text-shadow: 0 4px 26px rgba(10,9,40,0.55); }
.hero-sub { color: #E3ECFF; max-width: 560px; margin: 18px auto 0; font-size: 1.08rem; text-shadow: 0 2px 14px rgba(10,9,40,0.5); }
.hero-ctas { display: flex; gap: 16px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero .btn-outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--navy); }

.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); }
.scroll-cue span {
  display: block; width: 22px; height: 36px; border: 2px solid rgba(255,255,255,0.5); border-radius: 20px; position: relative;
}
.scroll-cue span::before {
  content: ''; position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; background: #fff; border-radius: 2px;
  transform: translateX(-50%); animation: scrollCue 1.6s ease infinite;
}
@keyframes scrollCue { 0% { opacity: 1; top: 6px; } 70% { opacity: 0; top: 18px; } 100% { opacity: 0; top: 18px; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span::before { animation: none; } }

/* ==========================================================================
   About
   ========================================================================== */
.about { padding: 110px 0; }
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: start; }
.about-copy p { color: var(--gray-700); margin-top: 16px; }
.about-copy .btn { margin-top: 28px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat-card {
  background: var(--navy-tint); border-radius: var(--radius-md); padding: 26px 20px; text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.stat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); background: #fff; }
.stat-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--navy); }
.stat-label { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--gray-700); }

/* ==========================================================================
   Products — scroll-reveal centerpiece
   ========================================================================== */
.products-section { position: relative; background: var(--gray-50); }
.products-pin {
  height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; text-align: center; position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 18px) 24px 20px;
}
.products-heading-block { flex: 0 0 auto; }
.products-eyebrow { }
.products-heading { max-width: 600px; margin-bottom: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); }

.products-stage {
  position: relative; width: 100%; max-width: 820px; margin: 0 auto;
  flex: 1 1 auto; min-height: 0;
}
.products-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; line-height: 0;
  filter: drop-shadow(0 10px 24px rgba(45,42,122,0.25));
}

.product-item {
  position: absolute; top: 50%; left: 50%;
  display: flex; flex-direction: column; align-items: center; text-align: center; width: 168px;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}
.product-badge {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px; flex-shrink: 0;
  border: 1px solid var(--gray-100);
}
.product-badge svg { display: block; }
.product-text strong { display: block; font-family: var(--font-head); font-size: 0.88rem; color: var(--navy-dark); margin-bottom: 3px; }
.product-text em { font-style: normal; font-size: 0.72rem; color: var(--gray-500); line-height: 1.35; display: block; }

.products-footer { flex: 0 0 auto; }
.products-progress { display: flex; gap: 8px; justify-content: center; margin-top: 6px; }
.products-progress span { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-300); transition: background 0.25s ease, transform 0.25s ease; }
.products-progress span.active { background: var(--navy); transform: scale(1.3); }

.products-cta { margin-top: 16px; }

/* Static / reduced-motion / mobile fallback grid */
.products-stage.static-grid {
  height: auto; flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; max-width: 900px;
}
.products-stage.static-grid .products-logo { display: none; }
.products-stage.static-grid .product-item { position: static; transform: none; opacity: 1; width: auto; }
.products-stage.static-grid .product-badge { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.products-stage.static-grid .product-item:hover .product-badge { transform: translateY(-4px) scale(1.06); box-shadow: var(--shadow-lg); }

@media (max-height: 720px) {
  .products-heading { font-size: 1.25rem; }
  .products-eyebrow { margin-bottom: 4px; }
}

/* ==========================================================================
   Fabrics
   ========================================================================== */
.fabrics { padding: 100px 0; text-align: center; }
.fabrics h2 { max-width: 640px; margin: 0 auto; }
.fabrics .section-lead { margin-left: auto; margin-right: auto; }
.fabric-tags { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }
.fabric-tags li {
  padding: 10px 22px; border: 1.5px solid var(--gray-300); border-radius: 999px; font-weight: 500;
  font-size: 0.9rem; color: var(--navy-dark);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.fabric-tags li:hover { border-color: var(--navy); background: var(--navy-tint); transform: translateY(-3px); box-shadow: var(--shadow-sm); }

/* ==========================================================================
   Capacity
   ========================================================================== */
.capacity { padding: 100px 0; background: var(--navy); color: #fff; text-align: center; }
.capacity .eyebrow { color: rgba(255,255,255,0.7); }
.capacity h2 { color: #fff; max-width: 620px; margin: 0 auto; }
.capacity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 46px; }
.capacity-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-md);
  padding: 30px 16px; transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.capacity-card:hover { transform: translateY(-6px); background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
.capacity-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; }
.capacity-label { display: block; margin-top: 8px; font-size: 0.82rem; color: rgba(255,255,255,0.75); }

/* ==========================================================================
   Clients
   ========================================================================== */
.clients { padding: 100px 0; text-align: center; }
.clients h2 { max-width: 680px; margin: 0 auto; }
.clients .section-lead { margin-left: auto; margin-right: auto; }
.client-marquee { margin-top: 56px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 46px; width: max-content; animation: marquee 32s linear infinite; }
.client-marquee:hover .marquee-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; } }
.marquee-track span { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--gray-300); white-space: nowrap; transition: color 0.2s ease; }
.marquee-track span:hover { color: var(--navy); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding: 110px 0; background: var(--gray-50); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.info-list { margin-top: 30px; display: flex; flex-direction: column; gap: 20px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-icon { font-size: 1.15rem; line-height: 1.4; }
.info-list a { color: var(--navy); font-weight: 500; }
.info-list a:hover { text-decoration: underline; }

.contact-quick-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.map-embed { margin-top: 34px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.map-embed iframe { width: 100%; height: 260px; border: 0; display: block; }

.card-form {
  background: #fff; border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md);
}
.card-form h3 { margin-bottom: 6px; }
.form-row { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); }
.form-row label span { color: #C0392B; margin-left: 3px; }
.form-row input, .form-row textarea, .form-row select {
  padding: 12px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); background: #fff;
  transition: border-color 0.2s ease;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--navy); }
.form-row textarea { resize: vertical; }
.card-form .btn-block { margin-top: 22px; }
.form-note { font-size: 0.85rem; margin-top: 12px; min-height: 1.2em; }
.form-note.success { color: #1E7E34; }
.form-note.error { color: #C0392B; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.85); padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.6); line-height: 1.6; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact p { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-bottom: 10px; line-height: 1.5; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.social-btn:hover { background: #fff; color: var(--navy); border-color: #fff; transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0; text-align: center; }
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.55); }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 19, 51, 0.55); backdrop-filter: blur(2px); }
.modal-panel {
  position: relative; background: #fff; border-radius: var(--radius-lg); padding: 36px; max-width: 480px; width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-panel { animation: none; } }
.modal-sub { color: var(--gray-500); font-size: 0.9rem; margin-top: 6px; }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: var(--gray-100); border: none; width: 34px; height: 34px;
  border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--gray-700);
}
.modal-close:hover { background: var(--gray-300); }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 300;
  background: var(--navy-dark); color: #fff; padding: 14px 24px; border-radius: 999px; font-size: 0.9rem;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .capacity-grid { grid-template-columns: 1fr 1fr; }
}

.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: #fff;
  padding: 30px 24px; transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto;
  z-index: 99;
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav ul { flex-direction: column; gap: 4px; }
.mobile-nav a { display: block; padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--gray-100); }

@media (min-width: 861px) {
  .mobile-nav { display: none; }
}

@media (max-width: 860px) {
  .desktop-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary.btn-sm { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .about, .fabrics, .capacity, .clients, .contact { padding: 70px 0; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .capacity-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .card-form { padding: 26px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; }
  .products-stage.static-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .products-stage.static-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
  .capacity-grid { grid-template-columns: 1fr; }
}
