/* === BACA Project page — local styles === */
.baca-hero {
  padding: 140px 0 80px;
  background: var(--page-mesh);
  position: relative;
  overflow: hidden;
}
.baca-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 40%, black 30%, transparent 80%);
  pointer-events: none;
}
.baca-hero .container { position: relative; z-index: 2; }
.baca-hero .crumbs {
  text-align: center; justify-content: center; display: flex;
  gap: 8px; color: var(--text-3); font-size: .9rem; margin-bottom: 24px;
}

/* Hero crest — single, large, animated logo */
.baca-hero .hero-crest {
  position: relative;
  width: clamp(160px, 22vw, 220px);
  height: clamp(160px, 22vw, 220px);
  margin: 0 auto 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  display: grid; place-items: center;
  box-shadow:
    0 0 0 1px var(--border-2),
    0 20px 60px -10px rgba(0,0,0,0.4),
    0 0 80px -20px rgba(26,168,189,0.4);
  animation: crestFloat 6s ease-in-out infinite;
}
.baca-hero .hero-crest::before,
.baca-hero .hero-crest::after {
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%; border: 1px dashed var(--border-2);
  animation: ring-rotate 24s linear infinite;
  pointer-events: none;
}
.baca-hero .hero-crest::after {
  inset: -22px;
  border-style: dotted;
  animation-duration: 36s;
  animation-direction: reverse;
  opacity: .6;
}
.baca-hero .hero-crest .crest-inner {
  width: 80%; height: 80%; border-radius: 50%;
  background: #ffffff;
  display: grid; place-items: center;
  padding: 18%;
  box-shadow: var(--shadow-card);
}
.baca-hero .hero-crest .crest-inner img {
  width: 100%; height: auto; max-height: 100%; object-fit: contain;
}
.baca-hero .hero-crest .orb {
  position: absolute;
  width: 12px; height: 12px; border-radius: 50%;
  filter: blur(0.5px);
  box-shadow: 0 0 18px currentColor;
}
.baca-hero .hero-crest .orb-1 { background: #f4b81e; color: #f4b81e; top: -2px; right: 36%; }
.baca-hero .hero-crest .orb-2 { background: #6bbe45; color: #6bbe45; bottom: 8%; right: -2px; }
.baca-hero .hero-crest .orb-3 { background: #3a96d4; color: #3a96d4; bottom: 8%; left: -2px; }

@keyframes crestFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes ring-rotate {
  to { transform: rotate(360deg); }
}

.baca-hero h1 {
  text-align: center;
  margin: 18px 0;
  /* Match the website's standard h1 size used on other pages */
}
.baca-hero .lead {
  text-align: center; max-width: 820px; margin: 0 auto;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--text-3);
  line-height: 1.85;
}
.baca-hero .meta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 32px;
}

/* About card */
.baca-about {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 40px;
  margin: 0 auto;
}
@media (max-width: 800px) {
  .baca-about { grid-template-columns: 1fr; text-align: center; padding: 28px; }
}
.baca-about .logo-card {
  width: 220px; height: 220px;
  background: #ffffff;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  padding: 28px; box-shadow: var(--shadow-card);
}
@media (max-width: 800px) { .baca-about .logo-card { margin: 0 auto; } }
.baca-about .logo-card img { width: 100%; height: auto; max-height: 160px; object-fit: contain; }
.baca-about h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.baca-about .latin-name {
  color: var(--c-gold); font-size: 0.9rem; letter-spacing: 0.04em;
  margin-bottom: 16px; font-weight: 500;
}
.baca-about p { font-size: 1.05rem; line-height: 1.85; margin-bottom: 20px; }
.quick-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.fact-pill {
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 12px 16px; border-radius: var(--r);
}
.fact-pill b {
  display: block; color: var(--c-teal); font-size: 0.8rem;
  font-weight: 500; margin-bottom: 4px;
}
.fact-pill span { color: var(--text); font-weight: 600; font-size: 0.95rem; }

/* Branches grid */
.branches-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.branch-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
  position: relative; overflow: hidden;
  transition: all .35s var(--ease);
}
.branch-card:hover {
  transform: translateY(-4px); border-color: var(--border-2);
  background: var(--surface-2);
}
.branch-card::before {
  content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px;
  background: var(--accent, var(--c-teal));
}
.branch-card .ico { font-size: 2.2rem; margin-bottom: 12px; line-height: 1; }
.branch-card h4 { font-size: 1.15rem; margin-bottom: 8px; color: var(--text); }
.branch-card .stat {
  font-size: 1.4rem; font-weight: 600; color: var(--c-sea);
  margin: 6px 0;
}
.branch-card .desc { font-size: 0.92rem; color: var(--text-3); }
.bc-yellow { --accent: #f4b81e; } .bc-yellow .stat { color: #f4b81e; }
.bc-green  { --accent: #6bbe45; } .bc-green .stat  { color: #6bbe45; }
.bc-blue   { --accent: #3a96d4; } .bc-blue .stat   { color: #3a96d4; }

/* KPI big numbers */
.kpis-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.kpi-big {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px; text-align: center;
}
.kpi-big .v {
  font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 600; color: var(--text);
  line-height: 1; margin: 8px 0;
}
.kpi-big.gradient .v {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.kpi-big .l { font-size: 0.92rem; color: var(--text-3); }

/* Challenge / Solution / Impact */
.cse-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px;
}
@media (max-width: 900px) { .cse-grid { grid-template-columns: 1fr; } }
.cse-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 32px;
  position: relative;
}
.cse-card::before {
  content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px;
  background: var(--accent);
}
.cse-card.challenge { --accent: var(--c-coral); }
.cse-card.solution  { --accent: var(--c-teal); }
.cse-card.impact    { --accent: var(--c-sea); }
.cse-card .ic {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent); font-size: 1.4rem;
  margin-bottom: 18px;
}
.cse-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.cse-card ul li {
  position: relative; padding-inline-start: 24px; margin: 10px 0;
  font-size: 0.98rem; color: var(--text-2); line-height: 1.7;
}
.cse-card ul li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.6em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* Module card */
.module-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 40px;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.module-card::before {
  content: ""; position: absolute; top: 0; inset-inline-start: 0; bottom: 0; width: 4px;
  background: var(--accent, var(--c-teal));
}
.module-card .header {
  display: flex; align-items: center; gap: 18px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.module-card .mod-num {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent-bg); color: var(--accent);
  font-size: 1.4rem; font-weight: 700;
  border: 1px solid var(--accent-bd);
}
.module-card .mod-title { flex: 1; }
.module-card .mod-title h3 {
  font-size: 1.5rem; margin-bottom: 4px; color: var(--text);
}
.module-card .mod-title code {
  background: var(--bg-alt); padding: 3px 10px; border-radius: 6px;
  font-family: var(--ff-mono); font-size: 0.85rem; color: var(--c-teal);
  direction: ltr; display: inline-block;
}
.module-card .row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
}
@media (max-width: 800px) { .module-card .row { grid-template-columns: 1fr; } }
.module-card .col-box {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
}
.module-card .col-box h4 {
  font-size: 0.95rem; color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.module-card .col-box p {
  font-size: 0.95rem; color: var(--text-2); line-height: 1.75;
}
.mc-teal  { --accent: var(--c-teal);  --accent-bg: rgba(26,168,189,.12); --accent-bd: rgba(26,168,189,.25); }
.mc-sea   { --accent: var(--c-sea);   --accent-bg: rgba(61,179,156,.12); --accent-bd: rgba(61,179,156,.25); }
.mc-gold  { --accent: var(--c-gold);  --accent-bg: rgba(200,161,74,.14); --accent-bd: rgba(200,161,74,.28); }
.mc-coral { --accent: var(--c-coral); --accent-bg: rgba(229,91,95,.12); --accent-bd: rgba(229,91,95,.25); }

/* Training section */
.training-step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 36px;
  margin-bottom: 28px;
}
.training-step .step-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
}
.training-step .step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 1.2rem;
  display: grid; place-items: center; flex-shrink: 0;
}
.training-step h3 { font-size: 1.5rem; margin: 0; }
.training-step .lead {
  font-size: 1.05rem; color: var(--text-2); line-height: 1.8;
  margin-bottom: 22px;
}
.screenshot-box {
  border: 2px solid var(--border-2); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
  background: #fff;
  margin: 18px 0;
}
.screenshot-box img { display: block; width: 100%; height: auto; }
.screenshot-box .caption {
  background: var(--bg-alt); color: var(--text-2);
  padding: 16px 22px; font-size: 0.95rem; line-height: 1.75;
  border-top: 1px solid var(--border);
}
.screenshot-box .caption b { color: var(--c-gold); }
.step-h4 {
  color: var(--c-teal); font-size: 1.1rem; font-weight: 600;
  margin: 22px 0 10px;
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--c-teal);
}
.step-list {
  list-style: none; counter-reset: stp; padding: 0; margin: 14px 0;
}
.step-list li {
  counter-increment: stp;
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 14px 18px;
  padding-inline-end: 60px;
  border-radius: var(--r-sm); margin-bottom: 8px;
  position: relative; font-size: 1rem; color: var(--text-2);
  border-inline-start: 3px solid var(--c-teal);
}
.step-list li::before {
  content: counter(stp); position: absolute; inset-inline-end: 14px; top: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c-teal); color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 0.9rem;
}

