/* Bastos — Sitio web
 * Estilos compartidos. Lenguaje gráfico del design system:
 * fondo azul de marca, texto blanco, Plus Jakarta Sans,
 * cards planas separadas por filete, botones rectangulares.
 */

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

body {
  background: var(--color-brand);
  color: #fff;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ——— Header / nav ——— */
header { display: flex; align-items: center; justify-content: space-between; padding: 44px 80px 32px; gap: 24px; flex-wrap: wrap; }
header .logo { height: 30px; width: auto; }
nav { display: flex; gap: 26px; flex-wrap: wrap; }
nav a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 15px; font-weight: 400; transition: color 0.15s; }
nav a:hover { color: #fff; }
nav a.active { color: #fff; font-weight: 600; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; flex-shrink: 0; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ——— Bloques de encabezado de página ——— */
.lead { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.display { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 48px; }

/* ——— Home / hero ——— */
.hero { display: flex; align-items: center; gap: 56px; padding: 40px 80px 88px; }
.hero-text { flex: 1; min-width: 0; }
.hero h1 { font-size: clamp(26px, 3.3vw, 46px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; }

/* Marca animada: los 4 elementos alternándose en loop (como un gif) */
.hero-mark { position: relative; width: clamp(104px, 13vw, 184px); aspect-ratio: 1; flex-shrink: 0; }
.hero-mark img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.hero-mark img:first-child { opacity: 1; }
.hero-mark img:nth-child(1) { animation-delay: 0s; }
.hero-mark img:nth-child(2) { animation-delay: 0.4s; }
.hero-mark img:nth-child(3) { animation-delay: 0.8s; }
.hero-mark img:nth-child(4) { animation-delay: 1.2s; }
@keyframes markcycle { 0%, 25% { opacity: 1; } 25.001%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark img { animation: markcycle 1.6s linear infinite; }
  .hero-mark img:first-child { opacity: 0; }
}

.wrap { padding: 40px 80px 96px; flex: 1; }
.wrap.tight { max-width: 880px; }

/* ——— Grilla de proyectos ——— */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px; }
.card-img { position: relative; aspect-ratio: 4/3; background: #E6E6E6; width: 100%; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* hint mientras no hay imagen cargada */
.card-img .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #bbb; }
/* degradado para legibilidad del título sobre cualquier imagen */
.card-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(10,10,10,0.5), rgba(10,10,10,0)); }
.card-title { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

/* ——— Servicios ——— */
.svc { display: grid; grid-template-columns: 64px 1fr 1.1fr; gap: 32px; align-items: start; padding: 36px 0; border-top: 1px solid rgba(255,255,255,0.18); }
.svc:last-child { border-bottom: 1px solid rgba(255,255,255,0.18); }
.svc .num { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.7); padding-top: 8px; }
.svc h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.svc p { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.78); }

/* ——— Prosa editorial (taller, textos) ——— */
.prose { max-width: 720px; }
.prose p { font-size: 18px; line-height: 1.6; color: rgba(255,255,255,0.82); margin-bottom: 20px; }
.prose p.big { font-size: 25px; font-weight: 500; line-height: 1.42; letter-spacing: -0.01em; color: #fff; margin-bottom: 40px; }

.steplist { margin: 8px 0 48px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 32px; align-items: start; padding: 28px 0; border-top: 1px solid rgba(255,255,255,0.18); }
.step:last-child { border-bottom: 1px solid rgba(255,255,255,0.18); }
.step .num { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.7); }
.step h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.step p { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,0.75); }

