/* Kargi Kala Kendra — public site */
:root {
  --bg: #faf8f5;
  --bg-warm: #f3ede6;
  --ink: #1a1512;
  --muted: #5c534c;
  --accent: #8b2942;
  --accent-dark: #6a1f33;
  --gold: #c9a227;
  --gold-soft: #e8d5a8;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(26, 21, 18, 0.08);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.logo small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle svg {
  width: 28px;
  height: 28px;
}

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

.nav a {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--bg-warm);
  color: var(--accent);
}

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

  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 56px;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--bg);
    border-bottom: 1px solid rgba(201, 162, 39, 0.25);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s, opacity 0.2s, visibility 0.2s;
  }

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

  .nav a {
    padding: 0.85rem 1rem;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(26, 21, 18, 0.75) 0%, rgba(139, 41, 66, 0.45) 45%, rgba(26, 21, 18, 0.55) 100%),
    url("https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=2000&q=80")
      center/cover no-repeat;
}

/* Home hero (school.jpg): anchor photo to top so cover-crop removes bottom first (keeps standing students’ heads). */
.hero__bg--main {
  background-image:
    linear-gradient(105deg, rgba(26, 21, 18, 0.75) 0%, rgba(139, 41, 66, 0.45) 45%, rgba(26, 21, 18, 0.55) 100%),
    url("../../html/corpnews/images/school.jpg");
  background-position: center center, center top;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}

/* About hero: full photo via object-fit:contain (no crop). Letterboxing uses dark bg. */
.hero--about {
  min-height: min(78vh, 820px);
}

.hero--about .hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.hero__bg.hero__bg--about {
  background-color: #1a1512;
  background-image: none;
}

.hero__photo--contain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  z-index: 0;
}

.hero__scrim--about {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(26, 21, 18, 0.92) 0%,
    rgba(26, 21, 18, 0.35) 42%,
    transparent 72%
  );
}

.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero__tagline {
  font-size: 1.1rem;
  max-width: 36ch;
  opacity: 0.95;
  margin: 0 0 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold) 0%, #b8922a 100%);
  color: var(--ink);
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.4);
}

.btn--primary:hover {
  transform: translateY(-1px);
  color: var(--ink);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  margin-left: 0.75rem;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.28);
  color: var(--white);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.section--alt {
  background: var(--bg-warm);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.section__lead {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 2rem;
}

/* Two column */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .split--reverse .split__text {
    order: 2;
  }

  .split--reverse .split__visual {
    order: 1;
  }
}

.split__visual img,
.rounded-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Gallery */
.gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
}

.gallery--events img {
  aspect-ratio: 4/3;
}

/* Carousel */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111;
}

.carousel__track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel__slide {
  min-width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.carousel__btn--prev {
  left: 12px;
}

.carousel__btn--next {
  right: 12px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.35);
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.carousel__dot[aria-selected="true"] {
  background: var(--gold);
}

/* Cards (about) */
.cards {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 162, 39, 0.2);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card img {
  border-radius: 8px;
  margin-bottom: 1rem;
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
}

/* Leadership row: three columns, full photo (contain), wider layout */
.section--leadership {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

.cards--leadership {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .cards--leadership {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 2rem);
  }
}

.card--leadership .card__photo {
  background: var(--bg-warm);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.card--leadership .card__photo img {
  width: 100%;
  height: auto;
  max-height: min(52vh, 520px);
  object-fit: contain;
  object-position: center center;
  margin: 0;
  border-radius: 6px;
  aspect-ratio: unset;
}

.card--leadership h3 {
  font-size: 1.2rem;
}

.card--leadership p {
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Contact form */
.form {
  max-width: 520px;
}

.form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid #c4bcb3;
  border-radius: 8px;
  font: inherit;
  background: var(--white);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form button[type="submit"] {
  margin-top: 0.25rem;
}

.form-message {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.form-message--success {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #1b5e20;
}

.form-message--error {
  background: #ffebee;
  border: 1px solid #e57373;
  color: #b71c1c;
}

.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-aside {
  background: var(--bg-warm);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 39, 0.25);
}

.contact-aside h3 {
  font-family: var(--font-display);
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.contact-aside p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 1.25rem;
  margin-top: 2rem;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: var(--gold-soft);
}

.site-footer a:hover {
  color: var(--white);
}

/* Utility */
.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}
