/* alamadreh! — estilos del sitio
   Identidad visual según la guía de marca (callejero y gráfico):
   naranja #FF4B26, negro #0D0D0D, papel #F1F0EC, cobalto #2433FF, amarillo #FFE14A.
   Fuentes: Archivo (titulares y texto), Azeret Mono (etiquetas), Permanent Marker (nota a mano). */

/* Fuentes alojadas en el propio sitio (no dependen de Google) */
@font-face { font-family: "Archivo"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 900; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Azeret Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/azeret-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Permanent Marker"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/permanent-marker-latin-400-normal.woff2") format("woff2"); }

:root {
  --orange: #FF4B26;
  --black: #0D0D0D;
  --paper: #F1F0EC;
  --cobalt: #2433FF;
  --yellow: #FFE14A;
  --white: #fff;
  --font-head: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-note: "Permanent Marker", "Archivo", cursive;
  --star: polygon(50.0% 0.0%, 59.2% 27.8%, 85.4% 14.6%, 72.2% 40.8%, 100.0% 50.0%, 72.2% 59.2%, 85.4% 85.4%, 59.2% 72.2%, 50.0% 100.0%, 40.8% 72.2%, 14.6% 85.4%, 27.8% 59.2%, 0.0% 50.0%, 27.8% 40.8%, 14.6% 14.6%, 40.8% 27.8%);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Grano: va encima de todo, sin estorbar los clics */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background-image: var(--grain); opacity: .09; mix-blend-mode: multiply;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 900; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.03em; }
