/* ========================================
   R.L. ACADEMY — MODERN MINIMALIST DESIGN
   Font: Inter
   Colors: Monochromatic (Black, White, Grays)
   ======================================== */

/* ── CSS Variables ── */
:root {
  --primary: #000000;
  --bg: #FFFFFF;
  --bg-alt: #F7F7F7;
  
  --text: #111111;
  --text-muted: #555555;
  --text-light: #888888;
  --text-white: #FFFFFF;

  --border: #E5E5E5;
  
  --radius: 8px;
  
  --font-main: 'Inter', -apple-system, sans-serif;
  
  --nav-height: 80px;
  --container-max: 1200px;
  
  --transition: 0.2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Lenis Smooth Scroll Rules */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

html {
  scroll-padding-top: var(--nav-height);
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
}

.hero .btn-primary {
  background: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
}

.hero .btn-primary:hover {
  background: transparent;
  color: #FFFFFF;
}

.hero .btn-outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.5);
}

.hero .btn-outline:hover {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-header {
  margin-bottom: 64px;
  max-width: 700px;
}

.section-header h2 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: 50%;
  object-fit: contain;
}

.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-cta {
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
}

.nav-cta:hover {
  border-color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
}

.hero-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  max-width: 900px;
  color: #FFFFFF;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 30px;
  background: var(--primary);
  animation: scrollDown 2s infinite ease-in-out;
}

@keyframes scrollDown {
  0% { transform: translateY(-30px); }
  100% { transform: translateY(60px); }
}

/* ── About ── */
.about {
  padding: 140px 0;
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.about-card {
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
}

.about-card:hover {
  border-color: var(--primary);
}

.about-card-icon {
  margin-bottom: 32px;
  color: var(--primary);
}

.about-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.about-card p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Campus Gallery ── */
.campus {
  padding: 140px 0;
  background: var(--bg-alt);
}

.campus-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--border);
}

.gallery-large {
  grid-column: 1 / -1;
}

.gallery-item img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: grayscale(20%);
}

.gallery-large img {
  height: 600px;
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: grayscale(0%);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 32px 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
}

.gallery-caption h4 {
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: white;
}

.gallery-caption p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ── Certificates ── */
.certificates {
  padding: 140px 0;
  background: var(--bg);
  overflow-x: hidden;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.cert-card:hover {
  border-color: var(--primary);
}

.cert-icon {
  color: var(--text-light);
}

.cert-card:hover .cert-icon {
  color: var(--primary);
}

.cert-card h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.cert-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.cert-badge {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.cert-card:hover .cert-badge {
  text-decoration: underline;
}

/* ── Contact ── */
.contact {
  padding: 140px 0;
  background: var(--bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-item {
  display: flex;
  gap: 24px;
}

.contact-icon {
  color: var(--text-light);
}

.contact-item h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.contact-item p {
  color: var(--text-muted);
  font-size: 1rem;
}

.contact-map {
  height: 100%;
  min-height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Footer ── */
.site-footer {
  padding: 40px 0;
  text-align: center;
  background: var(--primary);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.98);
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text);
  cursor: pointer;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.hover-lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

.hero-animate {
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .about-grid, .cert-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-map {
    height: 300px;
    min-height: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-height: 70px;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 40px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
    z-index: 1001;
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links .nav-link {
    font-size: 1.2rem;
    color: var(--text);
  }
  .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero h1 { font-size: 3rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { width: 100%; justify-content: center; }
  .hero-scroll-indicator { display: none; }
  
  .about, .campus, .certificates, .contact { padding: 80px 0; }
  
  .campus-gallery { grid-template-columns: 1fr; }
  .gallery-large img, .gallery-item img { height: 300px; }
  
  .cert-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    padding: 24px;
    gap: 4px 16px;
  }
  .cert-icon {
    grid-row: 1 / 4;
    grid-column: 1;
  }
  .cert-card h4, .cert-card p, .cert-badge {
    grid-column: 2;
  }
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99;
}

.nav-overlay.active {
  display: block;
}
