/* los tokens están en styles.css */

/* "conoceme": firma sobre la foto, enlace a LinkedIn */
.about__sign a { display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
.about__sign a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

main:focus, main:focus-visible { outline: none; box-shadow: none; }

/* sr-only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ========== Encabezados y botones compartidos ========== */
.section-head { margin-bottom: clamp(var(--space-7), 5vw, var(--space-8)); }
.section-head :is(h1, h2) {
  font-family: var(--font-display); font-weight: 800; letter-spacing: var(--ls-heading);
  font-size: var(--display-lg); line-height: var(--lh-display); margin-top: var(--space-3);
}
.section-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-5); flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--space-7);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); font-weight: 700; font-size: var(--text-base);
  border: 2px solid var(--forest-900); color: var(--forest-900);
}
.btn:hover { background: var(--forest-900); color: var(--sand-100); }
.btn--primary, .btn--dark { background: var(--forest-900); color: var(--sand-100); }
.btn--primary:hover, .btn--dark:hover { background: var(--forest-800); }

/* ========== Servicios ========== */
.services { background: var(--sand-200); padding: var(--section-y) var(--pad-x); }
.services__intro { font-size: var(--text-lg); max-width: 56ch; margin-top: var(--space-5); }
.offers { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.offer { background: var(--sand-50); border-radius: var(--radius-lg); padding: var(--tile-pad); display: flex; flex-direction: column; gap: var(--space-3); }
.offer--featured { background: var(--orange-400); }
.offer__n { font-family: var(--font-display); font-weight: 800; font-size: var(--text-sm); letter-spacing: .04em; color: var(--sand-700); }
.offer--featured .offer__n { color: var(--forest-900); }
.offer h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--display-xs); letter-spacing: var(--ls-small); line-height: var(--lh-heading); }
.offer p { font-size: var(--text-base); line-height: var(--lh-body); }
.offer__list { list-style: none; margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line); display: grid; gap: var(--space-2); font-size: var(--text-sm); font-weight: 500; }
.offer__list li { position: relative; padding-left: calc(var(--dot) + var(--space-3)); }
.offer__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--forest-900); }

/* ========== Proceso ========== */
.process { background: var(--forest-900); color: var(--sand-100); padding: var(--section-y) var(--pad-x); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.step { background: var(--forest-800); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.step__n { font-family: var(--font-display); font-weight: 800; font-size: var(--text-sm); color: var(--orange-400); letter-spacing: .04em; }
.step h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--text-3xl); letter-spacing: var(--ls-small); line-height: var(--lh-heading); }
.step p { font-size: var(--text-base); line-height: var(--lh-body); }
.process__legacy { margin-top: var(--space-7); display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

/* ========== Experiencia ========== */
.experience { background: var(--sand-100); padding: var(--section-y) var(--pad-x); }
.exp__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.timeline { list-style: none; border-top: 2px solid var(--forest-900); }
.tl {
  display: grid; grid-template-columns: minmax(120px, 2fr) minmax(0, 7fr); gap: var(--space-5);
  padding: var(--space-6) 0; border-bottom: 1px solid var(--line);
}
.tl__date { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); }
.tl__tag {
  display: inline-block; font-size: var(--text-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-full); background: var(--forest-900); color: var(--sand-100);
}
.tl__tag--study { background: transparent; color: var(--forest-900); box-shadow: inset 0 0 0 1.5px var(--forest-900); }
.tl h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--display-xs); letter-spacing: var(--ls-small); line-height: var(--lh-heading); margin-top: var(--space-3); }
.tl__org { font-size: var(--text-base); margin-top: var(--space-1); }
.tl ul { margin-top: var(--space-4); display: grid; gap: var(--space-2); max-width: 70ch; }
/* Sangría = punto (--dot) + espacio de 12 px */
.tl ul li { position: relative; padding-left: calc(var(--dot) + var(--space-3)); font-size: var(--text-base); }
.tl ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--orange-400); }