/* ——— Botones ——— */
.btn { display: inline-block; text-decoration: none; font-family: var(--font-sans); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; padding: 15px 30px; border: 2px solid #fff; border-radius: 0; cursor: pointer; transition: opacity 0.15s, background 0.15s, color 0.15s; }
.btn-inverse { background: #E6E6E6; color: var(--color-brand); }
.btn-inverse:hover { opacity: 0.85; }
.btn-outline { background: transparent; color: #fff; }
.btn-outline:hover { background: #E6E6E6; color: var(--color-brand); }
.cta-row { margin-top: 16px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ——— Nosotros ——— */
.manifesto { font-size: 25px; font-weight: 500; line-height: 1.42; letter-spacing: -0.01em; max-width: 820px; color: #fff; margin-bottom: 80px; }
.team-lead { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: rgba(255,255,255,0.6); margin-bottom: 28px; }
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; }
.member .ph { aspect-ratio: 3/4; background: #fff; display: flex; align-items: flex-end; }
.member .ph span { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #bbb; padding: 10px 12px; }
.member .name { font-size: 18px; font-weight: 600; margin-top: 12px; }
.member .role { font-size: 14px; color: rgba(255,255,255,0.65); margin-top: 2px; }

/* ——— Blog ——— */
.post-list { border-top: 1px solid rgba(255,255,255,0.18); }
.post { display: grid; grid-template-columns: 140px 1fr; gap: 32px; align-items: start; padding: 34px 0; border-bottom: 1px solid rgba(255,255,255,0.18); text-decoration: none; color: #fff; transition: opacity 0.15s; }
.post:hover { opacity: 0.82; }
.post .date { font-size: 13px; color: rgba(255,255,255,0.55); padding-top: 4px; }
.post h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 10px; }
.post p { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,0.75); max-width: 60ch; }

/* ——— Footer ——— */
footer { padding: 56px 80px 48px; border-top: 1px solid rgba(255,255,255,0.18); }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 48px; }
.foot-col .k { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.foot-col .v { font-size: 17px; font-weight: 600; }
.foot-col a.v { text-decoration: none; color: #fff; }
.foot-col a.v:hover { opacity: 0.75; }
.foot-col a.v.ig { display: inline-flex; align-items: center; gap: 8px; }
.foot-col a.v.ig svg { width: 17px; height: 17px; flex-shrink: 0; }
.foot-bot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-bot .logo { height: 26px; width: auto; }
.marks { display: flex; gap: 14px; }
.marks svg { width: 32px; height: 32px; }

/* ——— Responsive ——— */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  nav { display: none; width: 100%; flex-basis: 100%; flex-direction: column; gap: 18px; padding-top: 20px; }
  nav.open { display: flex; }
}
@media (max-width: 860px) {
  header, .hero, .page-head, .wrap, footer { padding-left: 24px; padding-right: 24px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 28px; }
  .hero-mark { width: 88px; }
  .display { font-size: 30px; }
  .grid3 { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .svc { grid-template-columns: 40px 1fr; }
  .svc p { grid-column: 1 / -1; }
  .post { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 520px) {
  .grid3 { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; }
}


/* =====================================================================
   Cambios v2 — banda gris, ficha de proyecto, servicios, taller,
   equipo con hover, archivo
   ===================================================================== */

/* Banda gris de la grilla de proyectos */
.grid-band { background: #E6E6E6; }
.team-band { color: #1F1F23; }
.team-band .display { color: #1F1F23; }
.nosotros-intro { padding-bottom: 64px; }
.nosotros-intro .manifesto { margin-bottom: 24px; }

/* Tarjetas como botones */
.card { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; color: inherit; }
.card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Ficha de proyecto (ventana dentro de la web) */
.pmodal { position: fixed; inset: 0; z-index: 100; display: none; }
.pmodal.open { display: block; }
.pmodal-bg { position: absolute; inset: 0; background: rgba(10,10,10,0.55); }
.pmodal-panel { position: absolute; inset: 0; overflow-y: auto; }
.pmodal-inner { position: relative; background: #E6E6E6; color: #1F1F23; max-width: 920px; margin: 48px auto; min-height: calc(100vh - 96px); padding: 24px 56px 72px; }
.pmodal-close { position: sticky; top: 8px; margin-left: auto; display: block; background: none; border: 0; font-size: 30px; line-height: 1; color: #1F1F23; cursor: pointer; padding: 0 4px; }
.pmodal-close:hover { opacity: 0.55; }
.pmodal h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 26px; max-width: 26ch; }
.pmodal-meta { display: flex; gap: 56px; flex-wrap: wrap; margin-bottom: 30px; }
.pmodal-meta .k { font-size: 12px; color: #777; margin-bottom: 5px; }
.pmodal-meta .v { font-size: 16px; font-weight: 600; }
.pmodal-desc { font-size: 17px; line-height: 1.6; color: #333; max-width: 64ch; margin-bottom: 36px; white-space: pre-line; }
.pmodal-imgs { }
.pgallery-main { position: relative; background: #fff; border: 1px solid rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; height: 60vh; max-height: 560px; overflow: hidden; }
.pgallery-main img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; cursor: zoom-in; }
.pzoom { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(10,10,10,0.9); padding: 40px; cursor: zoom-out; }
.pzoom.open { display: flex; }
.pzoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.pgallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(31,31,35,0.55); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pgallery-arrow:hover { background: rgba(31,31,35,0.8); }
.pgallery-arrow.prev { left: 12px; }
.pgallery-arrow.next { right: 12px; }
.pgallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.pgallery-thumb { flex: 0 0 auto; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; background: #fff; cursor: pointer; opacity: 0.55; overflow: hidden; }
.pgallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgallery-thumb:hover { opacity: 0.85; }
.pgallery-thumb.active { opacity: 1; border-color: var(--color-brand); }
body.noscroll { overflow: hidden; }

/* Servicios */
.svc-list { border-top: 1px solid rgba(255,255,255,0.18); margin-bottom: 36px; }
.svc-item { padding: 32px 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
.svc-item h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.svc-item p { font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.82); max-width: 66ch; }

/* Ficha de texto (taller) */
.ficha p { font-size: 18px; line-height: 1.6; color: rgba(255,255,255,0.85); margin-bottom: 20px; max-width: 70ch; }
.ficha p.big { font-size: 24px; font-weight: 500; line-height: 1.4; color: #fff; margin-bottom: 30px; }
.ficha p.big.archivo-lead { max-width: 36ch; }
.ficha .etapas { font-size: 16px; line-height: 1.95; color: rgba(255,255,255,0.72); margin: 4px 0 28px; max-width: 70ch; }
.ficha h2 { font-size: 14px; font-weight: 700; letter-spacing: 0.01em; margin: 36px 0 8px; }
.ficha a { color: #fff; }

/* Equipo con hover */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.member { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #E6E6E6; display: block; text-decoration: none; color: inherit; }
.member > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #bbb; }
.member-over { position: absolute; inset: 0; background: rgba(31,31,35,0.68); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; opacity: 0; transition: opacity 0.18s ease; }
.member:hover .member-over, .member:focus-within .member-over { opacity: 1; }
.member-over .name { font-size: 18px; font-weight: 600; }
.member-over .role { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 3px; }
.member-over .linkedin { position: absolute; top: 14px; right: 16px; font-size: 11px; letter-spacing: 0.02em; color: rgba(255,255,255,0.75); }
.member:hover .member-over .linkedin, .member:focus-within .member-over .linkedin { color: #fff; }

/* Archivo */
.arch-list { border-top: 1px solid rgba(255,255,255,0.18); }
.arch-item { padding: 26px 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
.arch-item h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.arch-item p { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,0.72); max-width: 62ch; }
.arch-item .tipo { font-size: 13px; color: rgba(255,255,255,0.5); white-space: nowrap; }

@media (max-width: 860px) {
  .pmodal-inner { padding: 20px 24px 56px; margin: 0; min-height: 100vh; }
  .svc-item p { max-width: none; }
  .team { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 520px) {
  .team { grid-template-columns: 1fr; gap: 16px; }
  .arch-item { grid-template-columns: 1fr; gap: 6px; }
}


/* Grilla del archivo: idéntica al portafolio (.grid3 .card .card-img .card-title),
   solo se centra el logo dentro de la baldosa gris */
.arch .card-img { display: flex; align-items: center; justify-content: center; padding: 18px 18px 56px; }
.arch .arch-logo { max-width: 60%; max-height: 60%; width: auto; height: auto; object-fit: contain; display: block; }
.card-meta { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; }
.card-meta .card-title { position: static; }
.card-sub { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.62); margin-top: 3px; }