.fields-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-alt); border-radius: var(--r-sm);
  overflow: hidden; margin: 14px 0;
  font-size: 0.95rem;
}
.fields-table th {
  background: var(--surface-2); color: var(--c-gold);
  padding: 14px 16px; text-align: start; font-weight: 600;
  border-bottom: 2px solid var(--c-gold);
}
.fields-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-2); vertical-align: top;
}
.fields-table tr:last-child td { border-bottom: none; }
.fields-table .fname { color: var(--c-teal); font-weight: 600; white-space: nowrap; }
.fields-table .fname code {
  display: block; font-size: 0.75rem; color: var(--text-4);
  margin-top: 3px; font-family: var(--ff-mono);
}
.fields-table .fexample { color: var(--c-sea); font-weight: 500; font-style: italic; }
.fields-table .req {
  display: inline-block; background: var(--c-coral); color: #fff;
  font-size: 0.65rem; padding: 2px 6px; border-radius: 4px;
  margin-inline-start: 6px;
}

.status-flow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px; background: var(--bg-alt); border-radius: var(--r);
  margin: 16px 0; border: 1px solid var(--border);
}
.status-chip {
  padding: 10px 18px; border-radius: 999px; font-weight: 600;
  font-size: 0.92rem; border: 1px solid;
}
.sc-gray  { background: rgba(91,96,114,.18); color: var(--text-3); border-color: var(--text-4); }
.sc-teal  { background: rgba(26,168,189,.18); color: var(--c-teal); border-color: var(--c-teal); }
.sc-gold  { background: rgba(200,161,74,.18); color: var(--c-gold); border-color: var(--c-gold); }
.sc-sea   { background: rgba(61,179,156,.18); color: var(--c-sea); border-color: var(--c-sea); }
.sc-coral { background: rgba(229,91,95,.18); color: var(--c-coral); border-color: var(--c-coral); }
.status-arrow { color: var(--c-gold); font-weight: 700; font-size: 1.1rem; }

