/* site.css: layout y componentes de francristaldo.com.
   Solo variables de tokens.css (snapshot de M&B) y brand.css (capa propia): cero hex.
   Estructura y motion portados de Repo-M&B/index.html (nav, hero, .mb-aos, .btn-fill)
   y de Repo-M&B/hola.html (sección Mate & Build, escalera, marquee, cta-final).
   El texto chico en verde usa --green-dark: el verde base sobre crema no llega a 4.5:1. */

/* ---- fuentes: Outfit e Inter servidas desde el sitio (licencia OFL), subset latin variable de
   Google Fonts. Sin la hoja de fonts.googleapis.com, que bloqueaba el primer pintado ---- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url(/assets/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white);
  padding: 10px 18px; border-radius: var(--btn-radius);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: calc(var(--wrap-narrow) + 48px); }
.center { text-align: center; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nav-border);
}
.nav-inner {
  max-width: var(--wrap); height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.nav-logo-accent { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  display: inline-block; padding: 10px 0;
  font-size: 14px; font-weight: 500; color: var(--ink2); text-decoration: none;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--green-dark); }
.nav-links .nav-cta {
  padding: 10px 22px; border-radius: var(--btn-radius);
  background: var(--ink); color: var(--white);
  font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-md);
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
.nav-links .nav-cta:hover { color: var(--white); background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---- card (hero) ---- */
.hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex; align-items: center;
  padding: 48px 0 64px;
  overflow: hidden;
}
.hero-inner {
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 64px; align-items: center;
}
.hero-photo { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-photo::before {
  content: ''; position: absolute; width: 120%; height: 120%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, var(--green-tint-10) 0%, var(--halo-fade) 70%);
}
.hero-halo {
  position: absolute; top: 50%; left: 50%; z-index: 0; pointer-events: none;
  width: 340px; height: 340px; border-radius: 50%;
  background: var(--green-tint-15);
  transform: translate(-50%, -50%);
}
.hero-deco { position: absolute; z-index: 3; pointer-events: none; color: var(--green); }
.hero-deco--curva { top: 8%; right: -18px; opacity: .45; }
.hero-deco--circulo { bottom: 12%; left: -28px; opacity: .38; }
.hero-deco--squiggle { bottom: 22%; right: -36px; opacity: .4; color: var(--cta-orange); }

