/* ==========================================================================
   Bolsa de Trabajo · Viejos Verdes de Uni — grupo no oficial
   Sistema: warm humanist (receta mailchimp-freddie adaptada a verde club)
   ========================================================================== */

:root {
  --verde: #2D5A3D;
  --verde-osc: #1E3D2A;
  --verde-suave: #DCE8DD;
  --crema: #FAF3E8;
  --papel: #FFFDF8;
  --tinta: #241C15;
  --tinta-suave: #5C5548;
  --gris: #8A8378;
  --acento: #E8684A;
  --acento-osc: #C9502F;
  --borde: rgba(36, 28, 21, 0.16);
  --borde-fuerte: #241C15;
  --sombra: 0 4px 12px rgba(36, 28, 21, 0.08);
  --sombra-lift: 0 14px 28px rgba(36, 28, 21, 0.14);
  --radio: 14px;
  --fuente: "Bricolage Grotesque", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente);
  background: var(--crema);
  color: var(--tinta);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.08; text-wrap: pretty; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--verde);
  color: var(--crema);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 0 rgba(36, 28, 21, 0.25);
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--crema);
  color: var(--verde);
  font-weight: 800;
  border-radius: 50%;
  border: 2px solid var(--tinta);
  font-size: 15px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.brand-name small { display: block; font-weight: 500; font-size: 0.72rem; opacity: 0.85; letter-spacing: 0.02em; }
.topnav { display: flex; align-items: center; gap: 18px; font-weight: 600; font-size: 0.95rem; }
.topnav a { text-decoration: none; opacity: 0.92; }
.topnav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.nav-cta {
  background: var(--acento);
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--tinta);
  box-shadow: 2px 2px 0 var(--tinta);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-cta:hover { text-decoration: none !important; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--tinta); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid var(--tinta);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  box-shadow: 3px 3px 0 var(--tinta);
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 5px 5px 0 var(--tinta); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--tinta); }
.btn-crema { background: var(--crema); color: var(--tinta); }
.btn-outline-crema { background: transparent; color: var(--crema); border-color: var(--crema); box-shadow: 3px 3px 0 rgba(250, 243, 232, 0.35); }
.btn-outline-crema:hover { box-shadow: 5px 5px 0 rgba(250, 243, 232, 0.45); }
.btn-acento { background: var(--acento); color: var(--crema); }
.btn-acento:hover { background: var(--acento-osc); }
.btn-big { font-size: 1.1rem; padding: 16px 32px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--verde);
  color: var(--crema);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 76px 20px 84px;
  position: relative;
  z-index: 2;
}
.hero-inner > * {
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero-inner > *:nth-child(2) { animation-delay: 0.08s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.16s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.24s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: #BFE3C6; }
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 34em;
  margin-bottom: 34px;
  opacity: 0.95;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-count { font-size: 0.95rem; opacity: 0.85; }
.hero-count span { font-weight: 800; font-size: 1.15em; }

/* Pelota de rugby decorativa */
.hero-ball {
  position: absolute;
  right: -60px;
  bottom: -110px;
  width: 380px;
  height: 230px;
  border-radius: 50%;
  background: var(--verde-osc);
  transform: rotate(-22deg);
  opacity: 0.55;
  animation: drift 9s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: rotate(-22deg) translateY(0); }
  50% { transform: rotate(-22deg) translateY(-14px); }
}
.hero-ball::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 3px dashed rgba(250, 243, 232, 0.4);
}

