/* =========================================================================
   Web pública de Beyond Borders (index, how-it-works, community, meet-us).
   El panel interno usa style.css + portal.css; este fichero no le afecta.
   ========================================================================= */

:root {
  --bb-cream: #F5F1DF;
  --bb-paper: #FFFCEF;
  --bb-sand: #EAE3CA;
  --bb-line: #E3DECB;
  --bb-indigo: #5758A6;
  --bb-lime: #DAE360;
  --bb-ink: #343433;
  --bb-muted: #6B6A66;
  --bb-font: Gopher, Urbanist, system-ui, sans-serif;
  --bb-hand: Caveat, cursive;
}

html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bb-cream); color: var(--bb-ink);
  font-family: var(--bb-font); font-size: 16px; line-height: 1.6;
}
h1, h2, h3, h4, p, a, li, span, blockquote { font-family: inherit; }
a { color: var(--bb-indigo); }
a:hover { color: var(--bb-ink); }
img { max-width: 100%; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; background: var(--bb-paper); padding: 8px 14px; border-radius: 8px; }

/* ---- Utilidades de texto ---- */
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bb-indigo); }
.eyebrow.on-dark { color: var(--bb-lime); font-weight: 600; }
.c-indigo { color: var(--bb-indigo); }
.hl { background: linear-gradient(transparent 58%, var(--bb-lime) 58%, var(--bb-lime) 92%, transparent 92%); padding: 0 6px; }
.hl-sm { background: linear-gradient(transparent 60%, var(--bb-lime) 60%, var(--bb-lime) 92%, transparent 92%); padding: 0 4px; }
.hand { font-family: var(--bb-hand); }
.bb-h1 { margin: 0; font-size: 64px; line-height: 1.03; font-weight: 800; letter-spacing: -.04em; color: var(--bb-ink); }
.bb-h1.sub { font-size: 60px; max-width: 900px; }
.bb-h2 { margin: 0; font-size: 44px; line-height: 1.1; font-weight: 800; letter-spacing: -.04em; color: var(--bb-indigo); }
.bb-h2.lg { font-size: 48px; line-height: 1.08; }
.bb-h2.ink { color: var(--bb-ink); }
.lead { margin: 0; font-size: 21px; line-height: 1.45; font-weight: 600; max-width: 760px; }
.body-lg { margin: 0; font-size: 19px; line-height: 1.5; }
.body-md { margin: 0; font-size: 18px; line-height: 1.55; }

/* ---- Botones ---- */
.btn { text-decoration: none; font-weight: 700; font-size: 17px; padding: 16px 28px; border-radius: 999px;
       display: inline-flex; align-items: center; gap: 10px; box-sizing: border-box; }
.btn-lime { background: var(--bb-lime); color: var(--bb-ink); border: 2px solid var(--bb-indigo); }
.btn-lime:hover { color: var(--bb-ink); filter: brightness(.97); }
.btn-lg { font-size: 19px; padding: 18px 32px; }
.btn-outline { border: 2px solid var(--bb-indigo); color: var(--bb-ink); font-weight: 600; padding: 14px 26px; }
.btn-indigo { background: var(--bb-indigo); color: var(--bb-paper); }
.btn-indigo:hover { color: var(--bb-lime); }
.btn-outline-lime { color: var(--bb-lime); border: 2px solid var(--bb-lime); padding: 14px 26px; }
.btn-outline-lime:hover { color: var(--bb-paper); border-color: var(--bb-paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center { display: flex; justify-content: center; }

/* ---- Contenedores ---- */
/* max-width = ancho del contenido (sin el padding), igual que en el diseño */
.wrap { max-width: 1240px; margin: 0 auto; padding: 64px 32px; display: flex; flex-direction: column; }
.wrap.wide { max-width: 1320px; }
.bg-cream { background: var(--bb-cream); }
.bg-sand { background: var(--bb-sand); }
.bg-indigo { background: var(--bb-indigo); color: var(--bb-paper); }

/* ---- Cabecera ---- */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--bb-cream); border-bottom: 1px solid var(--bb-line); }
.site-header > div { max-width: 1240px; margin: 0 auto; padding: 16px 32px; display: flex; flex-wrap: wrap;
                     align-items: center; justify-content: space-between; gap: 16px; }