.photo-rect {
  position: relative; z-index: 1;
  width: 400px; max-width: 100%; aspect-ratio: 4 / 5;
  border-radius: 32px; overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: rotate(-2deg);
  transition: transform .4s ease;
}
.photo-rect:hover { transform: rotate(0deg) scale(1.02); }
.photo-rect img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--green-dark); margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.04em;
  color: var(--ink); margin-bottom: 24px; text-wrap: balance;
}
.underline-deco { display: inline-block; position: relative; }
.underline-deco svg {
  position: absolute; bottom: -6px; left: 0;
  width: 100%; height: 12px; overflow: visible; color: var(--green);
}
.underline-deco svg path { stroke-dasharray: 300; stroke-dashoffset: 300; animation: drawLine 1.2s ease-out forwards .5s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.hero-sub { font-size: 18px; line-height: 1.7; color: var(--ink2); max-width: 520px; }
.mantra {
  margin-top: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; color: var(--ink2);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.redes { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin-top: 24px; }
.redes a {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-tint-10); color: var(--green-dark);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.redes a:hover { background: var(--green); color: var(--white); transform: translateY(-3px); }
.redes svg { width: 20px; height: 20px; }

.pie {
  margin-top: 24px; padding-top: 18px; max-width: 520px;
  border-top: 1px solid var(--border);
  font-size: 14px; color: var(--ink2);
}
.pie a {
  display: inline-block; margin-top: 4px; padding: 4px 0;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--green-dark); text-decoration: none;
}
.pie a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- secciones ---- */
.section { padding: var(--section-pad) 0; }
.section--line { border-top: 1px solid var(--border); }
.section--alt { background: var(--cream2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.badge {
  display: inline-block; padding: 6px 13px; border-radius: var(--eyebrow-radius);
  background: var(--green-tint-10); color: var(--green-dark);
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.section-title {
  margin-top: 16px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 4.2vw, 42px); line-height: 1.12; letter-spacing: -0.03em;
  color: var(--ink); text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--green); }
.section-title.is-soon { color: var(--ink2); }
.lead { margin-top: 20px; font-size: 17px; line-height: 1.7; color: var(--ink2); }
.lead + .lead { margin-top: 14px; }
.lead strong { color: var(--ink); font-weight: 600; }

/* ---- casos ---- */
.casos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.caso {
  display: flex; flex-direction: column;
  padding: 28px 24px;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.caso:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.caso-meta { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.caso-title { margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.caso-text { flex: 1; margin-top: 10px; font-size: 15px; color: var(--ink2); }
.caso-link {
  align-self: flex-start; margin-top: 18px; padding: 4px 0;
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px;
  color: var(--green-dark); text-decoration: none;
}
.caso-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- mate & build (hola.html) ---- */
.mb-info { padding: var(--section-pad) 0; background: var(--cream2); border-top: 1px solid var(--border); overflow: hidden; }
.mb-info .section-title { font-size: clamp(28px, 4vw, 38px); }
.squiggle-info { width: 180px; height: 11px; margin: 12px auto 0; color: var(--green); }

.pasos { position: relative; margin-top: 44px; text-align: left; }
.rail { position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--border); }
.rail-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; border-radius: 2px; background: var(--green); }
.paso { position: relative; padding: 0 0 32px 62px; }
.paso:last-child { padding-bottom: 0; }
.paso .num {
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 2px solid var(--border);
  font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--ink2);
  transition: background .35s ease, border-color .35s ease, color .35s ease;
}
.paso.activo .num { background: var(--green); border-color: var(--green); color: var(--white); }
.etapa { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--green-dark); }
.paso h3 { margin-top: 3px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.paso p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--ink2); }

.kicker { margin-top: 40px; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.35; letter-spacing: -0.015em; }
.kicker em { font-style: italic; color: var(--green); }

.equipos-label {
  margin-top: 56px; text-align: center;
  font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink2);
}
.marquee { margin-top: 20px; overflow: hidden; }
.marquee-track {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 24px 52px; min-height: 62px; padding: 8px 24px;
}
.marquee.is-loop {
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--ink) 12%, var(--ink) 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, var(--ink) 12%, var(--ink) 88%, transparent);
}
.marquee.is-loop .marquee-track {
  flex-wrap: nowrap; justify-content: flex-start;
  width: max-content; padding: 8px 0;
  animation: marquee 60s linear infinite;
}
.marquee.is-loop:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-track img { height: 22px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .6; }
.marquee-track img.lg-18 { height: 18px; }
.marquee-track img.lg-20 { height: 20px; }
.marquee-track img.lg-28 { height: 28px; }
.marquee-track img.lg-30 { height: 30px; }
.marquee-track img.lg-36 { height: 36px; }
.marquee-track img.lg-46 { height: 46px; }

.cta-final {
  margin-top: 48px; padding: 32px 28px; text-align: center;
  background: var(--green); color: var(--white);
  border-radius: 22px; box-shadow: var(--shadow-md);
}
.cta-final h3 { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.cta-final p { margin-top: 8px; font-size: 15px; color: var(--white); }
.btn-cta {
  display: inline-block; margin-top: 20px; padding: 14px 28px;
  background: var(--cream); color: var(--ink);
  border-radius: var(--btn-radius);
  font-family: var(--font-display); font-weight: 700; font-size: 15px; text-decoration: none;
  transition: transform .2s ease;
}
.btn-cta:hover { transform: translateY(-2px); }
.sitio {
  display: inline-block; margin-top: 22px; padding: 4px 0;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--green-dark); text-decoration: none;
}
.sitio:hover { text-decoration: underline; text-underline-offset: 3px; }

