/* ==========================================================
   INSD Hisar — Bespoke stylesheet
   Tailwind handles utility classes; this file holds:
   - custom properties / resets
   - the signature "tailor's tape" + hero motifs
   - component styles that are awkward as pure Tailwind
   - keyframe animations
   ========================================================== */

:root {
  --ink: #0a0a0b;
  --ink-2: #141416;
  --paper: #faf9f7;
  --maroon: #7a0f22;
  --maroon-dark: #520a17;
  --gold: #c9a227;
  --gold-light: #e8cf7a;
}

* { scroll-behavior: smooth; }

html { scroll-padding-top: 90px; }

body {
  font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Playfair Display', serif;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* ---------- Header state ---------- */
#site-header.scrolled {
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(201, 162, 39, 0.15);
}

.mobile-link {
  border-bottom: 1px solid rgba(250, 249, 247, 0.08);
  padding-bottom: 1rem;
}

/* ---------- Hero ---------- */
.hero-seal {
  animation: seal-fade-in 1.2s ease 0.6s both, seal-spin 40s linear infinite;
}
@keyframes seal-fade-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes seal-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-seal span:not(.absolute) { animation: none; }

.scroll-cue span:first-child { animation: cue-pulse 2s ease-in-out infinite; }
@keyframes cue-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---------- Course tabs ---------- */
.course-tab {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border: 1px solid rgba(10,10,11,0.2);
  color: rgba(10,10,11,0.6);
  background: transparent;
  transition: all 0.35s ease;
  cursor: pointer;
}
.course-tab.active-tab {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--paper);
}

.course-card {
  background: #fff;
  border: 1px solid rgba(10,10,11,0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(10,10,11,0.25);
}

/* ---------- Masonry gallery ---------- */
.masonry-item {
  break-inside: avoid;
  overflow: hidden;
  position: relative;
}
.masonry-item img {
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1), filter 0.6s ease;
  filter: grayscale(20%);
}
.masonry-item:hover img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

/* ---------- Placements logo marquee ---------- */
.logo-marquee-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.logo-marquee {
  width: max-content;
  animation: marquee 28s linear infinite;
}
.logo-marquee img { filter: grayscale(100%) brightness(2); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Campus grid ---------- */
.campus-item {
  position: relative;
}
.campus-item img {
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: grayscale(15%);
}
.campus-item:hover img {
  transform: scale(1.08);
  filter: grayscale(0%);
}

/* ---------- FAQ ---------- */
.faq-a { transition: max-height 0.4s ease; }
.faq-icon { transition: transform 0.35s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ---------- Testimonial slider ---------- */
#testimonial-slider { overflow: hidden; }

/* ---------- Reveal-on-scroll base state (GSAP controls the animation) ---------- */
.reveal-up, .why-card, .course-card, .faculty-card, .stat-block {
  will-change: transform, opacity;
}

/* ---------- Utility: thin gold rule divider echoing a tailor's tape ---------- */
.tape-divider {
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(201,162,39,0.6) 0px,
    rgba(201,162,39,0.6) 1px,
    transparent 1px,
    transparent 8px
  );
}

/* ---------- Scrollbar (subtle, premium) ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--gold-dark, #8f7318); border-radius: 4px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
