/* CAVEVI Carreras */
:root {
  --purple: #524594;
  --purple-dark: #3d3373;
  --purple-soft: #f1eef9;
  --cream: #FAF2E0;
  --ink: #23212e;
  --muted: #6b6878;
  --line: #e6e2f0;
  --ok: #2e7d32;
  --err: #b3261e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--purple); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; color: var(--ink); }
.container { width: min(1120px, 100% - 2.5rem); margin: 0 auto; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #9b8fe0; outline-offset: 2px; border-radius: 4px; }

/* ---------- header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--purple); }
.brand img { width: 40px; height: 40px; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand-sub { font-weight: 500; font-size: .95rem; color: var(--muted); padding-left: .55rem; border-left: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 1.4rem; font-size: .93rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--purple); }
.nav .nav-ext { color: var(--purple); }
.site-footer { background: #1f1b33; color: #d9d5ea; padding: 2rem 0; margin-top: 4rem; font-size: .9rem; }
.site-footer .muted { color: #a29cc0; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-links { display: flex; flex-direction: column; gap: .3rem; text-align: right; }
.site-footer a { color: #d9d5ea; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 2px solid var(--purple); background: var(--purple); color: #fff; padding: .8rem 1.5rem; border-radius: 999px; font: 600 1rem/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: var(--purple-dark); border-color: var(--purple-dark); box-shadow: 0 6px 18px rgba(82,69,148,.28); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #fff; color: var(--purple); }
.btn-ghost:hover { background: var(--purple-soft); color: var(--purple-dark); box-shadow: none; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--purple); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- home ---------- */
.hero { background: linear-gradient(120deg, var(--cream) 0%, #f3ecfb 100%); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; padding: 3.5rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--purple); margin-bottom: .8rem; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); color: var(--purple-dark); }
.hero p.lead { font-size: 1.12rem; color: #3b3850; max-width: 34rem; margin: 0 0 1.6rem; }
.hero-photo { border-radius: 22px; overflow: hidden; box-shadow: 0 18px 50px rgba(82,69,148,.25); aspect-ratio: 4 / 3.6; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
section.block { padding: 3.2rem 0 0; }
section.block > .container > h2 { font-size: 1.7rem; }
.section-sub { color: var(--muted); margin: 0 0 1.6rem; max-width: 42rem; }

.job-list { display: flex; flex-direction: column; gap: 1rem; }
.job-card { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; text-decoration: none; color: inherit; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.job-card:hover { border-color: var(--purple); box-shadow: 0 8px 26px rgba(82,69,148,.14); transform: translateY(-1px); }
.job-card h3 { font-size: 1.2rem; color: var(--purple-dark); margin-bottom: .25rem; }
.job-card .meta { font-size: .9rem; color: var(--muted); }
.job-card .go { color: var(--purple); font-weight: 600; white-space: nowrap; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: s; }
.step-card { background: var(--purple-soft); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.step-card .n { width: 2rem; height: 2rem; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: .6rem; }
.step-card h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.step-card p { margin: 0; font-size: .93rem; color: #4a4760; }

.culture { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; align-items: center; }
.culture img { border-radius: 18px; box-shadow: 0 12px 36px rgba(0,0,0,.14); width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-top: 1.2rem; }
.value { border-left: 4px solid var(--purple); padding: .2rem 0 .2rem .8rem; }
.value strong { display: block; color: var(--purple-dark); }
.value span { font-size: .9rem; color: var(--muted); }
.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.photo-row img { border-radius: 18px; width: 100%; height: 360px; object-fit: cover; }
.photo-row img.top { object-position: 50% 25%; }

/* ---------- job page ---------- */
.crumbs { font-size: .88rem; color: var(--muted); padding: 1.2rem 0 .4rem; }
.crumbs a { color: var(--muted); }
.job-head { padding: .4rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.job-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--purple-dark); margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { background: var(--purple-soft); color: var(--purple-dark); font-size: .85rem; font-weight: 600; padding: .25rem .75rem; border-radius: 999px; }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; padding-top: 2rem; align-items: start; }
.job-main h2 { font-size: 1.4rem; margin-top: 2.2rem; color: var(--purple-dark); }
.job-main h2:first-child { margin-top: 0; }
.job-main h3 { font-size: 1.05rem; margin-top: 1.3rem; }
.job-main ul { padding-left: 1.2rem; margin: .4rem 0 1rem; }
.job-main li { margin-bottom: .45rem; }
.job-main p { margin: 0 0 .9rem; }
.job-intro { font-size: 1.05rem; }
.job-side { position: sticky; top: 84px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: #fff; box-shadow: 0 10px 30px rgba(82,69,148,.08); }
.job-side h2 { font-size: 1.1rem; margin-bottom: .8rem; }
.job-side dl { margin: 0 0 1.2rem; font-size: .92rem; }
.job-side dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .7rem; }
.job-side dd { margin: 0; font-weight: 600; }
.job-side .small { font-size: .82rem; color: var(--muted); margin: .8rem 0 0; }
.closing { margin-top: 2.4rem; background: var(--cream); border-radius: var(--radius); padding: 1.6rem; }
.closing h2 { margin-top: 0 !important; }
.closing .motto { font-weight: 700; color: var(--purple-dark); margin-top: 1rem; }
.mobile-apply { display: none; }

/* ---------- apply ---------- */
.apply-wrap { max-width: 680px; margin: 0 auto; padding: 1.6rem 0 0; }
.apply-head h1 { font-size: 1.7rem; color: var(--purple-dark); margin-bottom: .2rem; }
.apply-head p { color: var(--muted); margin: 0 0 1.4rem; }
.progress { display: flex; gap: .4rem; margin-bottom: 1.6rem; list-style: none; padding: 0; }
.progress li { flex: 1; font-size: .8rem; color: var(--muted); border-top: 4px solid var(--line); padding-top: .4rem; }
.progress li.done { border-color: #a89fda; color: var(--purple); }
.progress li.active { border-color: var(--purple); color: var(--purple-dark); font-weight: 700; }
.panel { border: 1.5px solid var(--line); border-radius: 18px; padding: 1.8rem; background: #fff; box-shadow: 0 10px 30px rgba(82,69,148,.07); }
.panel h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.panel .sub { color: var(--muted); margin: 0 0 1.3rem; }
.field { margin-bottom: 1rem; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], select, textarea { width: 100%; padding: .75rem .9rem; border: 1.5px solid #cfc9e4; border-radius: 10px; font: 1rem/1.4 inherit; font-family: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(82,69,148,.18); }
input[readonly] { background: #f4f2f8; color: #5b5870; cursor: not-allowed; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.auto input, .auto select, .auto textarea { border-color: #b9ddbc; background: #f6fbf6; }
.badge-auto { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--ok); background: #e5f4e6; border-radius: 999px; padding: .08rem .5rem; margin-left: .4rem; vertical-align: middle; }
.lock { font-size: .8rem; color: var(--muted); }
.code-input { font-size: 1.8rem !important; letter-spacing: .5rem; text-align: center; font-weight: 700; max-width: 14rem; }
.msg { border-radius: 10px; padding: .7rem .9rem; font-size: .92rem; margin: 0 0 1rem; }
.msg.err { background: #fdecea; color: var(--err); }
.msg.info { background: var(--purple-soft); color: var(--purple-dark); }
.msg.ok { background: #e7f5e8; color: var(--ok); }
.actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: 1.2rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: #3b3850; }
.check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--purple); flex: none; }

.drop { border: 2.5px dashed #b5acdf; border-radius: 16px; background: #faf9fe; padding: 2.4rem 1.2rem; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { background: var(--purple-soft); border-color: var(--purple); }
.drop .ico { font-size: 2.2rem; }
.drop strong { display: block; font-size: 1.05rem; color: var(--purple-dark); }
.drop span { font-size: .88rem; color: var(--muted); }
.reading { text-align: center; padding: 2rem 1rem; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #e0daf4; border-top-color: var(--purple); margin: 0 auto 1rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.have-resume { display: flex; align-items: center; gap: .8rem; background: var(--purple-soft); border-radius: 12px; padding: .9rem 1rem; margin-bottom: 1rem; }
.have-resume .file { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.success { text-align: center; padding: 1rem 0; }
.success .big { font-size: 3rem; }
.who { display: flex; justify-content: flex-end; font-size: .85rem; color: var(--muted); margin-bottom: .6rem; gap: .5rem; }

@media (max-width: 860px) {
  .hero-inner, .culture { grid-template-columns: 1fr; }
  .hero-inner { padding: 2rem 0; }
  .steps { grid-template-columns: 1fr; }
  .job-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .job-side { position: static; }
  .brand-sub { display: none; }
  .nav a:not(.nav-ext) { display: none; }
  .photo-row img { height: 240px; }
  .mobile-apply { display: block; position: sticky; bottom: 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: .7rem 1.25rem; z-index: 15; }
}
@media (max-width: 560px) {
  .grid2, .values, .photo-row { grid-template-columns: 1fr; }
  .panel { padding: 1.3rem; }
  .footer-links { text-align: left; }
  .job-card { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* form sections + "por completar" */
.form-sec { font-size: 1.02rem; color: var(--purple-dark); margin: 1.6rem 0 .8rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.form-sec:first-of-type { margin-top: 1rem; }
.field.full { grid-column: 1 / -1; }
.field[hidden] { display: none; }
.badge-need { display: inline-block; font-size: .7rem; font-weight: 700; color: #8a5a00; background: #fff1d6; border-radius: 999px; padding: .08rem .5rem; margin-left: .4rem; vertical-align: middle; }
.need input, .need select, .need textarea { border-color: #f0c36d; background: #fffaf0; }
