/* ===========================================
   FBS Builders & Architects — Stylesheet
   =========================================== */

:root {
  --navy: #1f2566;
  --navy-deep: #161a4a;
  --navy-light: #2c3380;
  --gold: #c9a14a;
  --cream: #f7f5ef;
  --white: #ffffff;
  --grey-100: #f4f4f6;
  --grey-200: #e6e6ec;
  --grey-400: #9a9aab;
  --grey-700: #4a4a55;
  --text: #1a1a23;
  --shadow-sm: 0 2px 8px rgba(31, 37, 102, 0.08);
  --shadow-md: 0 8px 24px rgba(31, 37, 102, 0.12);
  --shadow-lg: 0 20px 60px rgba(31, 37, 102, 0.18);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1200px;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2.25rem, 5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.875rem, 4vw, 3rem); letter-spacing: -0.005em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
p { margin-bottom: 1rem; }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-tint { background: var(--cream); }
.section-dark { background: var(--navy); color: var(--white); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-title { text-align: center; margin-bottom: 16px; }
.section-subtitle {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
  color: var(--grey-700);
  font-size: 1.05rem;
}
.section-dark .section-subtitle { color: rgba(255, 255, 255, 0.8); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 16px auto 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--gold); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--grey-200);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 56px; width: auto; }
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding: 8px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--navy);
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background: linear-gradient(135deg, rgba(22, 26, 74, 0.85), rgba(31, 37, 102, 0.75)),
              url('../images/St%20micheal%27s%20Cathedral,%20coimbatore%201.jpeg') center/cover no-repeat;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; max-width: 880px; padding: 0 24px; }
.hero h1 { color: var(--white); margin-bottom: 24px; }
.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
  margin: 0 auto 40px;
  font-weight: 300;
  letter-spacing: 0.02em;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-page {
  min-height: 50vh;
  background: linear-gradient(135deg, rgba(22, 26, 74, 0.88), rgba(31, 37, 102, 0.82)),
              url('../images/De%20paul%20international%20residential%20school,%20Belagola,%20Srirangapatna%20Taluk,%20Mandta%20dist%2001.jpeg') center/cover no-repeat;
}
.hero-page .hero-subtitle { margin-bottom: 0; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 56px 0;
  border-bottom: 1px solid var(--grey-200);
}
.stat { text-align: center; }
.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-700);
  margin-top: 8px;
}

/* ---------- Intro / About blocks ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
}
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-text .eyebrow { margin-bottom: 12px; }
.split-text p { margin-bottom: 1.25rem; color: var(--grey-700); font-size: 1.05rem; }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.cards-4 {
  grid-template-columns: repeat(4, 1fr);
}
.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1100px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards-4, .cards-3 { grid-template-columns: 1fr; }
}
.card {
  padding: 40px 32px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--grey-200);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--navy);
  font-size: 1.5rem;
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--grey-700); margin-bottom: 0; }

/* ---------- Portfolio grid ---------- */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.filter-btn {
  padding: 10px 22px;
  background: transparent;
  border: 1px solid var(--grey-200);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--grey-700);
  transition: all var(--transition);
}
.filter-btn:hover { color: var(--navy); border-color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--grey-100);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 26, 74, 0.92) 0%, rgba(22, 26, 74, 0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 4px;
  font-weight: 600;
}
.gallery-overlay span {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Featured projects (home) ---------- */
.featured {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.featured + .featured-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 95vw; max-height: 90vh; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 48px; height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: var(--gold); }
.lightbox-caption {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  text-align: center;
  max-width: 80%;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
}
.contact-info h3 { margin-bottom: 24px; }
.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.contact-item-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 1.1rem;
}
.contact-item h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin-bottom: 4px;
}
.contact-item p { margin: 0; color: var(--text); font-weight: 500; }

.contact-form { background: var(--cream); padding: 48px; border-radius: var(--radius-md); }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-700);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 37, 102, 0.1);
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 80px 24px;
}
.cta-strip h2 { color: var(--white); margin-bottom: 16px; }
.cta-strip p { font-size: 1.1rem; max-width: 600px; margin: 0 auto 32px; opacity: 0.85; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand img { height: 64px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.95rem; line-height: 1.7; max-width: 320px; }
.footer-col h4 {
  font-family: var(--font-sans);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section { padding: 72px 0; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .split-img { aspect-ratio: 4 / 3; max-width: 520px; margin: 0 auto; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .featured, .featured + .featured-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .nav { padding: 14px 20px; }
  .nav-logo img { height: 44px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 76px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--grey-200);
    transform: translateY(-150%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a {
    padding: 14px 24px;
    width: 100%;
    text-align: center;
  }
  .nav-links a::after { display: none; }
  .hero { min-height: 70vh; }
  .hero-page { min-height: 40vh; }
  .section { padding: 56px 0; }
  .container { padding: 0 20px; }
  .contact-form { padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.hero-content > * { animation: fadeUp 800ms ease both; }
.hero-content > *:nth-child(2) { animation-delay: 150ms; }
.hero-content > *:nth-child(3) { animation-delay: 300ms; }
.hero-content > *:nth-child(4) { animation-delay: 450ms; }