/* Línea de cancha */
.pitch-line {
  height: 0;
  border-top: 3px dashed rgba(45, 90, 61, 0.35);
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------- Sección bolsa ---------- */
.bolsa {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}
.section-head { margin-bottom: 28px; }
.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-head p { color: var(--tinta-suave); max-width: 40em; }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 14px;
}
#search {
  width: 100%;
  max-width: 460px;
  padding: 13px 20px;
  font: inherit;
  font-size: 1rem;
  background: var(--papel);
  border: 2px solid var(--tinta);
  border-radius: 999px;
  box-shadow: 3px 3px 0 rgba(36, 28, 21, 0.18);
  outline: none;
  transition: box-shadow 0.15s ease;
}
#search:focus { box-shadow: 4px 4px 0 var(--verde); }
#search::placeholder { color: var(--gris); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 2px solid var(--tinta);
  background: var(--papel);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.chip:hover { transform: translateY(-2px); box-shadow: 2px 3px 0 rgba(36, 28, 21, 0.25); }
.chip[aria-selected="true"] { background: var(--tinta); color: var(--crema); }

.result-count { font-size: 0.88rem; color: var(--gris); margin-bottom: 18px; min-height: 1.4em; }

/* ---------- Tarjetas ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.card {
  background: var(--papel);
  border: 2px solid var(--tinta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  animation: cardIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sombra-lift); border-color: var(--verde); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-top { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--verde);
  color: var(--crema);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
  border: 2px solid var(--tinta);
  flex-shrink: 0;
}
.card-nombre { font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.card-rubro { font-size: 0.8rem; font-weight: 600; color: var(--verde); text-transform: uppercase; letter-spacing: 0.05em; }

.card-servicio { font-size: 1.02rem; font-weight: 600; line-height: 1.4; }
.card-obs { color: var(--tinta-suave); font-size: 0.92rem; line-height: 1.5; }

.card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tinta-suave);
  background: var(--verde-suave);
  padding: 4px 12px;
  border-radius: 999px;
}
.meta-tag a { color: inherit; text-decoration: none; }
.meta-tag a:hover { text-decoration: underline; }

.card-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn-contact {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid var(--tinta);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}
.btn-contact:hover { transform: translateY(-2px); }
.btn-wa { background: var(--verde); color: var(--crema); box-shadow: 2px 2px 0 var(--tinta); }
.btn-wa:hover { box-shadow: 4px 4px 0 var(--tinta); }
.btn-mail { background: var(--crema); color: var(--tinta); }
.btn-mail:hover { background: var(--papel); box-shadow: 2px 2px 0 var(--tinta); }
.btn-contact svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--tinta-suave); }
.empty-title { font-size: 1.4rem; font-weight: 700; color: var(--tinta); margin-bottom: 6px; }

/* ---------- Sumate ---------- */
.sumate { padding: 30px 20px 80px; }
.sumate-card {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--verde);
  color: var(--crema);
  border: 2px solid var(--tinta);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--tinta);
  padding: clamp(30px, 5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.sumate-text { max-width: 560px; }
.sumate-text h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; margin-bottom: 12px; }
.sumate-text p { opacity: 0.95; margin-bottom: 14px; }
.sumate-text ul { list-style: none; }
.sumate-text li { padding-left: 22px; position: relative; margin-bottom: 6px; opacity: 0.92; }
.sumate-text li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--acento);
  border: 1.5px solid var(--tinta);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 2px solid var(--borde);
  padding: 34px 20px 44px;
  text-align: center;
  color: var(--tinta-suave);
}
.footer-small { font-size: 0.85rem; color: var(--gris); margin-top: 6px; }
.footer-credit em { font-style: normal; color: var(--verde); font-weight: 700; }
.footer-disclaimer {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gris);
}

/* ---------- Reveal al scrollear ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Foco accesible ---------- */
:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--tinta);
  color: var(--crema);
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--sombra-lift);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
  pointer-events: none;
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .brand-name small { display: none; }
  .topnav { gap: 12px; font-size: 0.9rem; }
  .hero-inner { padding: 52px 20px 64px; }
  .hero-ball { width: 260px; height: 160px; right: -90px; bottom: -80px; }
  .grid { grid-template-columns: 1fr; }
  .sumate-card { flex-direction: column; align-items: stretch; text-align: center; }
  .sumate-text li { text-align: left; }
  .btn-big { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .hero-inner > *, .hero-ball { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