/* ========== Contacto ========== */
.contact { background: var(--orange-400); color: var(--forest-900); padding: var(--section-y) var(--pad-x) var(--space-6); }
.contact h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--display-2xl); line-height: var(--lh-display); letter-spacing: var(--ls-display); margin-top: var(--space-3); }
.contact__lead { font-size: clamp(var(--text-lg), 1.8vw, var(--text-2xl)); margin-top: var(--space-5); max-width: 40ch; }
.contact__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.contact .btn--outline:hover { background: var(--forest-900); color: var(--orange-400); }
.contact__avail { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); font-size: var(--text-base); font-weight: 700; }
.contact__avail span { width: 10px; height: 10px; border-radius: 50%; background: var(--forest-900); }
.footer {
  display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap;
  margin-top: clamp(var(--space-8), 9vw, var(--space-10)); padding-top: var(--space-5); border-top: 1.5px solid var(--line-strong); font-size: var(--text-sm);
}
.footer a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offers { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .steps { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 1fr; gap: var(--space-2); }
}
/* en táctil el inspector se abre tocando y la ficha sale abajo */
@media (hover: none) {
  .insp-toggle kbd { display: none; }
  .insp-tip { left: var(--space-3) !important; right: var(--space-3); top: auto !important; bottom: 88px; width: auto; max-height: 55vh; overflow: auto; }
  .insp-badge kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
}

/* ========== Segunda pantalla: proyectos y experiencia ========== */
[hidden] { display: none !important; }
/* sin hero: la barra muestra la marca y el contenido baja */
.topbar--page .topbar__brand { opacity: 1; pointer-events: auto; }
.topbar--page .nav { margin-left: auto; }
.page-work .projects, .page-work .experience { padding-top: calc(var(--topbar-h) + var(--space-7)); }

/* ========== Más proyectos (sin capturas) ========== */
.more { margin-top: clamp(var(--space-8), 8vw, var(--space-9)); }
.more__title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-3xl); letter-spacing: var(--ls-small); line-height: var(--lh-heading); margin-bottom: var(--space-6); }
.more__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--space-4); }
.more__item { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; padding: var(--space-5); border-radius: var(--radius-lg); background: var(--sand-200); transition: transform .2s ease, background-color .2s ease; }
.more__item:hover { transform: translateY(-3px); background: var(--sand-50); }
.more__item h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); letter-spacing: var(--ls-small); line-height: var(--lh-heading); }
.more__item p:not(.tile__tag) { font-size: var(--text-base); }
.more__item .tile__link { margin-top: auto; padding-top: var(--space-3); display: inline-flex; gap: var(--space-2); font-weight: 700; }
.more__item:hover .tile__link { gap: var(--space-3); }
.more__note { margin-top: var(--space-5); font-size: var(--text-sm); max-width: 60ch; }

/* se anula el ::after de .tile__link, si no cubría toda la página y los clics iban al último proyecto */
.more__item .tile__link::after { content: none; }

/* Ampliación de capturas */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox__inner { position: relative; max-height: 94vh; overflow: auto; border-radius: var(--radius-md); background: var(--white); }
.lightbox__inner img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.lightbox__close {
  position: sticky; top: var(--space-3); float: right; margin: var(--space-3) var(--space-3) 0 0; z-index: 2;
  font: inherit; font-weight: 700; padding: var(--space-2) var(--space-4); border: 0; border-radius: var(--radius-full);
  background: var(--forest-900); color: var(--sand-100); cursor: pointer;
}

/* ========== Barra: acceso directo a Contacto ========== */
.nav .nav__cta {
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: var(--orange-400); color: var(--forest-900); box-shadow: var(--shadow-sm);
}
.nav .nav__cta::after { display: none; }
.nav .nav__cta:hover { background: var(--forest-900); color: var(--sand-100); }
@media (min-width: 821px) { .topbar .nav { align-items: center; } }

