@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #14171c;
  --text-on-dark: #eef2f6;
  --bg-panel: #252a38;
  --text-on-panel: #eef2f6;
  --bg-accent: #00d4aa;
  --text-on-accent: #0d1117;
  --bg-cta: #0f1218;
  --bg-glass: rgba(37, 42, 56, 0.78);
  --muted: #8b95a8;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(0, 212, 170, 0.35);
  --sidebar-w: 260px;
  --header-h: 60px;
  --radius: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  --transition: 0.22s ease;
}

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

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

body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

.surface-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.surface-panel { background: var(--bg-panel); color: var(--text-on-panel); }
.surface-accent { background: var(--bg-accent); color: var(--text-on-accent); }
.surface-cta {
  background: linear-gradient(160deg, #0a0d12 0%, var(--bg-cta) 45%, #161b24 100%);
  color: var(--text-on-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.surface-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-on-dark);
}
.surface-dark *, .surface-panel *, .surface-accent *, .surface-glass *, .surface-cta * { color: inherit; }

.mono { font-family: 'IBM Plex Mono', monospace; }

a { color: var(--bg-accent); text-decoration: none; transition: color var(--transition), opacity var(--transition); }
a:hover { text-decoration: underline; }

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

.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  z-index: 200;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  background: var(--bg-dark);
  overflow-y: auto;
}

.sidebar-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 36px;
  color: var(--text-on-dark);
  text-decoration: none;
  line-height: 1.3;
}
.sidebar-logo:hover { text-decoration: none; color: var(--bg-accent); }

.sidebar-nav { flex: 1; list-style: none; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text-on-dark);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(0, 212, 170, 0.08);
  border-color: var(--border-hover);
  text-decoration: none;
  color: var(--text-on-dark);
}
.sidebar-nav a.active .nav-index { color: var(--bg-accent); }
.sidebar-nav .nav-index { color: var(--muted); font-size: 0.72rem; min-width: 22px; }

.sidebar-contact {
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 18px;
}
.sidebar-contact a { color: var(--text-on-dark); font-size: 0.8rem; }

.sidebar-close {
  display: none;
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
}
.sidebar-close:hover { background: rgba(255,255,255,0.06); }

/* ── Main layout ── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb a { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--bg-accent);
  color: var(--text-on-accent);
  box-shadow: 0 2px 12px rgba(0, 212, 170, 0.25);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 20px rgba(0, 212, 170, 0.35); }
.btn-outline {
  background: transparent;
  color: var(--text-on-dark);
  border: 1px solid rgba(232, 237, 242, 0.35);
}
.btn-outline:hover { border-color: var(--bg-accent); color: var(--bg-accent); }
.btn-light {
  background: #ffffff;
  color: #0d1117;
  border: 1px solid rgba(255,255,255,0.9);
  font-weight: 600;
}
.btn-light:hover {
  background: #f0f4f8;
  color: #0d1117;
  box-shadow: 0 4px 20px rgba(255,255,255,0.15);
}

.menu-toggle {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-on-dark);
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.menu-toggle:hover { background: rgba(0, 212, 170, 0.1); border-color: var(--border-hover); }

main { flex: 1; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

section { padding: clamp(48px, 8vw, 72px) 0; }
section.compact { padding: clamp(36px, 6vw, 56px) 0; }

h1 { font-size: clamp(1.75rem, 4.5vw, 3rem); font-weight: 700; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.85rem); font-weight: 600; margin-bottom: 20px; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.05rem, 2vw, 1.15rem); font-weight: 600; margin-bottom: 10px; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
.lead { font-size: clamp(1rem, 2vw, 1.125rem); color: var(--muted); max-width: 68ch; }

/* ── Hero ── */
.hero-dashboard {
  min-height: clamp(520px, 85vh, 900px);
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 32px) clamp(48px, 8vw, 72px);
  background-image:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(0, 212, 170, 0.06), transparent),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

