/* ============================================================
   OPEN LEARNING — shared stylesheet
   Palette derived from logo: deep forest, dark teal, leaf green
   ============================================================ */

:root {
  --bg: #f4ede0;            /* warm parchment */
  --bg-deep: #ede4d2;
  --paper: #fbf7ec;
  --paper-soft: #f8f1de;

  --ink: #1f1a14;           /* deep warm-black */
  --ink-soft: #5c5040;
  --ink-faint: #8b7e6a;

  --line: #d9cdb6;
  --line-soft: #e6dcc7;

  /* V1 palette — terracotta primary, sea blue secondary, olive tertiary */
  --accent: #b94a2a;        /* terracotta */
  --accent-deep: #9e3a1f;
  --accent-2: #2c5d6e;      /* sea blue */
  --accent-3: #6b7f3a;      /* olive */
  --accent-3-soft: #d6dcb4;

  /* aliases — many page-specific styles use the green-era names; keep
     them mapped to the V1 palette so we don't have to chase every reference */
  --forest: var(--accent);
  --forest-deep: var(--accent-deep);
  --teal: var(--accent-2);
  --leaf: var(--accent-3);
  --leaf-soft: var(--accent-3-soft);

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
p { text-wrap: pretty; margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   TYPE
   ============================================================ */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.98;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--accent); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--leaf);
  display: inline-block;
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--accent); }
.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 1.55vw, 24px);
  line-height: 1.35;
  color: var(--ink-soft);
  text-wrap: pretty;
  max-width: 36em;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav-row {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 0;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.logo img { height: 38px; width: auto; }
.logo-text { line-height: 1.05; }
.logo-text small {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-top: 2px;
  font-weight: 400;
}
.nav-links {
  display: flex; gap: 28px; margin-left: auto;
  font-size: 14px; color: var(--ink-soft);
}
.nav-links a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--leaf);
}

.lang-switch {
  display: flex; align-items: center; gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper);
}
.lang-switch button {
  border: none; background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 5px 9px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
  text-transform: uppercase;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--forest);
  color: var(--paper-soft);
}
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--ink); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper-soft);
  font-size: 13px; font-weight: 500;
  border: none;
  transition: background .15s ease, transform .15s ease;
}
.nav-cta:hover { background: var(--forest-deep); transform: translateY(-1px); }
.nav-cta .arr { transition: transform .2s ease; }
.nav-cta:hover .arr { transform: translateX(3px); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: none;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--forest); color: var(--paper-soft);
}
.btn-primary:hover { background: var(--forest-deep); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); }

/* ============================================================
   BRAND NAMES — used in body copy / lede text
   Italic in the brand colour, no extra weight, so the name reads
   as a proper noun without becoming a shout
   ============================================================ */
.brand-ol {
  font-style: italic;
  color: var(--accent);
}
.brand-ee {
  font-style: italic;
  color: var(--accent-2);
}

/* ============================================================
   UMBRELLA / BRAND LOGOS — Grupo GCS, Open Learning, Easy Education
   ============================================================ */
.logo-umbrella {
  height: 44px !important;
  width: auto;
}
.foot-brand-logo {
  display: block;
  height: 40px;
  width: auto;
  margin: 4px 0 12px;
}
.foot-brand-sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 4px !important;
}

/* ============================================================
   FOOTER (V1 style — light parchment, no red)
   ============================================================ */
.foot-brand-dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.foot-parent {
  margin: 28px 0 16px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 60em;
}

footer.site-foot {
  background: var(--bg-deep);
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding: 80px 0 32px;
}
.site-foot .logo { color: var(--ink); }
.site-foot .logo-text small { color: var(--ink-faint); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.foot-grid h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
  font-weight: 500;
}
.foot-grid ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px; font-size: 14px;
}
.foot-grid a { color: var(--ink); }
.foot-grid a:hover { color: var(--accent); }
.foot-blurb {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 24px 0 0;
  max-width: 14em;
  color: var(--ink);
  font-weight: 400;
}
.foot-blurb em { font-style: italic; color: var(--accent); }
.foot-meta {
  display: flex; justify-content: space-between;
  padding-top: 28px;
  font-size: 11px;
  color: var(--ink-faint);
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============================================================
   GOOGLE REVIEWS
   ============================================================ */
.reviews-sec { padding: 96px 0; background: var(--paper-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.reviews-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 32px; margin-bottom: 40px; flex-wrap: wrap;
}
.reviews-summary {
  display: flex; align-items: center; gap: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 22px;
}
.reviews-summary .gicon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  flex: 0 0 32px;
}
.reviews-summary .gicon svg { width: 100%; height: 100%; }
.reviews-summary .score {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.reviews-summary .stars {
  color: #f5b400;
  font-size: 14px;
  letter-spacing: 2px;
  margin: 2px 0 4px;
}
.reviews-summary .meta {
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s ease, transform .2s ease;
}
.review-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.review-head {
  display: flex; align-items: center; gap: 12px;
}
.review-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--leaf-soft);
  color: var(--forest-deep);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}
