/* Chainline — el portal al centro. Identidad de Marcos y Daniel: naranja, carbón, aluminio, hueso; Exo 2. */
:root {
    --carbon: #0e0e0e;
    --carbon-2: #1b1b1e;
    --carbon-3: #2a2a2e;
    --orange: #ff5a1f;
    --orange-ink: #b8380a;
    --alu: #6b6b6b;
    --bone: #f2efea;
    --white: #ffffff;
    --muted: #4a4a50;
    --ok: #1b6b3a;
    --wrap: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font: 400 16px/1.55 'Exo 2', system-ui, sans-serif; color: var(--carbon); background: var(--white); }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); padding: 8px 12px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
    border: 0; border-radius: 3px; font: 700 15px/1 'Exo 2', sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn--dark { background: var(--carbon); color: var(--white); }
.btn--orange { background: var(--orange); color: var(--carbon); }
.btn--line { background: transparent; color: var(--carbon); box-shadow: inset 0 0 0 1.5px var(--carbon); }
.btn--full { width: 100%; min-height: 54px; font-size: 16px; }
.title { margin: 0; font-weight: 900; font-style: italic; font-size: clamp(30px, 3.4vw, 46px); line-height: 1; letter-spacing: -.01em; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.97); border-bottom: 1px solid #e6e3dd; }
.top__row { display: flex; align-items: center; gap: 16px 36px; min-height: 72px; }
.top__logo img { height: 38px; width: auto; }
.top__nav { display: flex; gap: 28px; flex: 1; justify-content: flex-end; }
.top__nav a { font-weight: 600; text-decoration: none; }
.top__nav a:hover { color: var(--orange-ink); }

/* Portal: ingreso a la izquierda, mosaico de gamas a la derecha */
.portal { background: var(--carbon); color: var(--white); padding: 64px 0 72px; }
.portal__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 64px; align-items: center; }
.portal h1 { margin: 0; font-weight: 900; font-style: italic; font-size: clamp(44px, 5vw, 76px); line-height: .95; letter-spacing: -.02em; }
.portal__lead { margin: 16px 0 0; max-width: 28em; font-size: 18px; color: #c9c9cc; }

.signin { margin-top: 32px; max-width: 440px; display: grid; gap: 14px; }
.signin__field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #c9c9cc; }
.signin__field input {
    height: 56px; border: 1.5px solid #3a3a40; border-radius: 3px; padding: 0 16px;
    background: var(--carbon-2); color: var(--white); font: 600 18px 'Exo 2', sans-serif;
}
.signin__field input::placeholder { color: #8a8a90; }
.signin__field input:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(255,90,31,.35); }
.signin .btn { margin-top: 4px; }
.signin__forgot { justify-self: start; font-size: 14px; color: #c9c9cc; }
.signin__msg { margin: 0; padding: 10px 14px; background: var(--carbon-3); font-size: 14px; }
.portal__join { margin: 28px 0 0; padding-top: 20px; max-width: 440px; border-top: 1px solid var(--carbon-3); }
.portal__join a { white-space: nowrap; font-weight: 700; color: var(--orange); }
.portal__note { margin: 10px 0 0; font-size: 13px; color: #9a9aa0; }

.mosaic { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: repeat(2, 268px); gap: 8px; }
.tile { position: relative; margin: 0; overflow: hidden; border-radius: 3px; background: var(--bone); }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile--cut img { object-fit: contain; padding: 18px 18px 40px; mix-blend-mode: multiply; }
.tile:not(.tile--cut)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.65)); }
.tile figcaption { position: absolute; z-index: 1; left: 14px; bottom: 10px; font: italic 800 19px/1.2 'Exo 2', sans-serif; color: var(--white); }
.tile--cut figcaption { color: var(--carbon); }

/* Bloques */
.block { padding-top: 96px; }
.block__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 48px; flex-wrap: wrap; margin-bottom: 28px; }
.block__lead { margin: 0; max-width: 32em; color: var(--muted); font-size: 17px; }
.block__lead a { color: var(--orange-ink); font-weight: 700; }