.site-header .logo { display: flex; align-items: center; }
.site-header .logo img { height: 40px; width: auto; display: block; }
.bb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.bb-nav > a { color: var(--bb-ink); text-decoration: none; }
.bb-nav > a.active { color: var(--bb-indigo); font-weight: 700; }
.bb-nav > a.btn-lime { padding: 12px 22px; min-height: 44px; font-size: 15px; }
.bb-util { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.bb-util a { color: var(--bb-muted); text-decoration: none; }
.bb-util a.on { color: var(--bb-indigo); }
.bb-util .sep { width: 1px; height: 16px; background: var(--bb-line); }

/* ---- Pie ---- */
.site-footer { background: var(--bb-sand); color: var(--bb-ink); }
.site-footer > div { max-width: 1240px; margin: 0 auto; padding: 48px 32px; display: flex; flex-wrap: wrap;
                     justify-content: space-between; gap: 32px; font-size: 15px; }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; }
.site-footer .col img { height: 36px; width: auto; display: block; }
.site-footer .muted { color: var(--bb-muted); }

/* ---- Bloque final "Ready to start?" ---- */
.cta-final > div { padding: 88px 32px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.cta-final h2 { margin: 0; font-size: 48px; line-height: 1.05; font-weight: 800; letter-spacing: -.04em; color: var(--bb-paper); }
.cta-final p { margin: 0; font-size: 19px; color: var(--bb-paper); }
.cta-final .txt { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }

/* ---- Lista con check ---- */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; }
.checks .tick { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--bb-indigo);
                display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.checks.sm { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; margin-top: 4px; }
.checks.sm li { gap: 10px; align-items: center; font-size: 15px; font-weight: 600; }
.checks.sm .tick { width: 22px; height: 22px; margin-top: 0; }

/* ---- Inicio: carrusel de polaroids y logos ---- */
.row-scroller { display: flex; align-items: center; gap: 16px; }
.row-scroller .track { flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; overflow-x: auto;
                       scroll-snap-type: x proximity; scrollbar-width: none; }
.row-scroller .track::-webkit-scrollbar { display: none; }
.bb-arrow { flex: none; width: 52px; height: 52px; border-radius: 999px; border: 2px solid var(--bb-indigo); background: var(--bb-cream);
            color: var(--bb-indigo); font-size: 22px; font-weight: 700; cursor: pointer; display: flex; align-items: center;
            justify-content: center; font-family: inherit; }
#heroRow { gap: 20px; padding: 20px 12px 28px; }
.polaroid { margin: 0; flex: none; background: var(--bb-paper); padding: 9px 9px 11px; box-shadow: 0 8px 22px rgba(52,52,51,.18);
            display: flex; flex-direction: column; gap: 10px; }
#heroRow .polaroid { width: 170px; scroll-snap-align: start; }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.polaroid figcaption { font-family: var(--bb-hand); font-size: 19px; line-height: 1; text-align: center; color: var(--bb-ink); }
.polaroid.lg { padding: 14px 14px 18px; box-shadow: 0 10px 28px rgba(52,52,51,.18); gap: 12px; }
.polaroid.lg img { object-position: center 30%; }
.polaroid.lg figcaption { font-size: 30px; }
#uniRow { gap: 64px; align-items: center; padding: 12px 8px; }
#uniRow img { flex: none; height: 72px; width: auto; max-width: 260px; object-fit: contain; scroll-snap-align: start; display: block; }

.bb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 24px; padding-top: 40px; border-top: 2px solid var(--bb-sand); }
.bb-stats > div { display: flex; flex-direction: column; gap: 12px; }
.bb-stat { margin: 0; font-size: 96px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--bb-indigo); }
.bb-stats > div > p:last-child { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; max-width: 320px; }

/* ---- Tarjetas que giran (5 pasos) ---- */
.flip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 14px; overflow-x: auto; }
.flip { perspective: 1200px; height: 290px; cursor: pointer; outline: none; }
.flip-in { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.flip:hover .flip-in, .flip:focus .flip-in, .flip:focus-within .flip-in { transform: rotateY(180deg); }
.flip-f, .flip-b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px;
                   padding: 20px 18px; box-sizing: border-box; display: flex; flex-direction: column; }
