/* ===== GLOBAL RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111111;
  background-color: #fafafa;
  line-height: 1.6;
}

/* Simple type scale */
h1, h2, h3 {
  margin: 0 0 0.5em;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

/* ===== LAYOUT HELPERS ===== */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section-heading {
  text-align: left;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-size: 1.6rem;
}

.section-heading p {
  font-size: 0.95rem;
  color: #555;
}

/* ===== NAVBAR ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(250, 250, 250, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e4e4e4;
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: #111;
  letter-spacing: 0.04em;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: #444;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #111;
  transition: width 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.nav-links a:hover {
  color: #111;
}

/* ===== HERO ===== */
.hero {
  padding: 7rem 0;
}

.hero-inner {
  max-width: 640px;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 0.98rem;
  color: #444;
}

/* ===== CLASSES GRID ===== */
.classes-section {
  padding: 1rem 0 3rem;
}

.classes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}


/* Card */
.class-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background-color: #111;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.03);
  
  /* New for animation */
  transform: translateY(0);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.4s ease;
}

/* Click press state */
.class-card:active {
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Custom circle cursor when hovering cards */
.class-card:hover {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><circle cx='16' cy='16' r='10' stroke='black' stroke-width='2' fill='none'/></svg>") 16 16, pointer;
}

/* Start hidden for scroll-reveal */
.class-card {
  opacity: 0;
  transform: translateY(20px);
}

/* When visible */
.class-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}



/* Image wrapper keeps the ratio flexible */
.class-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.class-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.4s ease;
}

/* Class label – name on top of picture */
.class-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.68),
    rgba(0, 0, 0, 0.25),
    transparent
  );
  color: #f5f5f5;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Overlay with course code + short text (shows on hover) */
.class-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.2),
    transparent
  );
  color: #f8f8f8;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.class-overlay h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.class-overlay p {
  font-size: 0.8rem;
  margin: 0;
  opacity: 0.9;
}

/* Hover interaction: image grows a bit, overlay slides up */
.class-card:hover img,
.class-card:focus-within img {
  transform: scale(1.08);
}

.class-card:hover .class-overlay,
.class-card:focus-within .class-overlay {
  transform: translateY(0);
  opacity: 1;
}

/* ===== CONTACT ===== */
.contact-section {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid #e4e4e4;
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-row label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #333;
}

.form-row input,
.form-row textarea {
  border-radius: 10px;
  border: 1px solid #d5d5d5;
  padding: 0.6rem 0.7rem;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 1px #11111110;
}

.btn-primary {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background-color: #111;
  color: #f8f8f8;
  align-self: flex-start;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
  background-color: #000;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.contact-alt {
  font-size: 0.9rem;
  color: #444;
}

.contact-email {
  display: inline-block;
  margin-top: 0.25rem;
  color: #111;
  font-weight: 500;
  text-decoration: none;
}

.contact-email:hover {
  text-decoration: underline;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid #e4e4e4;
  padding: 1rem 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: #777;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 0.75rem;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
  }

  main {
    padding-inline: 1.25rem;
  }

  .hero {
    padding-top: 2.25rem;
  }

  .contact-inner {
    grid-template-columns: 1fr;
  }

  .classes-grid {
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 0.9rem;
  }

  .class-label span {
    font-size: 0.8rem;
  }

  .class-overlay h3 {
    font-size: 0.9rem;
  }

  .class-overlay p {
    font-size: 0.78rem;
  }
}