.hero-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg-accent);
  margin-bottom: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.stat-block {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.stat-block:hover { border-color: var(--border-hover); }
.stat-block .mono { font-size: 1.2rem; font-weight: 500; color: var(--bg-accent); }
.stat-block span { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

.hero-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-card figcaption { padding: 12px 16px; font-size: 0.78rem; color: var(--muted); border-top: 1px solid var(--border); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.trust-strip { font-size: 0.78rem; color: var(--muted); font-family: 'IBM Plex Mono', monospace; }

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats-row > div {
  padding: clamp(18px, 3vw, 28px);
  background: var(--bg-panel);
  text-align: center;
}
.stats-row .mono { font-size: clamp(1.2rem, 3vw, 1.5rem); color: var(--bg-accent); display: block; margin-bottom: 6px; }
.stats-row p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ── Pillars ── */
.section-header { margin-bottom: clamp(24px, 4vw, 36px); }

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 20px);
}
.pillar-card {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.pillar-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.pillar-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.pillar-card .pillar-body { padding: 20px; flex: 1; }
.pillar-card .mono { color: var(--bg-accent); font-size: 0.72rem; margin-bottom: 8px; letter-spacing: 0.06em; }

/* ── Module grid ── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 16px);
}
.module-card {
  padding: clamp(16px, 2.5vw, 22px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}
.module-card:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.02); }
.module-card .mono { color: var(--bg-accent); margin-bottom: 8px; font-size: 0.75rem; }

/* ── Program table ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 8px;
}
.program-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
.program-table th, .program-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.program-table tr:last-child td { border-bottom: none; }
.program-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(0,0,0,0.15);
}
.program-table tbody tr:hover td { background: rgba(0, 212, 170, 0.04); }

/* ── Accordion ── */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: clamp(0.95rem, 2vw, 1rem);
  font-weight: 500;
  padding: 18px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color var(--transition);
}
.accordion-trigger:hover { color: var(--bg-accent); }
.accordion-trigger span { color: var(--bg-accent); font-size: 1.25rem; flex-shrink: 0; transition: transform var(--transition); }
.accordion-item.open .accordion-trigger span { transform: rotate(45deg); }
.accordion-panel { padding: 0 0 18px; color: var(--muted); display: none; max-width: 72ch; }
.accordion-item.open .accordion-panel { display: block; }

/* ── CTA band ── */
.cta-band {
  text-align: center;
  padding: clamp(56px, 10vw, 96px) clamp(16px, 4vw, 32px);
}
.cta-band h2 { margin-bottom: 16px; max-width: 28ch; margin-left: auto; margin-right: auto; }
.cta-band p { max-width: 60ch; margin-left: auto; margin-right: auto; margin-bottom: 28px; color: var(--muted); }
.cta-band .btn { margin-top: 4px; }

/* ── Content images (about, faq, etc.) ── */
.content-image {
  max-width: min(720px, 100%);
  margin: 0 auto 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.content-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.content-image figcaption {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--border);
}
.content-image--inline {
  max-width: min(640px, 100%);
  margin: 28px auto 0;
}

/* ── Program detail ── */
.program-detail {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: clamp(20px, 4vw, 36px);
  margin-bottom: clamp(36px, 6vw, 52px);
  padding-bottom: clamp(36px, 6vw, 52px);
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.program-detail:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.program-detail--reverse { direction: rtl; }
.program-detail--reverse > * { direction: ltr; }
.program-detail figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 0;
}
.program-detail img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}
.program-meta { font-size: 0.85rem; color: var(--muted); margin-top: 12px; font-style: italic; }
.program-detail .mono { color: var(--bg-accent); font-size: 0.75rem; margin-bottom: 8px; }

/* ── Service grid ── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 24px);
}
.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.service-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.service-card .body { padding: clamp(16px, 2.5vw, 22px); flex: 1; display: flex; flex-direction: column; }
.service-card .body p { flex: 1; }
.service-card .mono { color: var(--bg-accent); font-size: 0.75rem; margin-bottom: 8px; }
.price-tag {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--bg-accent);
  font-size: 0.9rem;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 48px); align-items: start; }
.contact-grid .content-image { margin-bottom: 20px; }
.contact-form label { display: block; margin-bottom: 16px; font-size: 0.9rem; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-on-dark);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--bg-accent);
}
.contact-form .hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.checkbox-label { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-label input { width: auto; margin-top: 4px; flex-shrink: 0; }

/* ── FAQ ── */
.faq-hero-image { margin-bottom: clamp(24px, 4vw, 36px); }
.faq-item { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.faq-item h2 { font-size: clamp(1.05rem, 2.2vw, 1.2rem); margin-bottom: 12px; }

/* ── Legal ── */
.legal-content { max-width: 720px; }
.legal-content h2 { margin-top: 32px; }
.legal-content ul { margin: 16px 0 16px 24px; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); margin-top: auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: clamp(24px, 4vw, 36px);
  padding: clamp(36px, 6vw, 52px) clamp(16px, 4vw, 32px);
  max-width: 1120px;
  margin: 0 auto;
}
.footer-bottom {
  padding: 20px clamp(16px, 4vw, 32px);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}
.footer-bottom a { color: var(--muted); }
.disclaimer { font-size: 0.8rem; color: var(--muted); margin-top: 12px; line-height: 1.55; }

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: var(--sidebar-w); right: 0;
  z-index: 300;
  padding: clamp(16px, 3vw, 22px) clamp(16px, 4vw, 32px);
  border-top: 1px solid var(--border);
  display: none;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
}
.cookie-banner.show { display: block; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cookie-custom { margin-top: 16px; display: none; }
.cookie-custom.show { display: block; }

.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 48px 16px; }

/* ── Sidebar overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 150;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* ── Reveal animation ── */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .pillar-card:hover, .service-card:hover { transform: none; }
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 520px; }
  .program-detail { grid-template-columns: minmax(180px, 220px) 1fr; }
  .program-detail--reverse { direction: ltr; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: min(300px, 88vw);
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar .btn { padding: 9px 14px; font-size: 0.8rem; }
  .hero-dashboard { min-height: auto; }
  .hero-stats { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .program-detail,
  .program-detail--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .program-detail figure { max-width: 100%; }
  .contact-grid,
  .service-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-banner { left: 0; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }
  .topbar .breadcrumb { display: none; }
  .cookie-actions { flex-direction: column; }
  .cookie-actions .btn { width: 100%; }
}