.flip-f { background: var(--bb-paper); color: var(--bb-ink); justify-content: space-between; }
.flip-b { background: var(--bb-lime); color: var(--bb-ink); transform: rotateY(180deg); gap: 12px; }
.flip-f .num { font-size: 44px; font-weight: 800; color: var(--bb-indigo); line-height: 1; letter-spacing: -.04em; }
.flip-f .txt { display: flex; flex-direction: column; gap: 8px; }
.flip-f h3 { margin: 0; font-size: 19px; line-height: 1.2; font-weight: 800; color: var(--bb-ink); }
.flip-f p { margin: 0; font-size: 16px; color: var(--bb-muted); }
.flip-f .more { font-size: 13px; font-weight: 700; color: var(--bb-indigo); letter-spacing: .04em; text-transform: uppercase; }
.flip-b > span { font-size: 22px; font-weight: 800; color: var(--bb-indigo); line-height: 1; }
.flip-b h3 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 800; }
.flip-b p { margin: 0; font-size: 14.5px; line-height: 1.45; }

/* ---- Mentores y testimonios ---- */
.bb-mentors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.mentor { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.mentor img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; background: var(--bb-cream); }
.mentor figcaption { display: flex; flex-direction: column; gap: 4px; }
.mentor strong { font-size: 18px; }
.mentor .role { font-size: 15px; }
.mentor .studied { font-size: 14px; color: var(--bb-indigo); font-weight: 600; }
.mentor.sm { gap: 10px; }
.mentor.sm img { border-radius: 14px; }
.mentor.sm strong { font-size: 16px; }
.mentor.sm .role { font-size: 14px; }
.mentor.sm .studied { font-size: 13px; }

