/* ===== Variables ===== */
:root {
  --color-bg: #0f1419;
  --color-surface: #1a2332;
  --color-surface-alt: #243044;
  --color-text: #e8ecf1;
  --color-text-muted: #8b9aad;
  --color-accent: #f5c542;
  --color-accent-dark: #d4a83a;
  --color-white: #ffffff;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-accent-dark);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--color-accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--color-text-muted);
  font-weight: 500;
}

.nav a:hover {
  color: var(--color-text);
}

.btn-nav {
  color: var(--color-bg) !important;
  background: var(--color-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.btn-nav:hover {
  background: var(--color-accent-dark);
  color: var(--color-bg) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 100%),
    var(--color-bg) url("../images/project1-school.png") center / cover no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(245, 197, 66, 0.03) 80px,
    rgba(245, 197, 66, 0.03) 82px
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  max-width: 520px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-sans);
  transition: background var(--transition), color var(--transition), transform 0.15s ease;
}

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

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-bg);
}

.btn-secondary {
  background: var(--color-surface-alt);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: var(--color-surface);
  color: var(--color-white);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* ===== Sections ===== */
.section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
}

/* ===== About ===== */
.about {
  background: var(--color-surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-lead {
  font-size: 1.15rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.about-list {
  list-style: none;
  margin-top: 1.5rem;
}

.about-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

.about-card {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.about-stat {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.about-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

.about-feature {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.about-feature-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.about-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-feature-body {
  padding: 1.5rem;
}

.about-feature-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.about-feature-body p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Our Work – cards sized by original image aspect ratios ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  grid-auto-rows: auto;
  gap: 1.25rem;
  padding: 0.25rem 0;
  align-items: start;
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.project > .project-image,
.project > .project-images-ba {
  width: 100%;
}

/* Single image: natural aspect ratio (no crop) */
.project-image {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--color-surface-alt);
  line-height: 0;
}

.project-image img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  transition: transform 0.4s ease;
}

.project:hover .project-image img {
  transform: scale(1.02);
}

/* Before/after: each image at natural aspect, Before on top / After below */
.project-images-ba {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.5rem 0.5rem 0 0.5rem;
}

.project-image-ba {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.project-image-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.25rem 0 0.15rem;
  flex-shrink: 0;
}

.project-image-ba-img {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--color-surface-alt);
  border-radius: var(--radius);
  line-height: 0;
}

.project-image-ba-img img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  transition: transform 0.4s ease;
}

.project:hover .project-image-ba-img img {
  transform: scale(1.02);
}

/* Card footer – description */
.project-body {
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-white);
  margin: 0;
  line-height: 1.4;
}

.project-body p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

@media (max-width: 768px) {
  .projects {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-body {
    padding: 1rem 1.25rem;
  }

  .project-body h3 {
    font-size: 1rem;
  }
}

/* ===== Project modal (XL) ===== */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.project-modal[hidden] {
  display: none !important;
}

.project-modal.is-open[hidden] {
  display: flex !important;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.project-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.project-modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.project-modal-content {
  padding: 1.5rem 2rem 2rem;
  overflow: auto;
}

.project-modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-white);
  margin: 0 0 1rem;
}

.project-modal-body {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-alt);
}

.project-modal-body img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

/* Modal carousel (before/after) */
.project-modal-carousel {
  position: relative;
}

.project-modal-carousel-inner {
  display: flex;
  overflow: hidden;
}

.project-modal-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  display: none;
}

.project-modal-carousel-slide.is-active {
  display: block;
}

.project-modal-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.project-modal-carousel-label {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  display: none;
}

.project-modal-carousel-label.is-active {
  display: block;
}

.project-modal-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.project-modal-carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.project-modal-carousel-arrow--prev {
  left: 0.75rem;
}

.project-modal-carousel-arrow--next {
  right: 0.75rem;
}

/* ===== Contact ===== */
.contact {
  background: var(--color-surface);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color var(--transition), transform 0.2s ease;
  color: inherit;
}

.contact-card:hover {
  border-color: rgba(245, 197, 66, 0.3);
  transform: translateY(-2px);
  color: var(--color-text);
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.contact-value {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-white);
}

/* ===== Inquiry / Google Form CTA ===== */
.inquiry {
  text-align: center;
  padding: 5rem 0;
}

.inquiry-inner {
  max-width: 560px;
  margin: 0 auto;
}

.inquiry .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

.inquiry-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* ===== Footer ===== */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
