/* =========================================================================
   CasadeEmpleo — sistema de diseño compartido
   Editorial · Swiss · monocromo con un acento verde de confianza
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  /* ---- color: neutros (frío-neutro, casi monocromo) ---- */
  --paper:        #FBFBFA;
  --paper-2:      #F4F4F3;   /* secciones alternas */
  --card:         #FFFFFF;
  --ink:          #14140F;   /* casi-negro neutro */
  --ink-2:        #44443E;   /* texto secundario */
  --muted:        #76766F;   /* texto terciario / metadatos */
  --faint:        #9A9A93;
  --line:         #E4E4DF;   /* hairlines */
  --line-2:       #D2D2CB;
  --ink-line:     var(--ink); /* bordes de énfasis */

  /* ---- marca: naranja (acento/CTA) + marina (texto/superficies) ---- */
  --accent:       #F08020;   /* naranja del logo — fills, CTAs, realces */
  --accent-deep:  #0E3A66;   /* marina — texto de acento sobre claro */
  --accent-wash:  #FDEFE1;   /* tinte naranja para fondos */
  --accent-line:  #F6D1A6;
  --navy:         #103E6E;   /* marina de la marca */
  --navy-deep:    #0C2E52;   /* superficies oscuras (footer / CTA) */

  /* ---- tipografía ---- */
  --sans: 'Public Sans', system-ui, -apple-system, sans-serif;
  --display: 'Archivo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* ---- forma: esquinas vivas (Swiss/editorial) ---- */
  --radius: 0px;
  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-soft: 0 1px 0 var(--line), 0 8px 24px -16px rgba(20,20,15,.25);

  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* tweakable overrides land on :root via JS:
   --accent, --display, --sans  */

*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }

h1,h2,h3,h4{ font-family: var(--display); font-weight: 800; line-height: 1.04; letter-spacing: -.02em; margin:0; color: var(--ink); text-wrap: balance; }
p{ margin:0; text-wrap: pretty; }