h3 { text-transform: uppercase; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

.container { width: min(1180px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--yellow); color: var(--black); padding: 10px 14px; }

/* ---------- Colores de fondo por sección ---------- */
.bg-orange { background: var(--orange); color: var(--black); }
.bg-paper { background: var(--paper); color: var(--black); }
.bg-cobalt { background: var(--cobalt); color: var(--white); }
.bg-cobalt h3 { color: var(--yellow); }

/* ---------- Tira negra para titulares ---------- */
.strip {
  background: var(--black); color: var(--white);
  text-transform: uppercase; letter-spacing: -.03em; line-height: 1.38;
  padding: .04em .26em .02em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
main h1, main h2, .contact h2 { transform: rotate(-1.2deg); transform-origin: left center; }
main h2:nth-of-type(even) { transform: rotate(.9deg); }
.center h2, .hero h1 { transform-origin: center; }
/* Titulares que no llevan tira (títulos de tarjetas, enlaces y texto legal) */
.tile-caption h2, .post-card h2, .legal h2 { transform: none; }
.tile-caption .strip, .post-card .strip, .legal h2 .strip {
  background: none; color: inherit; padding: 0; text-transform: inherit;
}

/* ---------- Botones tipo píldora ---------- */
.pill {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 13px 20px;
  border-radius: 300px;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.pill:hover { background: var(--yellow); color: var(--black); transform: translateY(-2px) rotate(-1deg); }
.pill--lg { padding: 20px 56px; font-size: 14px; }
.pill--dark { background: var(--black); color: var(--white); }

/* ---------- Cabecera ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--black); color: var(--white); }
.header-inner {
  width: min(1180px, 100% - 48px); margin-inline: auto; padding: 10px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.social { display: flex; gap: 22px; }
.social a { display: grid; place-items: center; width: 24px; height: 24px; color: var(--white); transition: color .15s; }
.social a:hover { color: var(--yellow); }
.social svg { width: 22px; height: 22px; }
.logo img { width: 70px; height: auto; }
.nav { justify-self: end; position: relative; }
.nav ul { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.site-header .pill { background: var(--white); color: var(--black); }
.site-header .pill:hover, .nav .pill[aria-current="page"] { background: var(--yellow); color: var(--black); }
.nav-toggle { display: none; }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 160px 0 90px;
  background: var(--orange);
}
.hero .container { position: relative; z-index: 2; }
/* Estrella grande y estrella chica (cobalto) */
.hero::before, .hero::after { content: ""; position: absolute; background: var(--cobalt); clip-path: var(--star); z-index: 1; }
.hero::before { width: clamp(120px, 17vw, 240px); aspect-ratio: 1; right: 6%; top: 16%; transform: rotate(12deg); }
.hero::after { width: clamp(44px, 6vw, 84px); aspect-ratio: 1; left: 8%; bottom: 14%; transform: rotate(-8deg); }
.kicker { font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 14px; margin-bottom: 36px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 54px); max-width: 15em; margin: 0 auto 40px; }

/* Fotos que suben con el scroll, con el nombre en una tira encima */
.showcase { height: 280vh; position: relative; background: var(--orange); }
.showcase-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.showcase-word {
  position: absolute; left: 50%; top: 50%; margin: 0; z-index: 3; pointer-events: none; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-1.5deg);
  background: var(--black); color: var(--orange);
  font-size: clamp(56px, 15vw, 240px); font-weight: 900; letter-spacing: -.045em; line-height: 1;
  padding: .04em .2em .1em;
}
.frame {
  position: absolute; margin: 0; overflow: visible; will-change: transform; z-index: 1;
  border: 10px solid var(--paper); background: var(--paper); box-shadow: 5px 6px 0 rgba(13, 13, 13, .85);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--l { left: 8%; top: 8vh; width: 20%; aspect-ratio: 9 / 16; rotate: -3deg; }
.frame--c { left: 37.5%; top: 6vh; width: 25%; aspect-ratio: 9 / 16; rotate: 1.5deg; }
.frame--r { right: 6%; top: 18vh; width: 19%; aspect-ratio: 3 / 4; rotate: 3deg; }
/* Una sola cinta en la portada */
.frame--c::before {
  content: ""; position: absolute; left: 50%; top: -22px; width: 110px; height: 34px; z-index: 2;
  background: var(--yellow); opacity: .85; transform: translateX(-50%) rotate(-4deg);
}

/* Marcos vacíos mientras llegan las fotos */
.ph { background: #d9d7d0; position: relative; }
.ph:has(img.img-missing)::after {
  content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; padding: 16px;
  text-align: center; font: 600 11px/1.3 var(--font-mono); letter-spacing: .06em; color: #6b6a66;
}
img.img-missing { visibility: hidden; }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.center { text-align: center; }
.eyebrow {
  display: inline-block; background: var(--yellow); color: var(--black);
  font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 10px 6px; margin-bottom: 22px;
}
.lead { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; max-width: 28em; margin-inline: auto; }
.narrow { max-width: 38em; margin-inline: auto; }
.section h2 { font-size: clamp(28px, 4.2vw, 48px); margin-bottom: .7em; }
.section-title-xl { font-size: clamp(34px, 6.4vw, 80px) !important; }

/* Nota a mano: una por pieza, en cobalto, rotada ~6° */
.has-note::after {
  content: attr(data-note); position: absolute; right: max(24px, calc((100% - 1180px) / 2)); bottom: 28px;
  font-family: var(--font-note); font-size: clamp(20px, 2.4vw, 30px); line-height: 1.1; color: var(--cobalt);
  transform: rotate(6deg); max-width: 11em; text-align: center; pointer-events: none;
}

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; margin-top: 56px; }
.card { background: var(--paper); color: var(--black); border: 0; padding: 32px 30px 34px; box-shadow: 6px 7px 0 var(--black); }
.card:nth-child(odd) { transform: rotate(-.6deg); }
.card:nth-child(even) { transform: rotate(.5deg); }
.card h3 { font-size: 21px; letter-spacing: -.02em; }
.card p { margin: 0; }

.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin: 48px 0; }
.duo .ph, .tile.ph { overflow: hidden; aspect-ratio: 1 / 1; margin: 0; border-radius: 2px; }
.duo .ph:nth-child(odd) { transform: rotate(-1deg); }
.duo .ph:nth-child(even) { transform: rotate(1deg); }
.duo img, .tile img { width: 100%; height: 100%; object-fit: cover; }

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; margin-top: 44px; }
.why-grid h3 { font-size: 22px; }
.why-grid p { margin: 0; }

/* Portfolio */
.page-top { padding: 150px 0 40px; }
.page-top h1 { font-size: clamp(40px, 8vw, 100px); margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.tile-wrap { position: relative; }
.tile { position: relative; }
.tile-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; }
.tile-caption h2 { font-size: 20px; margin: 0; text-transform: uppercase; letter-spacing: -.02em; }