/* ========== Trabajo destacado (home) ========== */
.work { background: var(--sand-100); padding: var(--section-y) var(--pad-x); }
.work__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.work__grid li { display: flex; }
.work-card {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--sand-200);
  transition: transform .35s var(--ease-out, ease), box-shadow .35s var(--ease-out, ease);
}
.work-card__media {
  position: relative; display: flex; align-items: flex-start; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden;
  padding: 9% 9% 0;
  background:
    radial-gradient(90% 70% at 80% 0%, rgba(51, 95, 69, .7), transparent 70%),
    linear-gradient(rgba(232, 220, 194, .06) 1px, transparent 1px) 0 0 / var(--space-6) var(--space-6),
    linear-gradient(90deg, rgba(232, 220, 194, .06) 1px, transparent 1px) 0 0 / var(--space-6) var(--space-6),
    var(--forest-900);
}
/* ventana de navegador cortada abajo */
.work-card__frame {
  display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; background: var(--white);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  box-shadow: 0 0 0 1px rgba(232, 220, 194, .14), 0 18px 40px -8px rgba(0, 0, 0, .55);
  transition: transform .5s var(--ease-out, ease);
}
.work-card__bar { display: flex; flex: none; gap: 5px; padding: 7px 10px; background: var(--sand-50); border-bottom: 1px solid var(--line-soft); }
.work-card__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--sand-200); }
.work-card__frame img { display: block; flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: top; transition: object-position 3.5s cubic-bezier(.45, 0, .25, 1); }
/* celular, también cortado */
.work-card__phone {
  position: relative; flex: none; width: 34%; padding: 3px 3px 0; border-radius: 18px 18px 0 0; background: var(--device-900);
  box-shadow: 0 0 0 1px rgba(232, 220, 194, .18), 0 18px 40px -8px rgba(0, 0, 0, .6);
  transition: transform .5s var(--ease-out, ease);
}
.work-card__phone img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 19; object-fit: cover; object-position: top; border-radius: 15px 15px 0 0; transition: object-position 3.5s cubic-bezier(.45, 0, .25, 1); }
.work-card__phone--solo { width: 44%; }
/* Navegador + celular superpuestos */
.work-card__media--duo .work-card__phone { position: absolute; right: 7%; bottom: -14%; width: 27%; }
.work-card__media--duo .work-card__frame { width: 80%; margin-right: 12%; }
@media (hover: hover) {
  .work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
  .work-card:hover .work-card__frame { transform: translateY(-6px); }
  .work-card:hover .work-card__phone { transform: translateY(-10px); }
  .work-card:hover .work-card__frame img, .work-card:hover .work-card__phone img { object-position: center bottom; }
}
.work-card__media--duo .work-card__phone { translate: 0 0; }
.work-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); flex: 1; }
.work-card h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--text-3xl); letter-spacing: var(--ls-small); line-height: var(--lh-heading); }
.work-card__metric { font-size: var(--text-base); }
.work-card__metric b { font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); }
.work-card .tile__link { margin-top: auto; padding-top: var(--space-3); border-bottom: 0; }
.work-card .tile__link::after { content: none; }
@media (hover: hover) { .work-card:hover .tile__link span { transform: translateX(6px); } }
@media (max-width: 900px) { .work__grid { grid-template-columns: 1fr; } }

/* ========== Cierre de cada caso: contacto ========== */
.cs-contact { background: var(--forest-900); color: var(--sand-100); padding: clamp(var(--space-7), 7vw, var(--space-9)) var(--pad-x); }
.cs-contact h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--display-lg); line-height: var(--lh-display); letter-spacing: var(--ls-heading); margin-top: var(--space-3); }
.cs-contact__lead { font-size: var(--text-lg); max-width: 46ch; margin-top: var(--space-5); }
.cs-contact .btn { border-color: var(--line-on-dark-strong); color: var(--sand-100); }
.cs-contact .btn:hover { background: var(--forest-800); border-color: var(--sand-100); }
.cs-contact .btn--accent { background: var(--orange-400); border-color: var(--orange-400); color: var(--forest-900); }
.cs-contact .btn--accent:hover { background: var(--sand-50); border-color: var(--sand-50); color: var(--forest-900); }
.cs-contact .contact__avail span { background: var(--orange-400); }
.cs-contact .copy { color: var(--sand-100); border-color: var(--line-on-dark-strong); }
.cs-contact .copy:hover { border-color: var(--sand-100); }
.cs-contact .copy.is-done { background: var(--orange-400); border-color: var(--orange-400); color: var(--forest-900); }
.cs-contact :focus-visible { outline-color: var(--orange-400); box-shadow: none; }

/* la barra es fija, el encabezado baja (el eyebrow se pisaba con la marca) */
.cs-hero { padding-top: calc(var(--topbar-h) + clamp(var(--space-5), 4vw, var(--space-7))); }

/* ========== Prueba social (cita de cliente o jefe) ========== */
.proof { background: var(--sand-100); padding: 0 var(--pad-x) var(--section-y); }
.quote { max-width: 900px; border-top: 2px solid var(--forest-900); padding-top: var(--space-6); }
.quote blockquote p { font-family: var(--font-display); font-weight: 700; font-size: var(--display-sm); line-height: var(--lh-heading); letter-spacing: var(--ls-small); }
.quote blockquote p::before { content: "“"; }
.quote blockquote p::after { content: "”"; }
.quote figcaption { margin-top: var(--space-4); font-size: var(--text-base); }