/* ---------- utilidades de layout ---------- */
.wrap{ max-width: var(--maxw); margin:0 auto; padding-inline: var(--gutter); }
.wrap-wide{ max-width: 1320px; margin:0 auto; padding-inline: var(--gutter); }
.stack > * + *{ margin-top: var(--s, 16px); }
.row{ display:flex; align-items:center; gap: 14px; }
.between{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.grow{ flex:1 1 auto; }
.hide-sm{ }

/* ---------- etiqueta mono (kicker / tags) ---------- */
.kicker{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker.accent{ color: var(--accent-deep); }

/* ---------- botones ---------- */
.btn{
  --bg: var(--ink); --fg: #fff; --bd: var(--ink);
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing:-.01em;
  padding: 13px 22px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  border-radius: var(--radius); transition: transform .12s ease, box-shadow .12s ease, background .15s, color .15s;
  white-space: nowrap;
}
.btn:hover{ transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); }
.btn:active{ transform: translate(0,0); box-shadow: none; }
.btn.accent{ --bg: var(--accent); --bd: var(--accent); --fg:#fff; }
.btn.accent:hover{ box-shadow: 4px 4px 0 var(--accent-deep); }
.btn.ghost{ --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn.ghost:hover{ box-shadow: var(--shadow-hard); }
.btn.light{ --bg:#fff; --fg: var(--ink); --bd: var(--line-2); }
.btn.sm{ padding: 9px 15px; font-size: 13px; }
.btn.lg{ padding: 16px 28px; font-size: 17px; }
.btn .ext{ font-size: 13px; opacity:.85; }

/* ---------- chips / tags ---------- */
.chip{
  display:inline-flex; align-items:center; gap:7px;
  font-size: 13px; font-weight:600; color: var(--ink-2);
  padding: 6px 12px; border:1px solid var(--line-2); background:#fff;
  border-radius: 999px; transition: border-color .15s, color .15s, background .15s;
}
.chip:hover{ border-color: var(--ink); }
.chip.active{ background: var(--ink); color:#fff; border-color: var(--ink); }
.tag{
  display:inline-flex; align-items:center; gap:6px;
  font-family: var(--mono); font-size: 11px; font-weight:500; letter-spacing:.06em; text-transform:uppercase;
  color: var(--ink-2); padding: 5px 8px; border:1px solid var(--line-2); background: var(--paper-2);
  white-space: nowrap; line-height:1; vertical-align:middle;
}
.tag.green{ color: var(--accent-deep); background: var(--accent-wash); border-color: var(--accent-line); }
.tag.dot::before{ content:""; width:6px; height:6px; border-radius:50%; background: var(--accent); }

/* ---------- header / footer space reservation (prevents CLS on JS inject) ---------- */
#site-head{ min-height: 68px; }
#site-foot{ min-height: 200px; }
.site-head{
  position: sticky; top:0; z-index: 50;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.site-head .bar{ display:flex; align-items:center; gap: 28px; height: 68px; }
.brand{ display:inline-flex; align-items:center; gap:9px; font-family: var(--display); letter-spacing:-.03em; }
.brand svg{ width:32px; height:32px; display:block; flex:none; }
.brand .wm{ font-weight:900; font-size:20px; letter-spacing:-.03em; }
.brand .wm .b1{ color: var(--navy); }
.brand .wm .b2{ color: var(--accent); font-weight:600; }
.brand .wm .b3{ color: var(--accent); }
.nav{ display:flex; align-items:center; gap: 4px; }
.nav a{ font-weight: 600; font-size: 15px; color: var(--ink-2); padding: 8px 12px; position:relative; }
.nav a:hover{ color: var(--ink); }
.nav a.current{ color: var(--ink); }
.nav a.current::after{ content:""; position:absolute; left:12px; right:12px; bottom:2px; height:2px; background: var(--accent); }
.head-cta{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.menu-btn{ display:none; }

/* ---------- buscador (search bar) ---------- */
.searchbar{
  display:grid; gap:0; background:#fff; border:1.5px solid var(--ink);
  grid-template-columns: 1.4fr 1fr auto;
}
.searchbar .field{ display:flex; align-items:center; gap:10px; padding: 12px 16px; border-right:1px solid var(--line); min-width:0; }
.searchbar .field:nth-child(2){ }
.searchbar .field svg{ flex:none; color: var(--muted); }
.searchbar label{ display:block; font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color: var(--muted); }
.searchbar input, .searchbar select{
  border:0; outline:0; background:transparent; font-family: var(--sans); font-size: 16px; color: var(--ink); width:100%; padding:0; font-weight:500;
}
.searchbar .go{ border:0; background: var(--accent); color:#fff; font-family:var(--display); font-weight:800; font-size:16px; padding: 0 28px; letter-spacing:-.01em; }
.searchbar .go:hover{ background: var(--accent-deep); }

/* ---------- tarjetas de empleo ---------- */
.jobs{ display:grid; gap: 0; border:1px solid var(--line); background:#fff; }
.job{
  display:grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items:start;
  padding: 22px 24px; border-bottom:1px solid var(--line); background:#fff;
  transition: background .14s;
}
.job:last-child{ border-bottom:0; }
.job:hover{ background: var(--paper-2); }
.job .logo{
  width:52px; height:52px; border:1.5px solid var(--ink); display:grid; place-items:center;
  font-family: var(--display); font-weight:800; font-size:20px; color: var(--ink); background:#fff;
}
.job .jt{ font-family: var(--display); font-weight:700; font-size: 18px; letter-spacing:-.01em; line-height:1.2; }
.job:hover .jt{ color: var(--accent-deep); }
.job .co{ color: var(--ink-2); font-weight:600; font-size:14.5px; margin-top:3px; }
.job .meta{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.job .right{ display:flex; flex-direction:column; align-items:flex-end; gap:10px; text-align:right; }
.job .salary{ font-family: var(--display); font-weight:800; font-size: 17px; white-space:nowrap; }
.job .salary span{ font-family: var(--sans); font-weight:500; font-size:12px; color: var(--muted); display:block; text-align:right; letter-spacing:0; }
.job .ago{ font-family: var(--mono); font-size:11px; color: var(--faint); letter-spacing:.04em; }

/* tarjeta de empleo en cuadrícula (homepage destacados) */
.jobcards{ display:grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 0; border:1px solid var(--line); }
.jobcard{
  padding: 22px; background:#fff; border-right:1px solid var(--line); border-bottom:1px solid var(--line);
  display:flex; flex-direction:column; gap:14px; transition: background .14s; min-height: 200px;
}
.jobcard:hover{ background: var(--paper-2); }
.jobcard .top{ display:flex; align-items:center; gap:12px; }
.jobcard .logo{ width:44px; height:44px; border:1.5px solid var(--ink); display:grid; place-items:center; font-family:var(--display); font-weight:800; font-size:17px; }
.jobcard .jt{ font-family: var(--display); font-weight:700; font-size:17px; line-height:1.18; letter-spacing:-.01em; }
.jobcard:hover .jt{ color: var(--accent-deep); }
.jobcard .co{ font-size:13.5px; color: var(--muted); font-weight:600; }
.jobcard .foot{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; padding-top:12px; border-top:1px dashed var(--line-2); }
.jobcard .salary{ font-family:var(--display); font-weight:800; font-size:16px; }

/* ---------- secciones ---------- */
.section{ padding-block: clamp(48px, 7vw, 96px); }
.section.alt{ background: var(--paper-2); border-block:1px solid var(--line); }
.sec-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom: 32px; }
.sec-head h2{ font-size: clamp(26px, 3.4vw, 38px); }
.sec-head .lead{ color: var(--ink-2); margin-top:8px; font-size:17px; max-width:52ch; }
.seemore{ font-family:var(--display); font-weight:700; font-size:15px; display:inline-flex; align-items:center; gap:8px; border-bottom:2px solid var(--accent); padding-bottom:3px; white-space:nowrap; }
.seemore:hover{ gap:12px; }

/* ---------- categorías ---------- */
.cats{ display:grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap:0; border:1px solid var(--line); }
.cat{ padding: 24px; background:#fff; border-right:1px solid var(--line); border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:14px; transition: background .14s; }
.cat:hover{ background: var(--ink); color:#fff; }
.cat:hover .cnt, .cat:hover .cicon{ color:#fff; border-color:#fff; }
.cat .cicon{ width:42px; height:42px; border:1.5px solid var(--ink); display:grid; place-items:center; }
.cat .cname{ font-family:var(--display); font-weight:700; font-size:17px; }
.cat .cnt{ font-family:var(--mono); font-size:12px; color: var(--muted); letter-spacing:.04em; margin-top:auto; }

/* ---------- blog ---------- */
.post{ background:#fff; border:1px solid var(--line); display:flex; flex-direction:column; transition: transform .14s, box-shadow .14s; }
.post:hover{ transform: translate(-3px,-3px); box-shadow: var(--shadow-hard); }
.post .thumb{ aspect-ratio: 16/10; border-bottom:1px solid var(--line); }
.post .pbody{ padding: 18px 20px 22px; display:flex; flex-direction:column; gap:10px; flex:1; }
.post h3{ font-size: 19px; line-height:1.18; }
.post:hover h3{ color: var(--accent-deep); }
.post .excerpt{ color: var(--ink-2); font-size:15px; }
.post .pmeta{ margin-top:auto; display:flex; align-items:center; gap:10px; font-family:var(--mono); font-size:11px; color:var(--muted); letter-spacing:.04em; text-transform:uppercase; }

/* placeholder de imagen (rayas + etiqueta mono) */
.ph{
  --c1: #eceae4; --c2:#f6f5f1;
  background: repeating-linear-gradient(135deg, var(--c1) 0 10px, var(--c2) 10px 20px);
  display:grid; place-items:center; color: var(--faint);
}
.ph span{ font-family: var(--mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; background: color-mix(in srgb, var(--paper) 70%, transparent); padding:3px 8px; }
.ph.green{ --c1: #fbe3c8; --c2: #fdf2e6; }

/* ---------- ranura de anuncio (ad slot) ---------- */
.adslot{
  border:1px dashed var(--line-2); background: var(--paper-2);
  display:grid; place-items:center; text-align:center; gap:4px; color: var(--faint); padding: 18px;
}
.adslot .l1{ font-family:var(--mono); font-size:10px; letter-spacing:.18em; text-transform:uppercase; }
.adslot .l2{ font-family:var(--mono); font-size:11px; color: var(--line-2); }
.adslot.leader{ min-height: 110px; }
.adslot.rect{ min-height: 250px; }
.adslot.inline{ min-height: 96px; }

/* ---------- FAQ ---------- */
.faq{ border-top:1px solid var(--ink); }
.faq details{ border-bottom:1px solid var(--line-2); }
.faq summary{ list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:16px; padding: 22px 4px; font-family:var(--display); font-weight:700; font-size: clamp(17px,2.2vw,21px); letter-spacing:-.01em; }
.faq summary::-webkit-details-marker{ display:none; }
.faq summary .pm{ flex:none; width:26px; height:26px; border:1.5px solid var(--ink); display:grid; place-items:center; transition: transform .2s, background .2s, color .2s; }
.faq details[open] summary .pm{ transform: rotate(45deg); background: var(--accent); color:#fff; border-color:var(--accent); }
.faq .ans{ padding: 0 4px 24px; color: var(--ink-2); font-size:16px; max-width: 80ch; }
.faq .ans p + p{ margin-top: 12px; }

/* ---------- footer ---------- */
.site-foot{ background: var(--navy-deep); color: #cdd6e2; border-top: 3px solid var(--accent); }
.site-foot .brand .wm .b1{ color:#fff; }
.site-foot a{ color:#aeb9c9; }
.site-foot a:hover{ color:#fff; }
.foot-grid{ display:grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding-block: 56px; }
.site-foot h4{ color:#fff; font-size:13px; font-family:var(--mono); font-weight:500; letter-spacing:.12em; text-transform:uppercase; margin-bottom:16px; }
.site-foot ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; font-size:14.5px; }
.site-foot .brand{ color:#fff; }
.site-foot .brand .mark{ background:#fff; color: var(--ink); }
.foot-bot{ border-top:1px solid rgba(255,255,255,.14); padding-block: 22px; display:flex; align-items:center; justify-content:space-between; gap:16px; font-size:13px; color:#8090a4; flex-wrap:wrap; }
.foot-blurb{ font-size:14.5px; color:#9fabbd; max-width: 38ch; margin-top:14px; }

/* ---------- breadcrumb ---------- */
.crumbs{ font-family:var(--mono); font-size:12px; letter-spacing:.04em; color:var(--muted); display:flex; gap:8px; flex-wrap:wrap; }
.crumbs a:hover{ color: var(--ink); }
.crumbs .sep{ color: var(--line-2); }

/* ---------- divisor con etiqueta ---------- */
.rule{ height:1px; background:var(--line); border:0; margin:0; }

/* ---------- menú móvil ---------- */
.mobile-menu{ display:none; }
.menu-btn{ display:none; }
body.menu-open{ overflow:hidden; }

/* ---------- responsive ---------- */
@media (max-width: 920px){
  .foot-grid{ grid-template-columns: 1fr 1fr; gap:28px 24px; }
  .nav{ display:none; }
  .head-cta .btn.ghost{ display:none; }
  .menu-btn{ display:inline-grid; }
  .mobile-menu{ position:fixed; top:0; left:0; width:100%; height:100%; background:var(--paper); z-index:60; padding:0 var(--gutter) 32px; transform:translateX(100%); opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease; overflow-y:auto; display:block; }
  .mobile-menu.open{ opacity:1; transform:none; pointer-events:auto; }
  .mobile-menu .mob-head{ display:flex; align-items:center; justify-content:space-between; height:68px; border-bottom:1px solid var(--line); margin:0 calc(var(--gutter)*-1); padding:0 var(--gutter); }
  .mobile-menu a{ display:flex; align-items:center; justify-content:space-between; padding:18px 2px; font-family:var(--display); font-weight:700; font-size:22px; letter-spacing:-.01em; border-bottom:1px solid var(--line); color:var(--ink); }
  .mobile-menu a.current{ color:var(--accent-deep); }
  .mobile-menu .btn.accent{ width:100%; margin-top:22px; display:flex; justify-content:center; }
  .mobile-menu .close-btn{ background:none; border:1.5px solid var(--ink); width:40px; height:40px; display:grid; place-items:center; cursor:pointer; }
}
@media (max-width: 720px){
  body{ font-size: 16px; }
  .searchbar{ grid-template-columns: 1fr; }
  .searchbar .field{ border-right:0; border-bottom:1px solid var(--line); }
  .searchbar .go{ padding: 14px; }
  .job{ grid-template-columns: 44px 1fr; }
  .job .right{ grid-column: 1 / -1; flex-direction:row; align-items:center; justify-content:space-between; text-align:left; border-top:1px dashed var(--line-2); padding-top:12px; }
  .job .salary span{ text-align:left; }
  .sec-head{ flex-direction:column; align-items:flex-start; }
  .foot-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 480px){
  .cats, .jobcards{ grid-template-columns: 1fr; }
}