.je-table {
  width: 100%; border-collapse: collapse; margin: 14px 0;
  background: var(--bg-alt); border-radius: var(--r-sm); overflow: hidden;
}
.je-table th {
  background: var(--surface-2); color: var(--c-gold);
  padding: 14px 16px; text-align: start; font-weight: 600;
  border-bottom: 2px solid var(--c-gold); font-size: 0.92rem;
}
.je-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.je-table td.debit  { color: var(--c-sea);   font-weight: 600; font-family: var(--ff-mono); }
.je-table td.credit { color: var(--c-coral); font-weight: 600; font-family: var(--ff-mono); }
.je-table tfoot td {
  background: var(--surface-2); font-weight: 700;
  border-top: 2px solid var(--c-gold); border-bottom: none;
}

.alert {
  padding: 16px 20px; border-radius: var(--r); margin: 16px 0;
  border: 1px solid; font-size: 0.98rem; line-height: 1.7;
  border-inline-start-width: 4px;
}
.alert.note { background: rgba(26,168,189,.06); border-color: var(--c-teal); color: var(--text-2); }
.alert.tip  { background: rgba(200,161,74,.06); border-color: var(--c-gold); color: var(--text-2); }
.alert.warn { background: rgba(229,91,95,.06); border-color: var(--c-coral); color: var(--text-2); }