.bb-testis { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.testi { margin: 0; background: var(--bb-paper); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.testi img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.testi .body { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.testi blockquote { margin: 0; font-size: 16px; }
.testi figcaption { margin-top: auto; }
.testi .course { color: var(--bb-muted); font-size: 14px; }

/* ---- How it works (página) ---- */
.hw-row { display: flex; flex-direction: row; align-items: center; gap: 56px; }
.hw-row.rev { flex-direction: row-reverse; }
.hw-art { flex: 0 0 240px; height: 220px; display: flex; align-items: center; justify-content: center; }
.hw-art img { max-width: 100%; max-height: 100%; display: block; }
.hw-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.hw-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hw-num { font-size: 56px; line-height: .9; font-weight: 800; letter-spacing: -.04em; color: var(--bb-indigo); }
.hw-txt h2 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: var(--bb-ink); }
.hw-script { margin: 0; font-family: var(--bb-hand); font-size: 26px; line-height: 1.1; color: var(--bb-indigo); }
.hw-txt > p:not(.hw-script) { margin: 0; font-size: 17px; line-height: 1.5; }
.hw-path { display: block; width: 100%; height: 90px; overflow: visible; }

/* ---- Community ---- */
.cm-big { margin: 0; font-size: 120px; line-height: .9; font-weight: 800; letter-spacing: -.05em; color: var(--bb-lime); }
.cm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cm-card { background: var(--bb-paper); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.cm-card .head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.cm-card .num { font-size: 44px; line-height: .9; font-weight: 800; letter-spacing: -.04em; color: var(--bb-indigo); }
.cm-card h3 { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: var(--bb-ink); }
.cm-card > p { margin: 0; font-size: 16px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 13px; font-weight: 600; color: var(--bb-indigo); border: 1.5px solid var(--bb-indigo); border-radius: 999px; padding: 5px 12px; }
.cm-mentors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 6px; }
.cm-else { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; background: var(--bb-sand); border-radius: 24px; padding: 28px 32px; }
.cm-else p { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 600; max-width: 640px; }

/* ---- Meet us ---- */
.ab-letter { flex: 1 1 520px; min-width: 0; background: var(--bb-paper); border-radius: 6px; padding: 48px 52px; box-shadow: 0 10px 28px rgba(52,52,51,.12);
             transform: rotate(-.6deg); display: flex; flex-direction: column; gap: 18px; }
.ab-letter p { margin: 0; font-size: 18px; line-height: 1.65; }
.ab-letter .hand { font-size: 34px; line-height: 1; color: var(--bb-indigo); }
.ab-letter .hand.sign { margin-top: 6px; color: var(--bb-ink); }
.ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.ab-founder { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.ab-founder .polaroid { width: 280px; }
.bubble { position: relative; background: var(--bb-paper); border-radius: 24px; padding: 26px 28px; max-width: 460px; }
.bubble::before { content: ""; position: absolute; top: -14px; left: 50%; margin-left: -14px; width: 28px; height: 28px; background: var(--bb-paper); transform: rotate(45deg); }
.bubble p { position: relative; margin: 0; font-size: 17px; line-height: 1.55; }
.bubble .eyebrow { margin-top: 12px; }

/* ---- Móvil ---- */
@media (max-width: 700px) {
  section > div, .site-header > div, .site-footer > div { padding-left: 20px !important; padding-right: 20px !important; }
  section > div { padding-top: 48px !important; padding-bottom: 48px !important; gap: 28px !important; }
  .bb-nav > a:not(:last-child), .bb-util { display: none !important; }
  .bb-nav > a:last-child { padding: 9px 13px !important; font-size: 13px !important; white-space: nowrap; min-height: 0 !important; }
  .site-header .logo img { height: 28px; }
  .site-header > div { flex-wrap: nowrap; gap: 10px; }
  .bb-nav { gap: 0; }
  .bb-h1, .bb-h1.sub { font-size: 38px; }
  .bb-h2, .bb-h2.lg, .cta-final h2 { font-size: 32px; }
  .bb-stats { grid-template-columns: 1fr; gap: 18px; padding-top: 24px; }
  .bb-stats > div { flex-direction: row; align-items: center; gap: 16px; }
  .bb-stat { font-size: 48px; flex: none; min-width: 128px; }
  .bb-stats > div > p:last-child { font-size: 15px; }
  .bb-mentors, .bb-testis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -20px;
                            padding: 0 20px 8px; scroll-padding: 0 20px; scrollbar-width: none; }
  .bb-mentors > figure { flex: none; width: 62%; scroll-snap-align: start; }
  .bb-testis > figure { flex: none; width: 84%; scroll-snap-align: start; }
  .bb-testis img { aspect-ratio: 1 / 1; }
  .bb-arrow { display: none !important; }
  #uniRow { gap: 40px; }
  #uniRow img { height: 52px; }
  .flip-list { grid-template-columns: 1fr; overflow: visible; gap: 10px; }
  .flip { height: auto; perspective: none; }
  .flip-in { transform: none !important; height: auto; }
  .flip-f { display: none; }
  .flip-b { position: static; transform: none; background: var(--bb-paper); display: grid; grid-template-columns: 40px 1fr;
            column-gap: 12px; row-gap: 4px; padding: 18px; border-radius: 16px; }
  .flip-b > span { grid-row: 1 / 3; font-size: 24px; padding-top: 1px; }
  .flip-b h3 { font-size: 17px; }
  .flip-b p { grid-column: 2; font-size: 15px; line-height: 1.45; }
  .hw-row, .hw-row.rev { flex-direction: column; gap: 12px; align-items: flex-start; }
  .hw-art { flex: none; width: 150px; height: 150px; }
  .hw-num { font-size: 44px; }
  .hw-path { display: none; }
  .hw-row + .hw-row, .hw-path + .hw-row { margin-top: 44px; }
  .cm-grid { grid-template-columns: 1fr; gap: 16px; }
  .cm-card { padding: 22px; }
  .cm-big { font-size: 84px; }
  .ab-hero { padding-top: 40px !important; }
  .ab-hero > .polaroid { width: 82% !important; margin: 0 auto; }
  .ab-letter { padding: 30px 24px; }
  .ab-grid { grid-template-columns: 1fr; gap: 48px; }
  .ab-founder .polaroid { width: 74%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flip-in { transition: none; }
}

/* Pantallas medianas: la cabecera completa no cabe; idioma y área de clientes siguen en el pie. */
@media (max-width: 1180px) and (min-width: 701px) {
  .bb-util { display: none; }
  .bb-nav { gap: 22px; }
}