.review-name { font-weight: 500; font-size: 14px; line-height: 1.2; }
.review-when { font-size: 12px; color: var(--ink-faint); font-family: var(--mono); }
.review-stars {
  color: #f5b400; font-size: 13px; letter-spacing: 2px;
  display: flex; align-items: center; gap: 8px;
}
.review-stars .gmini { width: 14px; height: 14px; opacity: 0.75; }
.review-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ============================================================
   PAGE HEAD (used on inner pages)
   ============================================================ */
.page-head {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--line-soft);
}
.page-head .eyebrow { margin-bottom: 16px; }
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.page-head h1 em { font-style: italic; color: var(--accent); }
.page-head .lede { font-size: clamp(19px, 1.6vw, 23px); }

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

/* ============================================================
   PHOTO FRAMES — striped placeholder background, image overlays it,
   onerror removes the img and reveals the placeholder + label
   ============================================================ */
.photo-frame {
  position: relative;
  overflow: hidden;
}
.photo-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  display: block;
}
.photo-frame > span:not(.placeholder-tag) {
  position: relative;
  z-index: 0;
}

/* dim partner / team photos slightly on dark backgrounds for legibility of tag/title */
.partner .partner-img img {
  filter: brightness(0.95);
}

/* subjects pill on team cards */
.subjects-tag {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg-deep);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ============================================================
   CMS FIELD INDICATOR
   when body has .show-cms, every [data-cms] gets a dashed outline
   ============================================================ */
body.show-cms [data-cms] {
  outline: 1.5px dashed var(--leaf);
  outline-offset: 4px;
  position: relative;
  border-radius: 4px;
}
body.show-cms [data-cms]::after {
  content: attr(data-cms);
  position: absolute;
  top: -10px; left: -4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--leaf);
  color: var(--forest-deep);
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
  font-weight: 500;
}

/* ============================================================
   NAV — drawer + hamburger for mobile
   ============================================================ */
.nav-drawer {
  display: flex; align-items: center; gap: 24px;
  margin-left: auto;
}
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s ease, border-color .15s ease;
}
.nav-toggle:hover { background: var(--paper); border-color: var(--ink); }
.nav-toggle svg { width: 20px; height: 20px; display: block; }
.nav-toggle line { transition: transform .25s ease, opacity .15s ease; transform-origin: center; }
.nav.open .nav-toggle .nt-l1 { transform: translateY(5px) rotate(45deg); }
.nav.open .nav-toggle .nt-l2 { opacity: 0; }
.nav.open .nav-toggle .nt-l3 { transform: translateY(-5px) rotate(-45deg); }
.nav-scrim {
  display: none;
  position: fixed; inset: 0;
  background: rgba(31, 26, 20, 0.4);
  z-index: 49;
  opacity: 0;
  transition: opacity .25s ease;
}
.nav.open .nav-scrim { display: block; opacity: 1; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }     /* CTA is inside the drawer on mobile via Visit us link */

  .review-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  .nav-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(380px, 100%); height: 100vh;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 88px 32px 32px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 60;
    border-left: 1px solid var(--line);
    box-shadow: -10px 0 30px rgba(0,0,0,0.08);
    overflow-y: auto;
  }
  .nav.open .nav-drawer { transform: translateX(0); }

  .nav .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-left: 0;
    width: 100%;
  }
  .nav .nav-links a {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 400;
    color: var(--ink);
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
    width: 100%;
  }
  .nav .nav-links a:hover, .nav .nav-links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .nav .lang-switch {
    display: flex !important;
    margin-top: 12px;
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  .nav .nav-row { padding: 12px 0; }
  .logo { font-size: 20px; }
  .logo img { height: 32px; }
  .wrap { padding: 0 20px; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DARK THEME
   ============================================================ */
body[data-theme="forest-dark"] {
  --bg: #0d1d14;
  --bg-deep: #122418;
  --paper: #16271d;
  --paper-soft: #142319;
  --ink: #e9efe5;
  --ink-soft: #a8b5ac;
  --ink-faint: #6f7c75;
  --line: #2c3a32;
  --line-soft: #1f2b24;
  --forest: #5a9e76;
  --forest-deep: #76b890;
  --leaf: #a3cf6f;
  --leaf-soft: #2c4632;
}
body[data-theme="forest-dark"] .nav-cta { background: var(--forest); color: #0d1d14; }
body[data-theme="forest-dark"] .nav-cta:hover { background: var(--leaf); }
