:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-alt: #f2eee7;
  --primary: #0f2d25;
  --primary-hover: #174035;
  --primary-tint: #ebf2ef;
  --accent: #c8963e;
  --accent-text: #835c14;
  --ink: #18201d;
  --muted: #4c5752;
  --border: #e2dcd2;
  --danger: #a62626;
  --danger-bg: #fdf2f2;
  --success: #165e3b;
  --success-bg: #eef7f2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(15, 45, 37, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 45, 37, 0.08);
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: clip;
}

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

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--primary);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: var(--radius-sm);
}

/* Top utility bar */
.top-bar {
  background: var(--primary);
  color: #e7efe9;
  font-size: 0.82rem;
  padding: 0.45rem 0;
}

.top-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
}

.top-bar a {
  color: #f6e7c8;
  text-decoration: none;
  font-weight: 600;
}

.top-bar a:hover {
  text-decoration: underline;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary);
  min-width: 0;
}

.brand-crest {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--primary);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.15;
  color: var(--primary);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--surface-alt);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1rem 1.25rem 1.25rem;
  flex-direction: column;
  gap: 0.35rem;
}

.main-nav.is-open {
  display: flex;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--primary-tint);
  color: var(--primary);
  font-weight: 600;
}

.main-nav .nav-cta {
  background: var(--primary);
  color: #ffffff;
  text-align: center;
  font-weight: 600;
  margin-top: 0.35rem;
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta[aria-current="page"] {
  background: var(--primary-hover);
  color: #ffffff;
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    gap: 0.15rem;
  }
  .main-nav a {
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
  }
  .main-nav .nav-cta {
    margin-top: 0;
    margin-left: 0.4rem;
    padding: 0.55rem 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

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

.btn-accent {
  background: var(--accent);
  color: #151b18;
}

.btn-accent:hover {
  background: #b9862f;
}

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

.btn-outline:hover {
  background: var(--primary-tint);
}

.btn-whatsapp {
  background: #146c43;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #0f5635;
}

/* Sections & Page Headers */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 720px;
  margin-bottom: 2.25rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 0.5rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
}

.page-hero {
  background: var(--primary);
  color: #f4f7f5;
  padding: 3rem 0 2.75rem;
  border-bottom: 4px solid var(--accent);
}

.page-hero h1 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.page-hero .eyebrow {
  color: #f0c97d;
}

.page-hero p {
  color: #dbe5e0;
  max-width: 680px;
  margin-bottom: 0;
}

/* Home Hero */
.hero {
  padding: 2.5rem 0 3.5rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 3.5rem 0 4.25rem;
  }
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-caption {
  background: var(--primary);
  color: #e8f0ec;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Curriculum Pillars Strip (Honest, no fake stats) */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

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

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

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
}

.pillar-card strong {
  display: block;
  color: var(--primary);
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.pillar-card span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Grids & Cards */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-media {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: 1.35rem;
  flex: 1;
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  border-top: 3px solid var(--primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-link-arrow {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.tag-sample {
  background: #fbf3e2;
  color: var(--accent-text);
  border: 1px solid #ead4a6;
}

/* Lists */
.clean-list {
  margin: 0;
  padding-left: 1.2rem;
}

.clean-list li {
  margin-bottom: 0.45rem;
}

/* Tables */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.94rem;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) {
  background: #faf9f6;
}

/* Notice / Callout */
.notice {
  background: #fbf6eb;
  border: 1px solid #e6d1a3;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.94rem;
}

.notice strong {
  color: var(--primary);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid #cfc8bc;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.form-status {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: 0.95rem;
}

.form-status.is-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #efc6c6;
}

.form-status.is-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #b9dfc9;
}

.ref-box {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

/* Gallery Filter */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.gallery-item[hidden] {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #dbe5e0;
  padding: 3.25rem 0 1.75rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3,
.site-footer h4 {
  color: #ffffff;
  font-size: 1.05rem;
}

.site-footer a {
  color: #f4e2bd;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.footer-bottom {
  padding-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #c9d6cf;
}

/* Admin specific */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.status-select {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #cfc8bc;
  font-family: inherit;
  font-size: 0.88rem;
  background: #fff;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-new { background: #e8f0fe; color: #1a4b9c; }
.badge-called { background: #fef3c7; color: #92400e; }
.badge-exam { background: #ede9fe; color: #5b21b6; }
.badge-admitted { background: #dcfce7; color: #166534; }