/* Nosotr@s */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: center; }
.photo-wide { position: relative; overflow: visible; aspect-ratio: 3 / 2; margin: 28px 0 0; border: 10px solid var(--white); box-shadow: 5px 6px 0 var(--black); rotate: 1deg; }
.photo-wide img { width: 100%; height: 100%; object-fit: cover; }
.photo-wide::before {
  content: ""; position: absolute; left: 50%; top: -22px; width: 110px; height: 34px; z-index: 2;
  background: var(--yellow); opacity: .85; transform: translateX(-50%) rotate(3deg);
}
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px; margin-top: 44px; }
.member .ph { overflow: hidden; aspect-ratio: 4 / 5; margin: 0 0 16px; border-radius: 2px; }
.member img { width: 100%; height: 100%; object-fit: cover; }
.member .role { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 4px; }
.member h3 { font-size: 24px; margin-bottom: 14px; }

/* Blog */
.post-card { border-top: 3px solid var(--black); padding: 36px 0 44px; max-width: 820px; }
.post-card h2 { font-size: clamp(26px, 3.4vw, 38px); }
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { background: var(--yellow); }
.byline { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #d9d7d0; }
.article { max-width: 720px; margin-inline: auto; padding-bottom: 80px; }
.article h1 { font-size: clamp(30px, 4.4vw, 48px); }
.article p { font-size: 20px; }
.back { font-family: var(--font-mono); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }

/* Texto legal */
.legal { max-width: 760px; margin-inline: auto; padding-bottom: 80px; }
.legal h1 { font-size: clamp(30px, 4.4vw, 52px); }
.legal h2 { font-size: 22px; margin-top: 2em; }
.legal h2 .strip { background: var(--yellow); color: var(--black); padding: .08em .3em; }
.legal li { margin-bottom: .4em; }
.legal .note { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* Hablemos */
.contact-info { display: grid; gap: 6px; font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; font-size: 15px; margin: 28px 0; }
.contact-info a { text-decoration: none; }
.contact-info a:hover { background: var(--yellow); }

/* ---------- Formulario ---------- */
.contact { background: var(--orange); color: var(--black); padding: clamp(64px, 9vw, 120px) 0; position: relative; overflow: hidden; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: start; }
.contact h2 { font-size: clamp(32px, 5vw, 64px); margin: 0; transform: rotate(1.2deg); }
.contact form { display: grid; gap: 22px; }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact label { display: grid; gap: 6px; font-family: var(--font-mono); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.contact input, .contact textarea {
  font: 500 18px var(--font-head); color: var(--black); background: transparent;
  border: 0; border-bottom: 2px solid var(--black); border-radius: 0; padding: 10px 0; width: 100%;
}
.contact input:focus, .contact textarea:focus { outline: none; border-bottom-width: 5px; }
.contact textarea { resize: vertical; }
.contact .pill { justify-self: start; padding: 18px 44px; }
.hp { position: absolute; left: -9999px; }
.form-status { font-family: var(--font-mono); font-weight: 600; font-size: 13px; min-height: 1.4em; margin: 0; }

/* ---------- Pie ---------- */
.site-footer { padding: 64px 0 40px; background: var(--black); color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; }
.footer-grid h2 { font-size: 22px; margin-bottom: 10px; }
.footer-grid div:first-child h2 { color: var(--orange); font-size: 34px; letter-spacing: -.045em; text-transform: none; }
.footer-grid h2 { text-transform: uppercase; }
.footer-grid div:first-child h2 { text-transform: none; }
.footer-grid p, .footer-grid li { font-size: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover, .footer-bottom a:hover { color: var(--yellow); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(241, 240, 236, .3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; font-family: var(--font-mono); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; box-shadow: 4px 5px 0 var(--black); background: var(--yellow); color: var(--black); }
.wa-float:hover { background: var(--white); }

/* Páginas de proyecto */
.page-proyecto .lead { font-size: 20px; max-width: 720px; margin-inline: 0; font-weight: 500; }
.project-hero { position: relative; margin: 0 0 28px; box-shadow: 6px 7px 0 var(--black); }
.project-hero::before {
  content: ""; position: absolute; left: 50%; top: -18px; width: 120px; height: 34px; z-index: 2;
  background: var(--cobalt); opacity: .85; transform: translateX(-50%) rotate(-3deg);
}
.project-hero img { width: 100%; max-height: 80vh; object-fit: cover; display: block; }
.gallery { columns: 3 260px; column-gap: 18px; }
.gallery img { width: 100%; height: auto; display: block; margin: 0 0 18px; border-radius: 2px; break-inside: avoid; }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .logo img { width: 54px; height: auto; }
  .nav-toggle { display: inline-block; }
  .nav ul { display: none; position: absolute; right: 0; top: 46px; flex-direction: column; gap: 8px; align-items: stretch; background: var(--black); padding: 12px; min-width: 170px; }
  .nav ul.open { display: flex; }
  .nav ul .pill { display: block; text-align: center; }
  .page-top { padding-top: 120px; }
  .frame { border-width: 6px; }
  .frame--l { left: 4%; width: 30%; }
  .frame--c { left: 32%; width: 36%; }
  .frame--r { right: 3%; width: 28%; top: 30vh; }
  .contact .row { grid-template-columns: 1fr; }
  .pill--lg { padding: 18px 36px; }
  .has-note::after { position: static; display: block; margin: 28px auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill { transition: none; }
}

/* Avatares del equipo (en lugar de fotos) */
.avatar-art { position: relative; aspect-ratio: 4 / 5; margin: 0 0 16px; display: grid; place-items: center; overflow: hidden; box-shadow: 5px 6px 0 var(--black); }
.avatar-art span { font-weight: 900; font-size: clamp(110px, 14vw, 170px); line-height: 1; letter-spacing: -.045em; transform: rotate(-4deg); }
.avatar-art::after { content: ""; position: absolute; right: 12%; top: 10%; width: 22%; aspect-ratio: 1; clip-path: var(--star); }
.member:nth-child(even) .avatar-art { rotate: .8deg; }
.member:nth-child(odd) .avatar-art { rotate: -.8deg; }
.av-cobalt { background: var(--cobalt); color: var(--white); } .av-cobalt::after { background: var(--yellow); }
.av-yellow { background: var(--yellow); color: var(--black); } .av-yellow::after { background: var(--cobalt); }
.av-black { background: var(--black); color: var(--orange); } .av-black::after { background: var(--yellow); }
.av-orange { background: var(--orange); color: var(--black); } .av-orange::after { background: var(--black); }

/* Casos: problema, solución y resultados */
.case { display: grid; gap: 56px; }
.case-block { display: grid; grid-template-columns: minmax(180px, 1fr) 2.4fr; gap: 40px; align-items: start; }
.case-block h2 { font-size: clamp(26px, 3.2vw, 40px); margin: 0; }
.case-text { max-width: 44em; }
.case-text p, .case-text li { font-size: 19px; }
.case-text ul { margin: 0 0 1em; padding-left: 1.2em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.stat { background: var(--paper); box-shadow: 6px 7px 0 var(--black); padding: 28px 28px 30px; }
.stat:nth-child(odd) { transform: rotate(-.6deg); } .stat:nth-child(even) { transform: rotate(.5deg); }
.stat-num { font-weight: 900; font-size: clamp(56px, 7vw, 92px); line-height: 1; letter-spacing: -.045em; margin: 0 0 12px; }
.stat-label { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.gallery video { width: 100%; height: auto; display: block; margin: 0 0 18px; break-inside: avoid; background: var(--black); }
@media (max-width: 860px) { .case-block { grid-template-columns: 1fr; gap: 20px; } }

/* Portada en celular: collage fijo, sin animación de scroll */
@media (max-width: 860px) {
  .showcase { height: auto; }
  .showcase-sticky { position: relative; height: 100svh; min-height: 640px; }
  .showcase .frame { position: absolute; transform: none !important; }
  .frame--l { left: 6%; top: 6%; width: 40%; }
  .frame--r { right: 6%; top: 20%; width: 40%; }
  .frame--c { left: 30%; top: 54%; width: 40%; }
  .showcase-word { top: 47%; }
}
