/* ==========================================================================
   CEPME LTD — visual identity
   Concept: the mark sheet. CEPME's world is exam papers, answer scripts and
   red-pen grading, so the site borrows that vocabulary — ruled lines,
   a wax-seal mark, and a single red "verified" tick — instead of generic
   SaaS-card styling.
   ========================================================================== */

:root {
  --paper: #FAF7EF;
  --paper-line: rgba(22, 35, 63, 0.10);
  --ink: #16233F;
  --ink-soft: #4A5872;
  --gold: #B8892B;
  --gold-deep: #8C6A21;
  --pen-red: #A9402F;
  --white: #FFFFFF;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1120px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--pen-red);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { max-width: 68ch; }
p.wide { max-width: none; }

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

.eyebrow-plain { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.4em; }

/* ---------- header / nav ---------- */
.main-header {
  background: var(--paper);
  border-bottom: 1px solid var(--paper-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.main-header .header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.main-header .logo img { height: 40px; width: auto; }
.main-header nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.main-header nav a {
  text-decoration: none;
  font-size: 0.97rem;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-header nav a:hover,
.main-header nav a.active {
  border-bottom-color: var(--gold);
}
.main-header nav a.portal-link {
  background: var(--ink);
  color: var(--paper);
  padding: 8px 16px;
  border-radius: var(--radius);
  border-bottom: none;
}
.main-header nav a.portal-link:hover { background: var(--gold-deep); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  font-size: 1.3rem;
  padding: 4px 10px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .main-header nav ul {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--paper-line);
    padding: 8px 24px 16px;
  }
  .main-header nav ul.open { display: flex; }
  .main-header nav a { padding: 12px 0; display: block; }
  .menu-toggle { display: inline-block; }
}

/* ---------- ruled-paper hero ---------- */
.hero-ruled {
  position: relative;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 43px,
      var(--paper-line) 43px,
      var(--paper-line) 44px
    ),
    var(--paper);
  padding: 88px 0 72px;
  overflow: hidden;
}
.hero-ruled::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 64px;
  width: 1px;
  background: rgba(169, 64, 47, 0.28);
}
.hero-ruled .container { position: relative; }
.hero-ruled .hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pen-red);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 18px;
}
.hero-ruled .hero-mark svg { width: 20px; height: 20px; flex-shrink: 0; }
.hero-ruled h1 { max-width: 15ch; }
.hero-ruled .lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 28px;
}

/* public notice / fraud-warning banner — deliberately not the "checked" gold
   accent, since this needs to read as urgent, not as an assessment mark */
.public-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--pen-red);
  color: var(--paper);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  max-width: 68ch;
}
.public-notice svg { flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; }
.public-notice strong { display: block; font-family: var(--serif); font-size: 1.02rem; margin-bottom: 3px; }
.public-notice p { margin: 0; color: rgba(250,247,239,0.92); font-size: 0.95rem; max-width: none; }
.public-notice a { color: var(--white); text-decoration: underline; }

/* page hero (non-home pages) */
.page-hero {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 48px;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(250, 247, 239, 0.78); max-width: 60ch; }
.page-hero .lead { font-size: 1.1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.97rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #263355; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-whatsapp { background: #2E7D32; color: #fff; }
.btn-whatsapp:hover { background: #256628; }

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }

.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); }

/* ---------- grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- marked card (replaces generic bootstrap card) ---------- */
.marked-card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-left: 3px solid var(--gold);
  padding: 26px 24px;
}
.marked-card h3 { margin-bottom: 8px; }
.marked-card p { color: var(--ink-soft); margin: 0; }

/* checklist replaces bootstrap list-group for anything that is genuinely a
   set of commitments/criteria — the tick literally means "assessed & met" */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--paper-line);
  color: var(--ink-soft);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 3px;
  background: var(--pen-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5 L9.5 18 L20 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5 L9.5 18 L20 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* dated list — for content that IS chronological (projects timeline) */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--paper-line); }
.timeline li { position: relative; padding: 4px 0 22px 26px; color: var(--ink-soft); }
.timeline li::before {
  content: "";
  position: absolute; left: -6px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold);
}
.timeline .yr { font-family: var(--serif); color: var(--ink); font-weight: 600; margin-right: 6px; }

/* ---------- team ---------- */
.team-card { text-align: center; }
.team-card img {
  width: 108px; height: 108px;
  border-radius: 50%;
  margin: 0 auto 14px;
  object-fit: cover;
  border: 2px solid var(--gold);
}
.team-card h3 { margin-bottom: 2px; font-size: 1.05rem; }
.team-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0 auto; }

/* ---------- announcements ---------- */
.announcements { background: var(--ink); color: var(--paper); }
.announcements .section-head p { color: rgba(250, 247, 239, 0.72); }
.announcements .section-head h2 { color: var(--white); }
.announce-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid rgba(250,247,239,0.16); }
.announce-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid rgba(250,247,239,0.16);
}
.announce-item .date {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 0.92rem;
}
.announce-item h3 { color: var(--white); font-size: 1.05rem; margin: 0 0 4px; }
.announce-item p { color: rgba(250,247,239,0.7); margin: 0; font-size: 0.95rem; }
.announce-item .tag {
  align-self: start;
  font-size: 0.78rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .announce-item { grid-template-columns: 1fr; gap: 6px; }
  .announce-item .tag { justify-self: start; }
}
.announce-empty { color: rgba(250,247,239,0.65); padding: 20px 0; }

/* ---------- testimonials ---------- */
.testimonial {
  background: var(--white);
  border: 1px solid var(--paper-line);
  padding: 28px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.testimonial p.quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  max-width: none;
}
.testimonial .who { color: var(--gold-deep); font-weight: 600; margin-top: 10px; }
.t-nav { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.t-nav button {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--ink-soft); background: transparent; cursor: pointer; padding: 0;
}
.t-nav button.active { background: var(--gold); border-color: var(--gold); }

/* ---------- partners ---------- */
.partner-strip { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: center; }
.partner-strip img { height: 44px; width: auto; opacity: 0.72; filter: grayscale(1); transition: opacity .2s, filter .2s; }
.partner-strip img:hover { opacity: 1; filter: grayscale(0); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info dt { font-family: var(--serif); color: var(--ink); margin-top: 18px; }
.contact-info dd { margin: 4px 0 0; color: var(--ink-soft); }
.map-wrapper { border: 1px solid var(--paper-line); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: rgba(250,247,239,0.82); padding: 56px 0 0; }
.footer .container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.footer-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(250,247,239,0.14);
}
@media (max-width: 760px) { .footer-columns { grid-template-columns: 1fr; } }
.footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer p, .footer a { color: rgba(250,247,239,0.72); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 8px; }
.footer .copyright {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(250,247,239,0.55);
  padding: 18px 0 22px;
  margin: 0;
}

/* ---------- cookie notice ---------- */
.cookie-notice {
  display: none;
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(250,247,239,0.2);
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.cookie-notice.is-visible { display: flex; }
.cookie-notice p { margin: 0; font-size: 0.9rem; color: rgba(250,247,239,0.85); }
.cookie-notice button {
  flex-shrink: 0;
  background: var(--gold);
  color: var(--ink);
  border: none;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
}
@media (max-width: 560px) { .cookie-notice.is-visible { flex-direction: column; align-items: stretch; text-align: center; } }

/* ---------- utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