/* Productos: gamas en grilla editorial */
.ranges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 20px; }
.range__img { height: 300px; overflow: hidden; border-radius: 3px; background: var(--bone); }
.range__img img { width: 100%; height: 100%; object-fit: contain; padding: 28px; mix-blend-mode: multiply; }
.range h3 { margin: 14px 0 4px; font-size: 22px; font-weight: 800; font-style: italic; line-height: 1.1; }
.range p { margin: 0; color: var(--muted); font-size: 15px; }
/* Gama ancha: panel hueso, imagen grande a la derecha y texto abajo a la izquierda */
.range--wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); background: var(--bone); border-radius: 3px; }
.range--wide .range__img, .range--wide .range__text { grid-row: 1; }
.range--wide .range__img { grid-column: 2; height: auto; min-height: 300px; }
.range--wide .range__img img { padding: 24px 32px; }
.range--wide .range__text { grid-column: 1; align-self: end; padding: 0 0 26px 28px; }
.range--wide h3 { font-size: 28px; }

/* Recién llegados: fila con desplazamiento lateral */
.arrivals {
    list-style: none; margin: 0; padding: 0 0 14px; display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 16px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.arrival { scroll-snap-align: start; }
.arrival__img { height: 230px; border-radius: 3px; background: var(--bone); }
.arrival__img img { width: 100%; height: 100%; object-fit: contain; padding: 20px; mix-blend-mode: multiply; }
.arrival__brand { display: block; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--orange-ink); }
.arrival h3 { margin: 2px 0 4px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.arrival__sku { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Marcas */
.brands { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.brands li { height: 80px; display: grid; place-items: center; border: 1.5px solid #d9d5ce; border-radius: 3px; font-size: 13px; font-weight: 700; color: var(--alu); }

/* Lo que encuentra en el portal */
.inside { margin-top: 96px; padding: 72px 0 80px; background: var(--carbon); color: var(--white); }
.inside .block__lead { color: #c9c9cc; }

/* Listas de dos niveles: portal y condiciones */
.terms { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--carbon); }
.terms div { padding: 22px 28px 22px 0; border-bottom: 1px solid #e3dfd7; }
.terms div + div { padding-left: 28px; border-left: 1px solid #e3dfd7; }
.terms dt { font-weight: 800; font-style: italic; font-size: 20px; margin-bottom: 6px; }
.terms dd { margin: 0; color: var(--muted); }
.terms--dark { border-top-color: var(--orange); }
.terms--dark div { border-color: var(--carbon-3); }
.terms--dark dd { color: #c9c9cc; }

/* Postulación por pasos */
.apply { margin-top: 96px; padding: 80px 0; background: var(--bone); }
.apply__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.apply__info p { margin: 16px 0 0; color: var(--muted); font-size: 17px; }
.apply__info h3 { margin: 28px 0 10px; font-size: 18px; font-weight: 800; font-style: italic; }
.apply__info ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.checklist li { padding-left: 30px; position: relative; transition: color .2s ease; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border: 2px solid var(--carbon); border-radius: 3px; }
.checklist li.is-done { color: var(--ok); }
.checklist li.is-done::before { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--bone); }
.checklist em, .upload__label em { font-style: normal; color: var(--alu); font-weight: 500; }
.apply__sla { font-weight: 700; color: var(--carbon) !important; }

.wizard { background: var(--white); border-radius: 6px; padding: 32px; box-shadow: 0 1px 0 #e3dfd7; }
.wizard__top { margin-bottom: 26px; }
.wizard__count { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.wizard__error { margin: 18px 0 0; padding: 10px 14px; background: #fdeadf; color: var(--orange-ink); font-weight: 700; font-size: 14px; border-radius: 3px; }
.wizard__demo { margin-top: 12px !important; font-size: 14px !important; color: var(--alu) !important; }
.upload__text { display: flex; flex-direction: column; gap: 2px; }
.upload__why { font-weight: 500; font-size: 13px; color: var(--muted); }
.upload.is-bad { border-color: var(--orange-ink); border-style: solid; }
.wizard__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.wizard__steps li { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 4px solid #e3dfd7; font-weight: 700; font-size: 14px; color: var(--alu); }
.wizard__steps span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e3dfd7; color: var(--carbon); font-size: 13px; }
.wizard__steps .is-current { border-color: var(--orange); color: var(--carbon); }
.wizard__steps .is-current span { background: var(--orange); }
.wizard__steps .is-done { border-color: var(--carbon); color: var(--carbon); }
.wizard__steps .is-done span { background: var(--carbon); color: var(--white); }
.wizard__panel { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wizard__panel legend { padding: 0; margin-bottom: 16px; font-size: 24px; font-weight: 900; font-style: italic; }
.wizard__panel label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.wizard__panel input:not([type=radio]):not([type=checkbox]):not([type=file]), .wizard__panel select {
    height: 48px; border: 1.5px solid #cfcac0; border-radius: 3px; padding: 0 14px; background: var(--white); font: 500 16px 'Exo 2', sans-serif; color: var(--carbon);
}
.wizard__panel input:focus, .wizard__panel select:focus { border-color: var(--carbon); outline: none; box-shadow: 0 0 0 3px rgba(255,90,31,.35); }
.wizard__panel input:user-invalid, .wizard__panel select:user-invalid { border-color: var(--orange-ink); }
.span-2 { grid-column: 1 / -1; }
.choice { display: flex; align-items: center; gap: 20px; font-weight: 700; font-size: 14px; }
.choice label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 16px; }
.wizard__hint { margin: -6px 0 0; font-size: 14px; color: var(--muted); }
.upload { position: relative; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: 1.5px dashed #cfcac0; border-radius: 4px; cursor: pointer; grid-column: 1 / -1; }
.upload:hover { border-color: var(--carbon); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload input:focus-visible + .upload__label { outline: 3px solid var(--orange); outline-offset: 4px; }
.upload__file { font-weight: 600; font-size: 14px; color: var(--orange-ink); max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload.has-file { border-style: solid; border-color: var(--ok); background: #f1f8f3; }
.upload.has-file .upload__file { color: var(--ok); }
.summary { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; padding: 18px; background: var(--bone); border-radius: 4px; }
.summary div { display: contents; }
.summary dt { font-weight: 700; }
.summary dd { margin: 0; color: var(--muted); }
.check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; font-size: 15px !important; }
.check input { margin-top: 4px; }
.wizard__nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #ece9e3; }
.wizard__done { padding: 24px 0 8px; }
.wizard__done h3 { margin: 0 0 8px; font-size: 26px; font-weight: 900; font-style: italic; }
.wizard__done p { margin: 0; color: var(--muted); font-size: 17px; }

/* Pie */
.foot { background: var(--carbon); color: #c9c9cc; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px 48px; padding-top: 56px; padding-bottom: 56px; }
.foot__brand img { height: 40px; width: auto; }
.foot__brand p { margin: 14px 0 0; max-width: 26em; }
.foot address { font-style: normal; line-height: 1.8; }
.foot address strong { color: var(--white); }
.foot a { color: var(--white); }

@media (prefers-reduced-motion: no-preference) {
    .tile { animation: wipe .8s calc(var(--i) * 100ms + 150ms) cubic-bezier(.7, 0, .2, 1) both; }
    .tile img { animation: settle 1.4s calc(var(--i) * 100ms + 150ms) cubic-bezier(.2, .7, .2, 1) both; }
    @keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
    @keyframes settle { from { scale: 1.12; } }
}

@media (max-width: 1080px) {
    .portal__grid { grid-template-columns: 1fr; }
    .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .terms div:nth-child(odd) { padding-left: 0; border-left: 0; }
    .apply__grid { grid-template-columns: 1fr; gap: 28px; }
    .brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .range__img { height: 240px; }
    .range--wide .range__img { min-height: 260px; }
}
@media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    .top__row { flex-wrap: wrap; justify-content: space-between; min-height: 0; padding-top: 10px; padding-bottom: 0; gap: 8px 12px; }
    .top__logo img { height: 30px; }
    .top__nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 22px; overflow-x: auto; padding: 8px 0 12px; white-space: nowrap; }
    .top__nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
    .portal { padding: 36px 0 44px; }
    .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, 150px); gap: 6px; }
    .tile--tall, .tile--wide { grid-row: auto; grid-column: auto; }
    .tile figcaption { font-size: 16px; left: 10px; bottom: 8px; }
    .tile--cut img { padding: 10px 10px 30px; }
    .block { padding-top: 64px; }
    .inside { margin-top: 64px; padding: 56px 0 60px; }
    .terms { grid-template-columns: 1fr; }
    .terms div + div { padding-left: 0; border-left: 0; }
    .arrivals { grid-auto-columns: 70vw; }
    .arrival__img { height: 200px; }
    .wizard { padding: 22px 18px; }
    .wizard__steps { grid-template-columns: repeat(4, auto); }
    .wizard__steps li { font-size: 0; gap: 0; }
    .wizard__steps span { font-size: 13px; }
    .wizard__panel { grid-template-columns: 1fr; }
    .foot__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
    .range__img, .range--wide .range__img { height: 150px; min-height: 0; }
    .range__img img, .range--wide .range__img img { padding: 14px; }
    .range--wide { grid-column: auto; display: block; background: none; }
    .range--wide .range__text { padding: 0; }
    .range h3, .range--wide h3 { margin-top: 10px; font-size: 17px; }
    .range p { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
}