.cierre {
  margin-top: 36px; padding: 18px 20px; text-align: left;
  background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--green);
  border-radius: 14px; box-shadow: var(--shadow-md);
}
.cierre strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); }
.cierre span { display: block; margin-top: 7px; font-size: 15px; line-height: 1.55; color: var(--ink2); }

/* ---- sobre mí (el "Sobre mí" de Repo-M&B/index.html) ---- */
.sobre-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.title-accent { display: block; color: var(--green); }
.fotos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; border-radius: 20px; }
.foto {
  overflow: hidden; border-radius: 20px; background: var(--cream);
  box-shadow: var(--shadow-md);
  transition: transform .4s ease-out, box-shadow .4s ease-out;
}
.foto:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease-out; }
.foto:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .foto, .foto img { transition: none; }
  .foto:hover, .foto:hover img { transform: none; }
}
.foto--h { aspect-ratio: 3 / 2; }
.foto--v { aspect-ratio: 2 / 3; }
@media (max-width: 900px) {
  .sobre-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .fotos {
    display: flex; align-items: center; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px;
    scrollbar-width: none;
  }
  .fotos::-webkit-scrollbar { display: none; }
  .foto { flex: 0 0 auto; scroll-snap-align: start; }
  .foto--h { width: min(78vw, 420px); }
  .foto--v { width: min(52vw, 280px); }
}

/* ---- botones ---- */
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.center .acciones { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: var(--btn-radius); border: 1.5px solid transparent;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .3s cubic-bezier(0.4, 0, 0.2, 1), background .3s ease, border-color .3s ease, color .3s ease;
}
.btn-fill { background: var(--ink); color: var(--white); box-shadow: var(--shadow-md); }
.btn-fill:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--green-dark); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { transform: translateY(-2px); border-color: var(--green); color: var(--green-dark); }

/* ---- footer ---- */
.footer { padding: 48px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); font-size: 14px; color: var(--ink2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px; }
.footer a { display: inline-block; padding: 5px 0; color: var(--ink2); text-decoration: none; font-weight: 500; }
.footer a:hover { color: var(--green-dark); }
.footer .nav-logo { padding: 0; color: var(--ink); font-weight: 800; }
.footer-brand p { margin-top: 6px; }
.footer .footer-mb { font-family: var(--font-display); font-weight: 700; color: var(--green-dark); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.footer-cols ul { list-style: none; }
.footer-h { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }

/* ---- 404 ---- */
.notfound {
  display: flex; align-items: center;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  padding: var(--section-pad) 0;
}

/* ---- motion: reveals (Repo-M&B/index.html). .mb-aos lo pone site.js ---- */
.mb-aos [data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: .7s;
  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
.mb-aos [data-aos="fade-up"] { transform: translateY(24px); }
.mb-aos [data-aos="fade-right"] { transform: translateX(-28px); }
.mb-aos [data-aos="fade-left"] { transform: translateX(28px); }
.mb-aos [data-aos].aos-animate { opacity: 1; transform: none; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero { min-height: 0; padding: 36px 0 64px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .photo-rect { width: min(220px, 58vw); border-radius: 24px; }
  .hero-halo { width: 220px; height: 220px; }
  .hero-deco--curva { right: calc(50% - 150px); }
  .hero-deco--circulo { left: calc(50% - 150px); }
  .hero-deco--squiggle { right: calc(50% - 156px); }
  .casos-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav-links li:not(:last-child) { display: none; }
  .nav-links .nav-cta { padding: 9px 16px; font-size: 13px; }
}
@media (max-width: 480px) {
  .wrap, .nav-inner, .hero-inner { padding: 0 20px; }
  .hero-sub, .lead { font-size: 16px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .cta-final { padding: 28px 20px; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mb-aos [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .underline-deco svg path { animation: none; stroke-dashoffset: 0; }
  .photo-rect, .btn, .btn-cta, .redes a, .caso, .paso .num, .nav-links .nav-cta { transition: none; }
  .marquee.is-loop .marquee-track { animation: none; }
}
